/* ===== Mortgage Eligibility Quiz (popup) ===== */

/* Modal sizing */
.re-quiz-modal .re-popup-modal-box { max-width: 560px; width: 92vw; border-radius: 16px; padding: 0; overflow: hidden; }
.re-quiz-modal .re-modal-header { position: absolute; right: 0; top: 0; z-index: 3; padding: 8px; }
.re-quiz-modal .re-modal-header .re-modal-title { display: none; }
.re-quiz-modal .re-popup-close { background: rgba(0,0,0,.04); border-radius: 50%; width: 38px; height: 38px; }
.re-quiz-modal .re-modal-body { padding: 0; }

/* CF7 form reset inside the quiz */
.re-quiz-modal .wpcf7 { margin: 0; }
.re-quiz-modal .wpcf7-form { padding: 34px 30px 30px; }
.re-quiz-modal .wpcf7 p { margin: 0; }

/* ---- Intro screen ---- */
.re-quiz-modal .quiz-intro { padding: 44px 32px 34px; text-align: center; }
.re-quiz-modal .quiz-intro-badge {
    display: inline-block; background: #fff0f0; color: #ff5252; font-weight: 700;
    font-size: 12px; letter-spacing: .05em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.re-quiz-modal .quiz-title { font-size: 26px; line-height: 1.2; font-weight: 800; margin: 0 0 10px; color: #1a1a1a; }
.re-quiz-modal .quiz-lead { font-size: 16px; line-height: 1.55; color: #6b6b6b; margin: 0 auto 24px; max-width: 420px; }
.re-quiz-modal .quiz-start {
    background: #ff5252; color: #fff; border: 0; border-radius: 12px; font-size: 18px; font-weight: 700;
    padding: 15px 34px; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
    box-shadow: 0 8px 22px rgba(255,82,82,.30);
}
.re-quiz-modal .quiz-start:hover { background: #ff3b3b; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255,82,82,.38); }
.re-quiz-modal .quiz-intro-trust { margin-top: 18px; font-size: 13px; color: #9a9a9a; }

/* ---- Progress ---- */
.re-quiz-modal .quiz-progress { position: relative; height: 6px; background: #eee; border-radius: 0; margin: 0 0 4px; display: none; }
.re-quiz-modal .quiz-progress-bar { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: linear-gradient(90deg,#ff7a7a,#ff5252); transition: width .35s ease; }
.re-quiz-modal .quiz-progress-text { position: absolute; right: 30px; top: 12px; font-size: 12px; font-weight: 700; color: #b0b0b0; letter-spacing: .03em; }

/* ---- Steps ---- */
.re-quiz-modal .quiz-step { display: none; border: 0; margin: 0; padding: 0; min-width: 0; }
.re-quiz-modal .quiz-step.active { display: block; animation: quizIn .28s ease; }
@keyframes quizIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.re-quiz-modal .quiz-q { font-size: 22px; font-weight: 800; line-height: 1.25; color: #1a1a1a; margin: 6px 0 20px; }
.re-quiz-modal .quiz-sub { font-size: 15px; color: #6b6b6b; margin: -12px 0 20px; line-height: 1.5; }

/* ---- Option cards (CF7 radios) ---- */
.re-quiz-modal .quiz-step .wpcf7-radio { display: flex; flex-direction: column; gap: 12px; }
.re-quiz-modal .quiz-step .wpcf7-list-item { margin: 0; display: block; }
.re-quiz-modal .quiz-step .wpcf7-list-item > label {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 16px 18px; border: 2px solid #e6e6e6; border-radius: 12px; cursor: pointer;
    font-size: 17px; font-weight: 600; color: #2a2a2a; transition: border-color .15s, background .15s, box-shadow .15s;
}
.re-quiz-modal .quiz-step .wpcf7-list-item > label:hover { border-color: #ffb3b3; background: #fff8f8; }
.re-quiz-modal .quiz-step .wpcf7-list-item input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }
.re-quiz-modal .quiz-step .wpcf7-list-item > label.chosen { border-color: #ff5252; background: #fff0f0; box-shadow: inset 0 0 0 1px #ff5252; }
.re-quiz-modal .quiz-step .wpcf7-list-item > label::before {
    content: ""; flex: 0 0 22px; height: 22px; border: 2px solid #ccc; border-radius: 50%; transition: all .15s;
}
.re-quiz-modal .quiz-step .wpcf7-list-item > label.chosen::before { border-color: #ff5252; background: #ff5252 radial-gradient(#fff 28%, transparent 32%); }

/* ---- Contact step ---- */
.re-quiz-modal .quiz-step-contact input.wpcf7-form-control[type=text],
.re-quiz-modal .quiz-step-contact input.wpcf7-form-control[type=email],
.re-quiz-modal .quiz-step-contact input.wpcf7-form-control[type=tel] {
    width: 100%; padding: 14px 16px; border: 2px solid #e6e6e6; border-radius: 12px; font-size: 16px; margin-bottom: 12px; box-sizing: border-box;
}
.re-quiz-modal .quiz-step-contact input:focus { border-color: #ff5252; outline: none; }
.re-quiz-modal .quiz-submit {
    width: 100%; background: #ff5252; color: #fff; border: 0; border-radius: 12px; font-size: 18px; font-weight: 700;
    padding: 15px; margin-top: 6px; cursor: pointer; transition: background .15s; -webkit-appearance: none;
}
.re-quiz-modal .quiz-submit:hover { background: #ff3b3b; }

/* ---- Nav (Back) injected by JS ---- */
.re-quiz-modal .quiz-back {
    background: none; border: 0; color: #9a9a9a; font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0 16px; display: none;
}
.re-quiz-modal .quiz-back:hover { color: #ff5252; }

/* ---- CF7 validation / spinner ---- */
.re-quiz-modal .wpcf7-not-valid-tip { color: #ff5252; font-size: 13px; margin: -8px 0 10px; display: block; }
.re-quiz-modal .wpcf7-response-output { border-radius: 10px; font-size: 14px; margin: 14px 0 0; padding: 10px 14px; }
.re-quiz-modal .wpcf7-spinner { margin: 0 auto; display: block; }

/* ---- Success ---- */
.re-quiz-modal .quiz-done { padding: 48px 32px; text-align: center; }
.re-quiz-modal .quiz-done-ico { width: 64px; height: 64px; line-height: 64px; border-radius: 50%; background: #e7f8ee; color: #1fab5a; font-size: 34px; margin: 0 auto 18px; }
.re-quiz-modal .quiz-done h2 { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.re-quiz-modal .quiz-done p { color: #6b6b6b; font-size: 16px; line-height: 1.55; margin: 0; }

/* ===== Header CTA (solid pill, matches theme palette) + inline button ===== */
.quiz-header-btn {
    display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
    background: #fe504f; border: 0; border-radius: 8px; text-decoration: none; cursor: pointer;
    font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap;
    padding: 11px 18px; transition: background .15s;
}
/* force white text on the pill (override header link/nav colors) */
.quiz-header-btn, .quiz-header-btn:hover, .quiz-header-btn:focus, .quiz-header-btn span { color: #fff !important; }
.quiz-header-btn:hover { background: #e8403f; }

/* desktop header aux slot: inline; quiz sits as the rightmost CTA */
.header-right .aux-item.aux-quiz { display: inline-block; vertical-align: middle; float: none; width: auto; margin: 0 0 0 6px; }
/* Center the header aux row so Contact us / search / quiz share one centre line.
   Force flex on the row AND on each item so the theme's `vertical-align:top` on
   .aux-item can't push the CTAs to different vertical positions. */
.header-right { display: flex !important; align-items: center !important; justify-content: flex-end !important; }
.header-right .aux-item { display: flex !important; align-items: center !important; max-height: none !important; }
/* Equal-height CTAs: lock the theme "Contact us" (.re-button) and the quiz
   button to one box height, flex-centered, so they match regardless of the
   theme's inherited line-height. */
.header-right .aux-item.text .re-button,
.header-right .aux-item.aux-quiz .quiz-header-btn {
    height: 40px !important; line-height: 1 !important;
    display: inline-flex !important; align-items: center; justify-content: center;
    box-sizing: border-box !important; margin-top: 0 !important; margin-bottom: 0 !important;
    border-radius: 8px !important;
}
.header-right .aux-item.aux-quiz .quiz-header-btn { padding: 0 18px; font-size: 14px; }

/* Hide the login / account button while user accounts are not in use.
   Targets logged-out visitors only (body lacks .logged-in), so admins keep their logout menu. */
body:not(.logged-in) .header-right .aux-item.aux-account,
body:not(.logged-in) .mobile-header-buttons .accaunt-button { display: none !important; }

.mobile-header-buttons .quiz-header-btn { margin-right: 8px; }
.quiz-header-btn .quiz-header-btn-short { display: none; }
@media (max-width: 1024px) {
    .quiz-header-btn { padding: 11px 18px; font-size: 13px; }
}
@media (max-width: 680px) {
    .quiz-header-btn { padding: 10px 14px; font-size: 12px; letter-spacing: .03em; }
    .mobile-header-buttons .quiz-header-btn { margin-right: 6px; }
    .quiz-header-btn .quiz-header-btn-full { display: none; }
    .quiz-header-btn .quiz-header-btn-short { display: inline; }
}

.quiz-cta-btn {
    display: inline-flex; align-items: center; background: #ff5252; color: #fff; border: 0; border-radius: 10px;
    font-size: 16px; font-weight: 700; padding: 13px 26px; cursor: pointer; transition: background .15s, transform .15s;
}
.quiz-cta-btn:hover { background: #ff3b3b; transform: translateY(-1px); }

@media (max-width: 600px) {
    .re-quiz-modal .wpcf7-form { padding: 30px 18px 22px; }
    .re-quiz-modal .quiz-intro { padding: 38px 20px 28px; }
    .re-quiz-modal .quiz-title { font-size: 22px; }
    .re-quiz-modal .quiz-q { font-size: 19px; }
    .quiz-fab { right: 12px; bottom: 12px; font-size: 14px; padding: 12px 18px; }
}
