/* ─── QUIZ MODAL SYSTEM ──────────────────────────────────────────────────── */

/* Overlay */
.qz-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 5, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s ease;
}

.qz-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

/* Modal Shell */
.qz-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    overflow: hidden;
    transform: translateY(28px) scale(0.97);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.qz-overlay.is-open .qz-modal {
    transform: translateY(0) scale(1);
}

/* Progress Bar */
.qz-progress-track {
    height: 4px;
    background: #e2dfd6;
    flex-shrink: 0;
}

.qz-progress-fill {
    height: 100%;
    background: #111111;
    border-radius: 0 2px 2px 0;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Header */
.qz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.6rem 0.75rem;
    flex-shrink: 0;
}

.qz-step-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #111111;
}

.qz-close {
    width: 32px;
    height: 32px;
    background: #f4f3ef;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    color: #555;
    flex-shrink: 0;
}

.qz-close:hover {
    background: #e9e6dd;
}

.qz-close svg {
    width: 14px;
    height: 14px;
}

/* Body */
.qz-body {
    padding: 0.5rem 1.6rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Question */
.qz-question {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.55rem;
    font-weight: 600;
    color: #111111;
    line-height: 1.3;
    margin-bottom: 0.4rem;
}

.qz-hint {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 1.1rem;
}

/* Option Grid */
.qz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}

.qz-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid #e2dfd6;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: #333;
    text-align: left;
    line-height: 1.35;
}

.qz-option:hover {
    border-color: #111111;
    background: #f4f3ef;
    transform: translateY(-1px);
}

.qz-option.selected {
    border-color: #111111;
    background: #f4f3ef;
    color: #111111;
}

.qz-option-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    line-height: 1;
}

/* Step slides */
.qz-step {
    display: none;
}

.qz-step.active {
    display: block;
}

/* Final step inputs */
.qz-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-bottom: 0.75rem;
}

.qz-field-group label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
    display: block;
}

.qz-field-group input,
.qz-field-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid #e2dfd6;
    border-radius: 10px;
    background: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    color: #111111;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.qz-field-group input:focus,
.qz-field-group textarea:focus {
    border-color: #111111;
}

.qz-field-group textarea {
    resize: none;
    height: 80px;
}

/* Consent */
.qz-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.9rem;
}

.qz-consent-row input[type=checkbox] {
    margin-top: 2px;
    accent-color: #111111;
    flex-shrink: 0;
}

.qz-consent-row label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.73rem;
    color: #888;
    line-height: 1.5;
}

.qz-consent-row a {
    color: #111111;
}

/* Shown only when the quiz lead really failed to reach the server */
.qz-send-error {
    margin-bottom: 0.9rem;
    padding: 0.8rem 1rem;
    background: #fdf3f3;
    border: 1px solid #c0392b;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #7d2018;
}

.qz-send-error a {
    color: #7d2018;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}

/* Footer buttons */
.qz-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.6rem 1.4rem;
    border-top: 1px solid #e2dfd6;
    flex-shrink: 0;
    gap: 0.75rem;
}

.qz-btn-back {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0;
    transition: color 0.2s;
    white-space: nowrap;
}

.qz-btn-back:hover {
    color: #555;
}

.qz-btn-next {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: #111111;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.6rem;
    cursor: pointer;
    flex: 1;
    max-width: 300px;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(17, 17, 17, 0.18);
    white-space: nowrap;
}

.qz-btn-next:hover {
    opacity: 0.93;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(17, 17, 17, 0.24);
}

.qz-btn-next:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* ─── THANK-YOU MODAL ───────────────────────────────────────────────────── */
.qz-thanks-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    padding: 3rem 2.5rem 2.5rem;
    transform: scale(0.9);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.qz-overlay.is-open .qz-thanks-modal {
    transform: scale(1);
}

.qz-thanks-icon {
    width: 72px;
    height: 72px;
    background: #f4f3ef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
}

.qz-thanks-modal h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #111111;
    margin-bottom: 0.6rem;
}

.qz-thanks-modal p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.qz-thanks-urgent {
    background: #f4f3ef;
    border: 1px solid #111111;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.qz-thanks-urgent-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.qz-thanks-urgent p {
    font-size: 0.82rem;
    color: #111111;
    margin: 0;
    line-height: 1.5;
}

.qz-thanks-urgent a {
    font-weight: 700;
    color: #111111;
    text-decoration: none;
}

.qz-thanks-close-btn {
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #888;
    background: #f4f3ef;
    border: none;
    border-radius: 10px;
    padding: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.qz-thanks-close-btn:hover {
    background: #e9e6dd;
}

/* ─── FLOATING CALL BUTTON (disabled — client wants phone numbers only) ──── */
.float-call-btn {
    display: none;
}

.float-call-btn-legacy {
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 9900;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #111111;
    /* Dark premium background */
    border: 1.5px solid #111111;
    /* Gold subtle border */
    box-shadow: 0 8px 32px rgba(17, 17, 17, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #111111;
    /* Gold icon */
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s, background 0.2s, color 0.2s;
}

.float-call-btn:hover {
    transform: scale(1.08);
    background: #111111;
    color: #111111;
    box-shadow: 0 12px 40px rgba(17, 17, 17, 0.2);
}

.float-call-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    stroke: none;
}

/* Premium Pulse Animation */
.float-call-btn::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid rgba(17, 17, 17, 0.5);
    /* Gold pulse */
    animation: qz-pulse 2.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.float-call-btn::after {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1.5px solid rgba(17, 17, 17, 0.15);
    animation: qz-pulse 2.2s cubic-bezier(0.22, 1, 0.36, 1) 0.55s infinite;
}

.float-call-tooltip {
    position: absolute;
    right: 72px;
    background: #111111;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.2s, transform 0.2s;
}

.float-call-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 5px solid #111111;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.float-call-btn:hover .float-call-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@keyframes qz-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    70% {
        transform: scale(1.35);
        opacity: 0;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 520px) {
    .qz-modal {
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
        margin-top: auto;
    }

    .qz-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .qz-question {
        font-size: 1.3rem;
    }

    .qz-options {
        grid-template-columns: 1fr;
    }

    .float-call-btn {
        bottom: 20px;
        right: 16px;
        width: 56px;
        height: 56px;
    }
}