/*
 * GB Lead Forms — front-end quiz styles.
 * Tokens mirror Brand/05-brand-guidelines-v2.html: warm white / night / ink /
 * forest, Inter for headings, Open Sans for body.
 */

.gb-quiz {
    --gb-warm-white: #FFF8F0;
    --gb-night: #161616;
    --gb-ink: #282828;
    --gb-forest: #627264;
    --gb-forest-deep: #4A5A4C;
    --gb-linen: #F0EBE3;
    --gb-stone: #E0D9D0;
    --gb-charcoal: #555550;
    --gb-white: #FFFFFF;
    --gb-font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --gb-font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

    max-width: 640px;
    margin: 40px auto;
    background: var(--gb-white);
    border: 1px solid var(--gb-stone);
    border-radius: 16px;
    padding: 32px 28px;
    font-family: var(--gb-font-body);
    color: var(--gb-ink);
    box-sizing: border-box;
}

.gb-quiz *,
.gb-quiz *::before,
.gb-quiz *::after {
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .gb-quiz {
        margin: 20px auto;
        padding: 24px 18px;
        border-radius: 12px;
    }
}

/* Progress bar */
.gb-quiz__progress {
    width: 100%;
    height: 4px;
    background: var(--gb-stone);
    border-radius: 2px;
    margin-bottom: 28px;
    overflow: hidden;
}

.gb-quiz__bar {
    height: 100%;
    width: 0%;
    background: var(--gb-forest);
    border-radius: 2px;
    transition: width 0.35s cubic-bezier(.2, .7, .3, 1);
}

.gb-quiz__step-count {
    font-family: var(--gb-font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gb-charcoal);
    margin: -18px 0 18px;
}

/* Question */
.gb-quiz__question {
    font-family: var(--gb-font-heading);
    font-weight: 800;
    letter-spacing: -.02em;
    font-size: 22px;
    line-height: 1.25;
    color: var(--gb-night);
    margin: 0 0 20px;
}

/* Choice options */
.gb-quiz__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

/*
 * The host theme (Hello Elementor's reset.css and the active Elementor kit)
 * ships its own global `button`/`[type="button"]` and text-transform rules
 * that tie or beat a bare `.gb-quiz__option` class on specificity, so they
 * were winning: pink kit color, forced uppercase, and `white-space: nowrap`
 * (which pushed long option labels past the button's border instead of
 * wrapping). Every interactive control below is scoped through the extra
 * `.gb-quiz` ancestor to out-specificity those rules, with `!important` on
 * just the properties that theme was actually overriding.
 */
.gb-quiz .gb-quiz__option {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--gb-warm-white) !important;
    border: 1.5px solid var(--gb-stone);
    border-color: var(--gb-stone) !important;
    border-radius: 10px;
    padding: 14px 16px;
    font-family: var(--gb-font-body);
    font-size: 16px;
    font-weight: 400;
    color: var(--gb-ink) !important;
    text-transform: none !important;
    white-space: normal !important;
    cursor: pointer;
    transition: border-color .14s ease, background-color .14s ease, transform .14s ease;
    -webkit-tap-highlight-color: transparent;
}

.gb-quiz .gb-quiz__option:hover,
.gb-quiz .gb-quiz__option:focus-visible {
    border-color: var(--gb-forest) !important;
    background: var(--gb-linen) !important;
    color: var(--gb-ink) !important;
    outline: none;
}

.gb-quiz .gb-quiz__option.is-selected {
    border-color: var(--gb-forest) !important;
    background: rgba(98, 114, 100, .10) !important;
    color: var(--gb-ink) !important;
}

/* Text / textarea inputs */
.gb-quiz__field {
    margin-bottom: 18px;
}

.gb-quiz__field label {
    display: block;
    font-family: var(--gb-font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gb-charcoal);
    margin-bottom: 6px;
}

.gb-quiz__field input[type="text"],
.gb-quiz__field input[type="email"],
.gb-quiz__field input[type="url"],
.gb-quiz__field textarea {
    width: 100%;
    font-family: var(--gb-font-body);
    font-size: 16px;
    padding: 12px 14px;
    border: 1.5px solid var(--gb-stone);
    border-radius: 8px;
    background: var(--gb-white);
    color: var(--gb-ink);
}

.gb-quiz__field input:focus,
.gb-quiz__field textarea:focus {
    outline: 3px solid var(--gb-forest);
    outline-offset: 1px;
    border-color: var(--gb-forest);
}

.gb-quiz__field textarea {
    min-height: 100px;
    resize: vertical;
}

/* Consent */
.gb-quiz__consent {
    font-size: 14px;
    font-weight: 400;
    color: var(--gb-charcoal);
    margin: 20px 0;
}

/* The checkbox and its text are both children of one <label> (so clicking
   the text also toggles the box) — the flex/gap has to live here, on the
   label, not on .gb-quiz__consent itself, which only ever wraps that one
   label and so never had two children to space apart. */
.gb-quiz__consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
}

.gb-quiz__consent input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--gb-forest);
    flex-shrink: 0;
}

.gb-quiz__consent a {
    color: var(--gb-forest);
}

/* Diagnosis / result */
.gb-quiz__result {
    background: var(--gb-linen);
    border-left: 4px solid var(--gb-forest);
    border-radius: 8px;
    padding: 16px 18px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gb-ink);
    margin-bottom: 22px;
}

/* Buttons */
.gb-quiz__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.gb-quiz .gb-quiz__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--gb-font-heading);
    font-weight: 700 !important;
    font-size: 15px;
    padding: 13px 22px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    text-transform: none !important;
    white-space: normal !important;
    cursor: pointer;
    text-decoration: none;
    transition: all .14s ease;
}

.gb-quiz .gb-quiz__btn--primary {
    background: var(--gb-night) !important;
    border-color: var(--gb-night) !important;
    color: var(--gb-warm-white) !important;
}

.gb-quiz .gb-quiz__btn--primary:hover {
    background: var(--gb-forest) !important;
    border-color: var(--gb-forest) !important;
}

.gb-quiz .gb-quiz__btn--primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.gb-quiz .gb-quiz__btn--secondary {
    background: transparent !important;
    color: var(--gb-charcoal) !important;
    border-color: var(--gb-stone) !important;
}

.gb-quiz .gb-quiz__btn--secondary:hover {
    border-color: var(--gb-forest) !important;
    color: var(--gb-forest) !important;
}

.gb-quiz .gb-quiz__back {
    background: none !important;
    border: none;
    font-family: var(--gb-font-heading);
    font-size: 13px;
    font-weight: 600 !important;
    text-transform: none !important;
    color: var(--gb-charcoal) !important;
    cursor: pointer;
    padding: 8px 0;
}

.gb-quiz .gb-quiz__back:hover {
    color: var(--gb-forest) !important;
}

/* Error / status */
.gb-quiz__error {
    color: #b3261e;
    font-size: 14px;
    margin: 0 0 14px;
}

.gb-quiz__confirmation {
    text-align: center;
    padding: 12px 0;
}

.gb-quiz__confirmation h3 {
    font-family: var(--gb-font-heading);
    font-weight: 800;
    font-size: 20px;
    color: var(--gb-night);
    margin: 0 0 12px;
}

.gb-quiz__confirmation p {
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 20px;
}

.gb-quiz__confirmation .gb-quiz__secondary {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: var(--gb-charcoal);
}

.gb-quiz__noscript {
    color: var(--gb-charcoal);
    font-size: 14px;
}

/* Honeypot: off-screen, never display:none — a bot that skips
   display:none fields still gets caught. */
.gb-quiz__hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
