/* =============================================
   COLT OPTICS – FIND MY OPTIC QUIZ POPUP
   ============================================= */

/* Overlay */
#coq-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.80);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
#coq-overlay.coq-active {
    display: flex;
    animation: coqFadeIn 0.25s ease;
}
@keyframes coqFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal container */
.coq-modal {
    position: relative;
    background: linear-gradient(160deg, #0d1b3e 0%, #162759 60%, #1a2e66 100%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
    animation: coqSlideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes coqSlideUp {
    from { transform: translateY(30px) scale(0.97); opacity:0; }
    to   { transform: translateY(0) scale(1);       opacity:1; }
}

/* Close button */
.coq-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 20px;
    line-height: 1;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}
.coq-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

/* Inner content */
#coq-modal-inner {
    padding: 48px 44px 40px;
}
/* Result screen: image panel bleeds to modal edges, so remove outer padding */
#coq-modal-inner:has(.coq-result-layout) {
    padding: 0;
}
/* Progress bar inside result needs its own padding */
#coq-modal-inner:has(.coq-result-layout) .coq-progress-track {
    margin: 20px 24px 0;
    width: calc(100% - 48px);
}
@media (max-width: 520px) {
    #coq-modal-inner { padding: 40px 24px 32px; }
    #coq-modal-inner:has(.coq-result-layout) { padding: 0; }
    #coq-modal-inner:has(.coq-result-layout) .coq-progress-track {
        margin: 16px 16px 0;
        width: calc(100% - 32px);
    }
}

/* Step counter */
.coq-step-counter {
    font-family: 'Oxanium', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 10px;
}

/* Progress bar */
.coq-progress-track {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-bottom: 28px;
    overflow: hidden;
}
.coq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a7aff, #263D83);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* Question text */
.coq-question {
    font-family: 'Oxanium', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    margin: 0 0 28px;
}
@media (max-width: 520px) {
    .coq-question { font-size: 18px; }
}

/* Answer buttons */
.coq-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.coq-answer {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 16px 20px;
    color: #fff;
    font-family: 'Oxanium', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}
.coq-answer::before {
    content: '';
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    transition: all 0.2s;
}
.coq-answer:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.5);
    transform: translateX(4px);
}
.coq-answer:hover::before {
    background: #fff;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}
.coq-answer.coq-selected {
    background: rgba(38,61,131,0.6);
    border-color: rgba(255,255,255,0.6);
}
.coq-answer.coq-selected::before {
    background: #fff;
    border-color: #fff;
}

/* Back button */
.coq-back {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-family: 'Oxanium', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0;
    margin-top: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.coq-back:hover { color: rgba(255,255,255,0.8); }
.coq-back::before { content: '←'; }

/* =============================================
   RESULT SCREEN LAYOUT
   ============================================= */

/* Widen modal for result screen with image */
.coq-modal:has(.coq-result-layout) {
    max-width: 780px;
}

.coq-result-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 340px;
}
.coq-result-layout--no-image {
    grid-template-columns: 1fr;
}

/* Image panel */
.coq-result-image-wrap {
    position: relative;
    background: linear-gradient(135deg, #0a1628 0%, #101e3d 100%);
    border-radius: 6px 0 0 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    min-height: 280px;
}
.coq-result-image-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(74,122,255,0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(38,61,131,0.15) 0%, transparent 60%);
    pointer-events: none;
}
/* Subtle grid lines texture */
.coq-result-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}
.coq-result-image {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 260px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
    animation: coqImageReveal 0.5s ease 0.1s both;
}
@keyframes coqImageReveal {
    from { opacity: 0; transform: translateX(-12px) scale(0.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* Content panel */
.coq-result-content {
    padding: 36px 32px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Stack on mobile */
@media (max-width: 580px) {
    .coq-modal:has(.coq-result-layout) {
        max-width: 100%;
    }
    .coq-result-layout {
        grid-template-columns: 1fr;
    }
    .coq-result-image-wrap {
        border-radius: 6px 6px 0 0;
        min-height: 200px;
        padding: 24px;
    }
    .coq-result-image {
        max-width: 200px;
    }
    .coq-result-content {
        padding: 28px 24px 28px;
    }
}


.coq-result-label {
    font-family: 'Oxanium', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #4a7aff;
    margin-bottom: 12px;
}
.coq-result-title {
    font-family: 'Oxanium', sans-serif;
    font-size: 34px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px;
    line-height: 1.1;
}
@media (max-width: 520px) {
    .coq-result-title { font-size: 26px; }
}
/* Variant subtitle (e.g. "MRAD · Coyote") */
.coq-result-subtitle {
    font-family: 'Oxanium', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin: -8px 0 16px;
}

.coq-result-divider {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #4a7aff, #263D83);
    border-radius: 2px;
    margin-bottom: 20px;
}

/* SKU code */
.coq-result-sku {
    font-family: 'Oxanium', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 12px;
}
.coq-result-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
    margin: 0 0 32px;
}

/* CTA button */
.coq-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #263D83;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
    padding: 14px 28px;
    color: #fff;
    font-family: 'Oxanium', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.coq-cta:hover {
    background: #1e3070;
    border-color: rgba(255,255,255,0.4);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(38,61,131,0.5);
}
.coq-cta svg {
    transition: transform 0.2s;
}
.coq-cta:hover svg {
    transform: translateX(3px);
}

/* Restart link */
.coq-restart {
    display: block;
    margin-top: 16px;
    font-family: 'Oxanium', sans-serif;
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
}
.coq-restart:hover,
.coq-restart:focus,
.coq-restart:active {
    color: rgba(255,255,255,0.65) !important;
    background: none !important;
    border: none !important;
    outline: none;
}

/* Decorative corner accent */
.coq-modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 120px; height: 120px;
    background: radial-gradient(circle at top left, rgba(74,122,255,0.12), transparent 70%);
    pointer-events: none;
    border-radius: 12px 0 0 0;
}
.coq-modal::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 160px; height: 100px;
    background: radial-gradient(circle at bottom right, rgba(38,61,131,0.2), transparent 70%);
    pointer-events: none;
    border-radius: 0 0 12px 0;
}

/* =============================================
   TRIGGER BUTTON  (shortcode / .coq-trigger)
   ============================================= */
button.coq-trigger,
button.coq-trigger.elementor-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent !important;
    border: 2px solid #fff !important;
    padding: 16px 36px;
    color: #fff !important;
    font-family: 'Oxanium', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
button.coq-trigger:hover,
button.coq-trigger:focus,
button.coq-trigger:active,
button.coq-trigger.elementor-button:hover,
button.coq-trigger.elementor-button:focus,
button.coq-trigger.elementor-button:active {
    background: rgba(255,255,255,0.12) !important;
    border-color: #fff !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
button.coq-trigger:active,
button.coq-trigger.elementor-button:active {
    transform: translateY(0);
    box-shadow: none;
}
