/* ==========================================================================
   Book Call Survey — 4-step CF7 survey page (template-book-call-survey.php)
   Figma node 39582-31263. Self-contained: the template runs a clean-room
   strip, so this file carries fonts, base, header/footer and survey styles.
   Selectors target BOTH the hand-written wrappers (inc/cf7/…-form-en.html)
   and the markup CF7 generates around its tags (.wpcf7-radio, .wpcf7-list-item,
   .wpcf7-acceptance, .wpcf7-not-valid-tip, .wpcf7-response-output).
   ========================================================================== */

/* ---- Scoped base (site chrome comes from the theme) ------------------- */
/* Sticky footer: survey steps can be shorter than the viewport, which left
   the footer floating mid-screen. Flex column on the template's body makes
   <main> absorb the leftover height and pins the footer to the bottom. */
body.page-template-template-book-call-survey {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
}

body.page-template-template-book-call-survey .book-call-survey {
    flex: 1 0 auto;
}

.book-call-survey {
    background-color: #FFFFFE;
    color: #5D636A;
    font-family: "Hind Madurai", sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

/* ---- Survey layout -------------------------------------------------------- */
.book-call-survey__section {
    padding: 60px 16px;
    background-color: #FFFFFE;
}

.book-call-survey__main {
    max-width: 754px;
    margin: 0 auto;
}

.book-call-survey__steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}

.book-call-survey__step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid #D8E2E3;
    border-radius: 50%;
    color: #D8E2E3;
    font-family: "Montserrat", sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
}

.book-call-survey__step--active {
    border-color: #F35B54;
    background-color: #F35B54;
    color: #FFFFFE;
}

.book-call-survey__divider {
    width: 30px;
    height: 2px;
    border-radius: 2px;
    background-color: #D8E2E3;
}

.book-call-survey__divider--active {
    background-color: #F35B54;
}

/* 5 steps are 360px at desktop spacing — tighten so they fit a 375px viewport. */
@media (max-width: 480px) {
    .book-call-survey__steps {
        gap: 8px;
    }

    .book-call-survey__divider {
        width: 20px;
    }
}

/* Doubled class beats the Elementor kit's `.elementor-kit-8 h1 { font-size: 32px }`
   so the title renders at the designed 24px. */
