/* J&V Cases Studio 1.3.0 — global precision fixes. */

/* Keep the footer at the real bottom of short pages and remove the large empty
   strip that could remain below it. This only changes outer page geometry. */
html body .tm-page {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100dvh !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

html body .tm-page > .tm-main,
html body .tm-page > main {
    flex: 1 0 auto !important;
    min-height: 0 !important;
}

html body .tm-page > .tm-footer {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
}

html body .tm-footer,
html body .tm-footer__bottom,
html body .tm-footer__line-2 {
    margin-bottom: 0 !important;
}

/* Articles can be temporarily disabled from Cases → Settings. */
body.jvcr-articles-hidden .tm-news-block,
body.jvcr-articles-hidden .tm-home-news-block,
body.jvcr-articles-hidden [data-block="acf-news"],
body.jvcr-articles-hidden [data-name="acf_news"] {
    display: none !important;
}

/* Remove the square aura behind contact-form fields while keeping the soft
   gradient inside each rounded input itself. */
body .tm-form-block__form > .tm-grid,
body .tm-content-form > .tm-grid,
body .tm-content-form .wpcf7,
body .tm-content-form .wpcf7-form,
body .tm-content-form .wpcf7-form-control-wrap,
body .tm-content-form .field-row,
body .tm-form-block__form .wpcf7,
body .tm-form-block__form .wpcf7-form,
body .tm-form-block__form .wpcf7-form-control-wrap,
body .tm-form-block__form .field-row,
body .form-popup-content .wpcf7,
body .form-popup-content .wpcf7-form,
body .form-popup-content .wpcf7-form-control-wrap,
body .form-popup-content .field-row,
body .pum-container .wpcf7,
body .pum-container .wpcf7-form,
body .pum-container .wpcf7-form-control-wrap,
body .pum-container .field-row {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
}

body .tm-form-block__form > .tm-grid::before,
body .tm-form-block__form > .tm-grid::after,
body .tm-content-form > .tm-grid::before,
body .tm-content-form > .tm-grid::after,
body .tm-content-form .wpcf7::before,
body .tm-content-form .wpcf7::after,
body .tm-content-form .wpcf7-form::before,
body .tm-content-form .wpcf7-form::after,
body .tm-content-form .wpcf7-form-control-wrap::before,
body .tm-content-form .wpcf7-form-control-wrap::after,
body .tm-content-form .field-row::before,
body .tm-content-form .field-row::after,
body .tm-form-block__form .wpcf7-form-control-wrap::before,
body .tm-form-block__form .wpcf7-form-control-wrap::after,
body .tm-form-block__form .field-row::before,
body .tm-form-block__form .field-row::after,
body .form-popup-content .wpcf7-form-control-wrap::before,
body .form-popup-content .wpcf7-form-control-wrap::after,
body .form-popup-content .field-row::before,
body .form-popup-content .field-row::after,
body .pum-container .wpcf7-form-control-wrap::before,
body .pum-container .wpcf7-form-control-wrap::after,
body .pum-container .field-row::before,
body .pum-container .field-row::after {
    content: none !important;
    display: none !important;
}

body .tm-content-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body .tm-content-form textarea,
body .tm-form-block__form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body .tm-form-block__form textarea,
body .form-popup-content input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body .form-popup-content textarea,
body .pum-container input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body .pum-container textarea {
    background-color: rgba(23, 45, 80, .88) !important;
    background-image: linear-gradient(112deg, rgba(255,255,255,.035), rgba(64,105,164,.075) 54%, rgba(255,255,255,.025)) !important;
    background-clip: padding-box !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025) !important;
    filter: none !important;
}

/* One thin arrow language across legacy and redesigned controls. */
body .jvmr-ui-arrow::after,
body .jvmr-floating-cta__arrow::after,
body .tm-content-btn a > span:last-child::after,
body .tm-form-btn > span:last-child::after,
body .tm-quiz-form__btn > span:first-child::after {
    content: "→" !important;
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    color: inherit !important;
    font-family: Arial, sans-serif !important;
    font-size: 20px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    transform: none !important;
}

