@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Source+Sans+3:wght@400;500;600;700&display=swap');

/* ============================================
   Investment Quiz — Frontend Styles
   Brand: Noles
   Palette  Navy #1A375F | Gray #EEEEEE | Black #000000
            Taupe #BCA68E | Plum #4C1147 (CTA only)
   Type     Montserrat (headings/UI) · Source Sans 3 (body)
   ============================================ */

:root {
    --iq-navy:       #1A375F;
    --iq-navy-dark:  #122742;
    --iq-navy-light: #24477A;
    --iq-gray:       #EEEEEE;
    --iq-black:      #000000;
    --iq-taupe:      #BCA68E;
    --iq-plum:       #4C1147;
    --iq-plum-dark:  #380D34;
    --iq-white:      #FFFFFF;
    --iq-font-head:  'Montserrat', 'Segoe UI', Arial, sans-serif;
    --iq-font-body:  'Source Sans 3', 'Segoe UI', Arial, sans-serif;
}

#iq-quiz-wrapper {
    font-family: var(--iq-font-body);
    max-width: 520px;
    margin: 0 auto;
    background: var(--iq-gray);
    padding: 20px;
    box-sizing: border-box;
}

#iq-quiz-container {
    position: relative;
}

/* ---- Card Shell ---- */
.iq-card {
    background: transparent;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

/* ---- Intro Screen ---- */
.iq-intro {
    position: relative;
    min-height: 340px;
    background: url('') center/cover no-repeat;
    background-color: var(--iq-navy);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 36px 32px 40px;
    color: var(--iq-white);
}
.iq-intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(18,39,66,0.55);
}
.iq-intro-inner { position: relative; z-index: 1; text-align: center; }
.iq-intro-count {
    font-family: var(--iq-font-head);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 14px;
    border-top: 1px solid rgba(255,255,255,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding: 6px 0;
    display: inline-block;
    width: 100%;
}
.iq-intro h2 {
    font-family: var(--iq-font-head);
    font-size: 36px;          /* brand H2 */
    font-weight: 700;
    margin: 0 0 14px;
    line-height: 1.2;
}
.iq-intro p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    margin: 0 0 28px;
}

/* ---- Conversion CTAs (Deep Plum — reserved for calls-to-action) ---- */
.iq-btn-play-again,
.iq-btn-start {
    display: inline-block;
    padding: 14px 48px!important;
    background: var(--iq-plum)!important;
    color: var(--iq-white)!important;
    border: 2px solid var(--iq-plum);
    font-family: var(--iq-font-head);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 8px!important;
    box-shadow: 0 4px 14px rgba(76,17,71,0.45);
    transition: background 0.2s, transform 0.15s;
}
.iq-btn-play-again:hover,
.iq-btn-start:hover {
    background: var(--iq-plum-dark)!important;
    color: var(--iq-white)!important;
    transform: translateY(-1px);
}

/* ---- In-quiz navigation: NEXT (white pill on the navy status bar) ---- */
.iq-btn-next {
    display: inline-block;
    padding: 11px 30px!important;
    background: var(--iq-white)!important;
    color: var(--iq-navy)!important;
    border: none;
    font-family: var(--iq-font-head);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 6px!important;
    transition: background 0.2s, transform 0.15s;
}
.iq-btn-next:hover {
    background: var(--iq-gray)!important;
    color: var(--iq-navy)!important;
    transform: translateY(-1px);
}