.book-call-survey .book-call-survey__title {
    margin: 0 0 32px;
    color: #34383C;
    font-family: "Montserrat", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.book-call-survey__card {
    padding: 40px;
    border-radius: 4px;
    background-color: #F9F9F9;
}

.book-call-survey__card-inner {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.book-call-survey__supervisor {
    position: sticky;
    top: 20px;
    display: flex;
    flex: 0 0 214px;
    flex-direction: column;
    gap: 16px;
    width: 214px;
}

.book-call-survey__ava img {
    display: block;
    width: 214px;
    height: 278px;
    border-radius: 4px;
    object-fit: cover;
}

.book-call-survey__supervisor-name {
    text-align: center;
}

.book-call-survey__supervisor-fullname {
    margin: 0;
    color: #34383C;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

.book-call-survey__supervisor-tags {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
    color: #5D636A;
    font-size: 0.875rem;
    line-height: 1.5;
}

.book-call-survey__supervisor-tags p {
    margin: 0;
}

.book-call-survey__form {
    flex: 1 1 auto;
    min-width: 0;
}

/* ---- Step panels (inside the CF7 form body) ------------------------------- */
.book-call-survey__panel:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.book-call-survey__field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.book-call-survey__label {
    margin: 0;
    color: #5D636A;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.5;
}

/* CF7 wraps every control in an inline <span class="wpcf7-form-control-wrap"> */
.book-call-survey .wpcf7-form-control-wrap {
    display: block;
}

/* ---- Radio option rows (CF7 [radio] markup) ------------------------------- */
.book-call-survey .wpcf7-radio {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.book-call-survey .wpcf7-list-item {
    display: block;
    margin: 0;
}

.book-call-survey .wpcf7-list-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    min-height: 40px;
    margin: 0;
    padding: 8px 16px 8px 8px;
    border: 1px solid #69B9C9;
    border-radius: 4px;
    background-color: #FFFFFE;
    color: #5D636A;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Custom-drawn radio (appearance:none): native rendering ignores everything
   but accent-color and looks off-design on Windows. Figma atoms/radio-icons:
   14px FA "circle" outline (unchecked) / "circle-dot" (checked), #69B9C9.
   The checked inner dot is the teal background showing through a white
   inset ring — no pseudo-elements (unreliable on <input>). */
.book-call-survey .wpcf7-list-item input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin: 0 5px;
    border: 1px solid #69B9C9;
    border-radius: 50%;
    background-color: #FFFFFE;
    cursor: pointer;
}

.book-call-survey .wpcf7-list-item input[type="radio"]:checked {
    background-color: #69B9C9;
    box-shadow: inset 0 0 0 3px #FFFFFE;
}

/* No focus styling on radios per designer's request: kill the UA focus ring
   (outline:auto follows the OS accent color on Windows) and beat the theme's
   global `form input:focus { border-color: #FFC94B !important }` (style.css)
   that turned the radio ring yellow while focused. */
.book-call-survey .wpcf7-list-item input[type="radio"]:focus {
    outline: none;
    border-color: #69B9C9 !important;
}

/* ---- Text inputs / textarea ------------------------------------------------ */
.book-call-survey input[type="text"],
.book-call-survey input[type="email"],
.book-call-survey textarea {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #B2C9CB;
    border-radius: 4px;
    background-color: #FFFFFE;
    color: #5D636A;
    font-family: "Hind Madurai", sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
}

.book-call-survey input[type="text"],
.book-call-survey input[type="email"] {
    height: 48px;
}

.book-call-survey textarea {
    height: 111px;
    min-height: 111px;
    resize: vertical;
}

.book-call-survey input::placeholder,
.book-call-survey textarea::placeholder {
    color: #84A1A4;
    opacity: 1;
}

.book-call-survey input:focus,
.book-call-survey textarea:focus {
    border-color: #69B9C9;
    outline: 2px solid rgba(64, 136, 151, 0.2);
    outline-offset: 0;
}

/* ---- Privacy acceptance (CF7 [acceptance]) --------------------------------- */
.book-call-survey .wpcf7-acceptance .wpcf7-list-item {
    margin: 0;
}

.book-call-survey .wpcf7-acceptance .wpcf7-list-item label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #5D636A;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
}

.book-call-survey .wpcf7-acceptance input[type="checkbox"] {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: #408897;
    cursor: pointer;
}

.book-call-survey .wpcf7-acceptance a {
    color: #408897;
    text-decoration: none;
}

.book-call-survey .wpcf7-acceptance a:hover,
.book-call-survey .wpcf7-acceptance a:focus-visible {
    text-decoration: underline;
}

/* ---- Buttons ---------------------------------------------------------------- */
.book-call-survey__next {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 15px 20px 15px 30px;
    border: 0;
    border-radius: 4px;
    background-color: #408897;
    box-shadow: 0 20px 40px -10px rgba(38, 50, 56, 0.2);
    color: #FFFFFE;
    cursor: pointer;
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.book-call-survey__next i,
.book-call-survey__next svg {
    flex: 0 0 auto;
    font-size: 1.125rem;
    line-height: 1;
}

.book-call-survey__next:hover,
.book-call-survey__next:focus-visible {
    background-color: #35717D;
}

.book-call-survey__next:disabled {
    opacity: 0.75;
    pointer-events: none;
}

/* Submit in flight (js adds .bcs-sending + swaps the label): spinner in place
   of the arrow icon so the user sees progress instead of rage-clicking. */
.book-call-survey__next.bcs-sending::after {
    content: "";
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 254, 0.35);
    border-top-color: #FFFFFE;
    border-radius: 50%;
    animation: bcs-spin 0.7s linear infinite;
}

@keyframes bcs-spin {
    to { transform: rotate(360deg); }
}

/* CF7 shows its own spinner next to the submit control */
.book-call-survey .wpcf7-spinner {
    margin: 8px auto 0;
}

/* ---- Error state (DS input states, Figma 30589-1977): coral border +
   warning icon inside the field + coral message below. Applies to both the
   inline JS validation (.bcs-invalid) and CF7 server-side validation
   (.wpcf7-not-valid). ------------------------------------------------------- */
.book-call-survey input.bcs-invalid,
.book-call-survey textarea.bcs-invalid,
.book-call-survey input.wpcf7-not-valid,
.book-call-survey textarea.wpcf7-not-valid {
    border-color: #F35B54;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='%23F35B54'%3E%3Cpath d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px 16px;
    padding-right: 44px;
}

.book-call-survey textarea.bcs-invalid,
.book-call-survey textarea.wpcf7-not-valid {
    background-position: right 16px top 14px;
}

.book-call-survey input.bcs-invalid:focus,
.book-call-survey textarea.bcs-invalid:focus,
.book-call-survey input.wpcf7-not-valid:focus,
.book-call-survey textarea.wpcf7-not-valid:focus {
    border-color: #F35B54;
    outline: 2px solid rgba(243, 91, 84, 0.2);
}

.book-call-survey .bcs-error-msg {
    display: block;
    margin-top: 4px;
    color: #F35B54;
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* ---- reCAPTCHA: hidden badge + required attribution note ------------------- */
/* Google permits hiding the v3 badge only when the attribution text is shown. */
.grecaptcha-badge {
    visibility: hidden !important;
}

.book-call-survey__recaptcha-note {
    margin: 0;
    color: #84A1A4;
    font-size: 0.75rem;
    line-height: 1.5;
}

.book-call-survey__recaptcha-note a {
    color: #84A1A4;
    text-decoration: underline;
}

/* ---- CF7 validation / response output --------------------------------------- */
.book-call-survey .wpcf7-not-valid-tip {
    margin-top: 4px;
    color: #F35B54;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.book-call-survey .wpcf7-response-output {
    margin: 16px 0 0;
    padding: 12px 16px;
    border: 1px solid #F35B54 !important;
    border-radius: 4px;
    color: #34383C;
    font-size: 0.875rem;
    line-height: 1.5;
}

.book-call-survey form.sent .wpcf7-response-output {
    border-color: #408897 !important;
}

.book-call-survey__config-warning {
    margin: 0;
    padding: 16px;
    border: 1px dashed #F35B54;
    border-radius: 4px;
    color: #34383C;
    font-size: 0.875rem;
}

/* ---- Responsive --------------------------------------------------------------- */
@media (min-width: 0) and (max-width: 767px) {
    .book-call-survey__section {
        padding: 40px 16px;
    }

    .book-call-survey__steps {
        gap: 8px;
    }

    .book-call-survey__divider {
        width: 20px;
    }

    .book-call-survey .book-call-survey__title {
        margin-bottom: 24px;
        font-size: 1.25rem;
    }

    .book-call-survey__card {
        padding: 24px 16px;
    }

    .book-call-survey__card-inner {
        flex-direction: column;
        gap: 24px;
        align-items: center;
    }

    .book-call-survey__supervisor {
        position: static;
        flex-basis: auto;
        align-items: center;
        width: 100%;
    }

    .book-call-survey__form {
        width: 100%;
    }

}
