/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-overlay.closing {
    opacity: 0;
}

/* Modal Content Box */
.modal-content {
    background-color: #111827;
    border: 2px solid #F4A261;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    animation: modalSlideIn 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    color: #F4A261;
    transform: rotate(90deg);
}

.modal-close-btn:focus {
    outline: 2px solid #F4A261;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Product Image */
.modal-product-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto 24px;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.5s ease;
}

.modal-product-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(244, 162, 97, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Social Proof */
.social-proof {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #D1D5DB;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* Temporal Anchor */
.temporal-anchor {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #F4A261;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

.temporal-anchor .percentage {
    font-size: 1.3rem;
    font-weight: 700;
}

/* Description */
.modal-description {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #F3F4F6;
    text-align: center;
    line-height: 1.8;
    margin-bottom: 28px;
}

/* CTA Button (Solid Orange) */
.cta-button-solid {
    display: block;
    width: 100%;
    background-color: #F4A261;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.4);
    margin-bottom: 16px;
}

.cta-button-solid:hover {
    background-color: #E8935A;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(244, 162, 97, 0.5);
}

.cta-button-solid:active {
    transform: translateY(0);
}

/* Disclaimer */
.modal-disclaimer {
    display: block;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #9CA3AF;
    opacity: 0.8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modal-content {
        padding: 24px 20px;
        max-width: 95%;
    }

    .modal-product-image {
        max-width: 220px;
    }

    .temporal-anchor {
        font-size: 1rem;
    }

    .temporal-anchor .percentage {
        font-size: 1.15rem;
    }

    .modal-description {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 20px 16px;
    }

    .modal-product-image {
        max-width: 180px;
    }

    .cta-button-solid {
        font-size: 0.95rem;
        padding: 12px 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
    .modal-content {
        background-color: #FFFFFF;
        border-color: #F4A261;
    }

    .modal-close-btn {
        color: #6B7280;
    }

    .social-proof {
        color: #6B7280;
    }

    .modal-description {
        color: #111827;
    }

    .modal-disclaimer {
        color: #6B7280;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .modal-content,
    .modal-product-image,
    .modal-close-btn,
    .cta-button-solid {
        animation: none !important;
        transition: none !important;
    }
}

/* Scrollbar Styling (for modal content) */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #1F2937;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #F4A261;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #E8935A;
}