/* ---- Lead Capture Screen ---- */
.iq-lead {
    background: var(--iq-navy);
    color: var(--iq-white);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.iq-lead h2 {
    font-family: var(--iq-font-head);
    font-size: 25px;          /* brand H3 */
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0 0 12px;
}
.iq-lead p {
    font-size: 16px;
    opacity: 0.85;
    margin: 0 0 24px;
    line-height: 1.5;
}
.iq-lead-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 480px) {
    .iq-lead-fields { grid-template-columns: 1fr; }
}
.iq-lead-field label {
    display: block;
    font-family: var(--iq-font-head);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.iq-lead-field input {
    width: 100%;
    padding: 10px 12px;
    background: var(--iq-white);
    border: none;
    border-radius: 2px;
    font-family: var(--iq-font-body);
    font-size: 16px;
    box-sizing: border-box;
    color: var(--iq-black);
}
/* Lead submit is a CTA → Deep Plum */
.iq-btn-lead {
    display: inline-block;
    padding: 13px 28px;
    background: var(--iq-plum);
    color: var(--iq-white);
    border: 2px solid var(--iq-plum);
    font-family: var(--iq-font-head);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    box-shadow: 0 4px 14px rgba(76,17,71,0.4);
    transition: background 0.2s;
    align-self: flex-start;
}
.iq-btn-lead:hover { background: var(--iq-plum-dark); }

/* ---- Question Screen ---- */
.iq-question-screen {
    background: var(--iq-navy);
    color: var(--iq-white);
    position: relative;
}

/* Progress bar */
.iq-progress-bar-wrap {
    display: flex;
    align-items: center;
    padding: 12px 16px 8px;
    gap: 10px;
    background: rgba(18,39,66,0.5);
}
.iq-progress-dash {
    width: 18px;
    height: 2px;
    background: rgba(255,255,255,0.5);
    flex-shrink: 0;
}
.iq-progress-num {
    font-family: var(--iq-font-head);
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.75);
    flex-shrink: 0;
    min-width: 36px;
}
.iq-progress-track {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}
.iq-progress-fill {
    height: 100%;
    background: var(--iq-taupe);   /* warm secondary accent */
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* Feedback / action bar — navy bar across the top of an answered question.
   Put the NEXT button INSIDE this element (as a child, after .iq-feedback-text)
   to get the screenshot layout — flex pushes it to the right automatically. */
.iq-feedback-banner {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 12px 20px;
    background: var(--iq-navy);
    font-family: var(--iq-font-head);
    font-size: 20px;
    font-weight: 700;
}
.iq-feedback-banner.correct { display: flex; color: var(--iq-taupe); }
.iq-feedback-banner.wrong   { display: flex; color: #E25C6A; }
.iq-feedback-banner .iq-feedback-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.iq-feedback-banner .iq-feedback-text { flex: 1; }

/* Disclosure — solid Warm Taupe band with navy text */
.iq-disclosure {
    display: none;
    background: var(--iq-taupe);
    padding: 14px 22px 16px;
    font-size: 13px;
    font-style: italic;
    line-height: 1.55;
    color: var(--iq-navy);
}
.iq-disclosure.visible { display: block; }
.iq-disclosure strong {
    display: block;
    font-style: normal;
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--iq-navy);
}

/* Question image */
.iq-question-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.iq-question-image-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #24477A 0%, #1A375F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.4;
}

/* Question body */
.iq-question-body {
    padding: 18px 20px 6px;
}
.iq-question-text {
    font-family: var(--iq-font-head);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 16px;
}

/* Answers — individual rounded bars */
.iq-answers {
    list-style: none;
    margin: 0;
    padding: 6px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.iq-answer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    cursor: pointer;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
    border-radius: 8px;
}
.iq-answer-item:hover:not(.answered):not(.show-result) {
    background: rgba(255,255,255,0.10);
}

.iq-answer-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.55);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}
.iq-answer-radio .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--iq-white);
    display: none;
}

.iq-answer-label {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
}

.iq-answer-pct {
    font-family: var(--iq-font-head);
    font-size: 14px;
    font-weight: 700;
    min-width: 42px;
    text-align: right;
    display: none;
    color: rgba(255,255,255,0.9);
}

/* Correct checkmark → Warm Taupe */
.iq-answer-check {
    display: none;
    color: var(--iq-taupe);
    font-size: 15px;
    flex-shrink: 0;
    margin-left: 2px;
}

/* Selected answer → Deep Plum fill ("your pick") */
.iq-answer-item.selected {
    background: var(--iq-plum);
    border-color: var(--iq-plum);
}
.iq-answer-item.selected .iq-answer-radio { border-color: rgba(255,255,255,0.85); }
.iq-answer-item.selected .iq-answer-radio .dot { display: block; }

/* Reveal state */
.iq-answer-item.show-result { cursor: default; }
.iq-answer-item.show-result .iq-answer-pct { display: block; }

