/* ==========================================================================
   Normobact Quiz — Modal Styles
   Matches design: light blue/white modal, red accents, rounded buttons
   ========================================================================== */

/* ---------- Overlay ---------- */
.nq-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 60, 120, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
    backdrop-filter: blur(3px);
    animation: nqFadeIn 0.22s ease;
}

.nq-overlay[hidden] {
    display: none !important;
}

@keyframes nqFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---------- Modal box ---------- */
.nq-modal {
    position: relative;
    border-radius: 27px;
    background: linear-gradient(180deg, #E6F3FE 0%, #FFF 100%);
    box-shadow: 0 4px 10.4px 0 rgba(0, 0, 0, 0.10);
    padding: 44px 48px 40px;
    max-width: 1212px;
    width: 100%;
    animation: nqSlideUp 0.28s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

/* Decorative blob — top-right */
.nq-modal::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(100,180,240,0.35) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Decorative blob — bottom-left */
.nq-modal::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -30px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(100,180,240,0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

@keyframes nqSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Close button ---------- */
.nq-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #e03030;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
}

.nq-close:hover {
    background: rgba(224, 48, 48, 0.1);
    color: #b00;
}

/* ---------- Step ---------- */
.nq-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.nq-step[hidden] {
    display: none !important;
}

/* ---------- Title ---------- */
.nq-title {
    color: #1C286A;
    text-align: center;
    font-size: 40px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    margin-bottom: 40px;
}

/* ---------- Question ---------- */
.nq-question {
    color: #0077BC;
    text-align: center;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 36px; /* 150% */
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* ---------- Options grid (step 1: 2x2) ---------- */
.nq-options--grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
    max-width: 738px;
}

/* ---------- Options list (step 2: radio-style) ---------- */
.nq-options--list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
}

/* ---------- Option buttons ---------- */
.nq-option {
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1a2e5a;
    background: #fff;
    border: 1.5px solid #b8d8f0;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s;
    line-height: 1.35;
    position: relative;
}

.nq-option:hover {
    border-color: #2878c8;
    background: #f0f8ff;
    transform: scale(1);
}

.nq-option.is-selected {
    color: #000;
    border-color: #2878c8;
    background: #f0f8ff;
    transform: scale(1);
}

/* Radio-style: list options get a dot indicator */
.nq-options--list .nq-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    border-radius: 14px;
    padding: 12px 18px;
}

.nq-options--list .nq-option::before {
    content: '';
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #b8d8f0;
    margin-top: 1px;
    transition: border-color 0.15s, background 0.15s;
    background: #fff;
}

.nq-options--list .nq-option.is-selected::before {
    border-color: #2878c8;
    background: #2878c8;
    box-shadow: inset 0 0 0 3px #fff;
}

/* ---------- Primary buttons ---------- */
.nq-btn {
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 50px;
    padding: 13px 36px;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.14s, box-shadow 0.18s;
    border: 2px solid transparent;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    max-width: 738px;
    width: 100%;
}

.nq-btn:disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
    max-width: 738px;
    width: 100%;
}

button#nq-btn-next {
    width: 100%;
    max-width: 738px;
}

div#nq-step2-options {
    max-width: 690px;
    width: 100%;
}

button#nq-btn-result {
    max-width: 690px;
    width: 100%;
}

#nq-step2-options .nq-option{
    background: transparent;
    border: none;
}

.nq-btn--next,
.nq-btn--result {
    background: #fff;
    color: #e03030;
    border-color: #e03030;
    width: 100%;
    max-width: 400px;
}

.nq-btn--next:hover:not(:disabled),
.nq-btn--result:hover:not(:disabled) {
    background: #e03030;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(224,48,48,0.25);
}

.nq-btn--buy {
    background: #e03030;
    color: #fff !important;
    border-color: #e03030;
}

.nq-btn--buy:hover {
    background: #c02020;
    border-color: #c02020;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(224,48,48,0.3);
}

.nq-btn--more {
    background: #fff;
    color: #1a2e5a !important;
    border-color: #b8d8f0;
}

.nq-btn--more:hover {
    border-color: #2878c8;
    color: #2878c8 !important;
}

.nq-btn--restart {
    background: none;
    border: none;
    color: #2878c8;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 6px 12px;
    margin-top: 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nq-btn--restart:hover {
    color: #1a2e5a;
}

/* ---------- Result screen ---------- */
#nq-result {
    gap: 0;
    padding-top: 8px;
}

.nq-result-label {
    color: #0077BC;
    text-align: center;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 36px; /* 150% */
    text-transform: uppercase;
    margin-bottom: 32px;
}

/* Image slot: 200×200 placeholder, user drops in <img> tags via product_map */
.nq-result-image {
    width: 220px;
    height: 220px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nq-result-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Placeholder when no image */
.nq-result-image:empty {
    background: rgba(40,120,200,0.07);
    border-radius: 16px;
    border: 2px dashed #b8d8f0;
}

.nq-result-name {
    color: #1D296A;
    text-align: center;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 113%;
    text-transform: uppercase;
}

.nq-result-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 6px;
    width: 100%;
    max-width: 400px;
}

button#nq-btn-restart {
    display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .nq-modal {
        padding: 36px 22px 30px;
    }

    .nq-title {
        font-size: 18px;
    }

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

    .nq-result-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .nq-result-actions .nq-btn {
        text-align: center;
    }
}