body .tm-quiz-form__btn.tm-quiz-form__btn_prev > span:first-child::after {
    content: "←" !important;
}

/* Mobile callback: centered X, safe inset and breathing room. */
@media (max-width: 767px) {
    body .pum-container.jvcr-callback-popup {
        padding-top: 88px !important;
    }

    body .pum-container.jvcr-callback-popup .jvcr-callback-close,
    body .pum-container.jvcr-callback-popup .pum-close {
        top: 18px !important;
        right: 18px !important;
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        display: block !important;
        padding: 0 !important;
        font-size: 0 !important;
        line-height: 0 !important;
        overflow: hidden !important;
    }

    body .pum-container.jvcr-callback-popup .jvcr-callback-close > span {
        display: none !important;
    }

    body .pum-container.jvcr-callback-popup .jvcr-callback-close::before,
    body .pum-container.jvcr-callback-popup .jvcr-callback-close::after,
    body .pum-container.jvcr-callback-popup .pum-close::before,
    body .pum-container.jvcr-callback-popup .pum-close::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        width: 20px !important;
        height: 2px !important;
        margin: 0 !important;
        border: 0 !important;
        background: #fff !important;
        transform-origin: center !important;
    }

    body .pum-container.jvcr-callback-popup .jvcr-callback-close::before,
    body .pum-container.jvcr-callback-popup .pum-close::before {
        transform: translate(-50%, -50%) rotate(45deg) !important;
    }

    body .pum-container.jvcr-callback-popup .jvcr-callback-close::after,
    body .pum-container.jvcr-callback-popup .pum-close::after {
        transform: translate(-50%, -50%) rotate(-45deg) !important;
    }
}

/* =========================================================
   v1.3.0 final precision layer
   ========================================================= */

/* The theme already uses a flex page shell. Reassert the complete geometry so
   the copyright row cannot remain near the top with a viewport-sized empty
   area below it on short pages. */