/* Correct answer → Warm Taupe outline + accents */
.iq-answer-item.show-result.is-correct {
    border-color: var(--iq-taupe);
    background: rgba(188,166,142,0.12);
}
/* Picked AND correct: keep the plum fill, taupe stays as the border + accents */
.iq-answer-item.show-result.is-correct.selected {
    background: var(--iq-plum);
}
.iq-answer-item.show-result.is-correct .iq-answer-pct { color: var(--iq-taupe); }
.iq-answer-item.show-result.is-correct .iq-answer-check { display: inline-block; }

/* ---- Social share bar (below card) ----
   Official platform brand colors — intentionally NOT recolored. */
.iq-share-bar {
    display: flex;
    gap: 8px;
    padding: 14px 4px 4px;
    align-items: center;
}
.iq-share-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.15s;
    padding: 0;
    text-decoration: none;
}
.iq-share-btn:hover { opacity: 0.85; transform: scale(1.08); }
.iq-share-btn.fb   { background: #3b5998; }
.iq-share-btn.tw   { background: #1da1f2; }
.iq-share-btn.msg  { background: #0084ff; }
.iq-share-btn.li   { background: #0077b5; }
.iq-share-btn svg  { width: 16px; height: 16px; fill: #fff; }

/* ---- Results Screen ---- */
.iq-results {
    background: var(--iq-navy);
    color: var(--iq-white);
}
.iq-results-header {
    background: var(--iq-taupe);   /* warm secondary band */
    color: var(--iq-navy);
    padding: 24px 24px 20px;
    text-align: center;
}
.iq-results-score-label {
    font-family: var(--iq-font-head);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 6px;
}
.iq-results-score {
    font-family: var(--iq-font-head);
    font-size: 56px;          /* brand H1 */
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}
.iq-results-score span { font-size: 28px; font-weight: 400; opacity: 0.65; }
.iq-results-title {
    font-family: var(--iq-font-head);
    font-size: 20px;          /* brand H4 */
    font-weight: 700;
    margin-top: 8px;
}
.iq-results-text {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.55;
    margin-top: 6px;
}

.iq-results-disclosures {
    padding: 20px 24px;
    font-size: 12px;
    font-style: italic;
    line-height: 1.6;
    color: rgba(255,255,255,0.75);
    border-top: 1px solid rgba(255,255,255,0.12);
}
.iq-results-disclosures p { margin: 0 0 10px; }
.iq-results-disclosures p:last-child { margin: 0; }
.iq-results-disclosures strong {
    font-style: normal;
    font-size: 12px;
    display: block;
    margin-bottom: 3px;
    color: rgba(255,255,255,0.9);
}

.iq-results-actions {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.iq-results-share-label {
    font-family: var(--iq-font-head);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ============================================
   Modal Overlay
   ============================================ */

/* Prevent body scroll when modal is open */
body.iq-modal-open { overflow: hidden; }

#iq-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(18,39,66,0.97);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    /* Animate in */
    opacity: 0;
    transition: opacity 0.25s ease;
}
#iq-modal-overlay.open {
    display: flex;
    opacity: 1;
}

#iq-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
    /* Slide up on open */
    animation: iqModalIn 0.3s cubic-bezier(0.34, 1.26, 0.64, 1) both;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
#iq-modal-dialog::-webkit-scrollbar { width: 5px; }
#iq-modal-dialog::-webkit-scrollbar-track { background: transparent; }
#iq-modal-dialog::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

@keyframes iqModalIn {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Close button */
#iq-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 10;
    background: rgba(0,0,0,0.35);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    padding: 0;
}
#iq-modal-close:hover {
    background: rgba(0,0,0,0.6);
    transform: scale(1.1);
}

/* Modal inner — remove wrapper padding, card handles everything */
#iq-modal-inner {
    font-family: var(--iq-font-body);
}
#iq-modal-inner #iq-quiz-wrapper,
#iq-modal-inner .iq-card {
    border-radius: 0;
    box-shadow: none;
}

/* ============================================
   Fade transition
   ============================================ */
.iq-fade { animation: iqFadeIn 0.35s ease; }
@keyframes iqFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