html,
body {
    min-height: 100% !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

html body .tm-page {
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
}

html body .tm-page > main,
html body .tm-page > .tm-main {
    flex: 1 0 auto !important;
}

html body .tm-footer,
html body .tm-footer__line-1,
html body .tm-footer__line-2,
html body .tm-footer__bottom {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

html body .tm-footer__line-2,
html body .tm-footer__bottom {
    flex: 0 0 auto !important;
}

/* The sharp rectangle shown behind the fields is the inner CF7 form surface,
   not the rounded outer form. Keep the outer rounded shell and make every
   inner wrapper fully transparent. */
body .tm-form-block__form .tm-content-form,
body .tm-form-block__form .wpcf7,
body .tm-form-block__form .wpcf7-form,
body .tm-form-block__form .wpcf7-form > p,
body .tm-form-block__form .tm-grid,
body .tm-content-form .tm-grid,
body .form-popup-content .tm-content-form,
body .form-popup-content .wpcf7,
body .form-popup-content .wpcf7-form,
body .form-popup-content .wpcf7-form > p,
body .pum-container .tm-content-form,
body .pum-container .wpcf7,
body .pum-container .wpcf7-form,
body .pum-container .wpcf7-form > p {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
}

body .tm-form-block__form .tm-content-form::before,
body .tm-form-block__form .tm-content-form::after,
body .form-popup-content .tm-content-form::before,
body .form-popup-content .tm-content-form::after,
body .pum-container .tm-content-form::before,
body .pum-container .tm-content-form::after,
body .tm-form-block__form .wpcf7-form::before,
body .tm-form-block__form .wpcf7-form::after,
body .form-popup-content .wpcf7-form::before,
body .form-popup-content .wpcf7-form::after,
body .pum-container .wpcf7-form::before,
body .pum-container .wpcf7-form::after {
    content: none !important;
    display: none !important;
}

/* One mechanically drawn arrow everywhere. It does not depend on icon fonts,
   so weight and proportions are identical in all circles and at every zoom. */
body .jvmr-ui-arrow,
body .jvmr-floating-cta__arrow,
body .jvcr-button__icon,
body .jvcr-arrow,
body .jvcr-slider__nav,
body .jvcr-quiz-button__icon,
body .tm-content-btn > a > span:last-child,
body .tm-content-btn > button > span:last-child,
body .tm-form-btn > span:last-child,
body .tm-quiz-form__btn > span:first-child {
    position: relative !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

body .jvmr-ui-arrow > *,
body .jvmr-floating-cta__arrow > *,
body .jvcr-button__icon > *,
body .jvcr-arrow > *,
body .jvcr-slider__nav > *,
body .jvcr-quiz-button__icon > *,
body .tm-content-btn > a > span:last-child > *,
body .tm-content-btn > button > span:last-child > *,
body .tm-form-btn > span:last-child > *,
body .tm-quiz-form__btn > span:first-child > * {
    display: none !important;
}

body .jvmr-ui-arrow::before,
body .jvmr-floating-cta__arrow::before,
body .jvcr-button__icon::before,
body .jvcr-arrow::before,
body .jvcr-slider__nav::before,
body .jvcr-quiz-button__icon::before,
body .tm-content-btn > a > span:last-child::before,
body .tm-content-btn > button > span:last-child::before,
body .tm-form-btn > span:last-child::before,
body .tm-quiz-form__btn > span:first-child::before {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 20px !important;
    height: 2px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: currentColor !important;
    transform: translate(-54%, -50%) !important;
}

body .jvmr-ui-arrow::after,
body .jvmr-floating-cta__arrow::after,
body .jvcr-button__icon::after,
body .jvcr-arrow::after,
body .jvcr-slider__nav::after,
body .jvcr-quiz-button__icon::after,
body .tm-content-btn > a > span:last-child::after,
body .tm-content-btn > button > span:last-child::after,
body .tm-form-btn > span:last-child::after,
body .tm-quiz-form__btn > span:first-child::after {
    content: "" !important;
    position: absolute !important;
    left: calc(50% + 5px) !important;
    top: 50% !important;
    width: 9px !important;
    height: 9px !important;
    margin: 0 !important;
    border: 0 !important;
    border-top: 2px solid currentColor !important;
    border-right: 2px solid currentColor !important;
    background: transparent !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

body .jvcr-slider__nav--prev::before,
body .jvcr-quiz-button__icon--back::before,
body .jvcr-quiz-button--back .jvcr-quiz-button__icon::before,
body .tm-quiz-form__btn_prev > span:first-child::before {
    transform: translate(-46%, -50%) !important;
}

body .jvcr-slider__nav--prev::after,
body .jvcr-quiz-button__icon--back::after,
body .jvcr-quiz-button--back .jvcr-quiz-button__icon::after,
body .tm-quiz-form__btn_prev > span:first-child::after {
    left: calc(50% - 5px) !important;
    transform: translate(-50%, -50%) rotate(-135deg) !important;
}

@media (max-width: 767px) {
    /* Keep the callback close circle comfortably inside the popup and draw the
       X from two centered lines instead of relying on a font glyph. */
    body .pum-container.jvcr-callback-popup {
        padding-top: 94px !important;
    }

    body .pum-container.jvcr-callback-popup .jvcr-callback-close,
    body .pum-container.jvcr-callback-popup .pum-close {
        top: 20px !important;
        right: 20px !important;
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        display: block !important;
        place-items: initial !important;
        overflow: hidden !important;
    }

    body .pum-container.jvcr-callback-popup .jvcr-callback-close::before,
    body .pum-container.jvcr-callback-popup .jvcr-callback-close::after,
    body .pum-container.jvcr-callback-popup .pum-close::before,
    body .pum-container.jvcr-callback-popup .pum-close::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        width: 20px !important;
        height: 2px !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 999px !important;
        background: #fff !important;
        transform-origin: center !important;
    }

    body .pum-container.jvcr-callback-popup .jvcr-callback-close::before,
    body .pum-container.jvcr-callback-popup .pum-close::before {
        transform: translate(-50%, -50%) rotate(45deg) !important;
    }

    body .pum-container.jvcr-callback-popup .jvcr-callback-close::after,
    body .pum-container.jvcr-callback-popup .pum-close::after {
        transform: translate(-50%, -50%) rotate(-45deg) !important;
    }
}
