/* ===== ADVANCED MODAL STYLES ===== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Modal Base */
.offer-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    background: #171717;
    border-radius: 20px;
    border: 1px solid rgba(255, 105, 180, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(255, 105, 180, 0.1);
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    display: none;
}

.offer-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Modal Content */
.modal-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Modal Image (Optional) */
.modal-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.modal-offer-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.modal-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #171717);
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 16px;
}

.modal-close:hover {
    background: rgba(255, 105, 180, 0.2);
    transform: scale(1.1);
    color: #ff69b4;
}

.modal-close:focus {
    outline: 2px solid #ff69b4;
    outline-offset: 2px;
}

/* Modal Header */
.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.05), rgba(138, 43, 226, 0.05));
}

.modal-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.modal-price {
    color: #ff69b4;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-price::before {
    content: '💰';
    font-size: 0.875rem;
}

/* Modal Body */
.modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ff69b4 rgba(255, 255, 255, 0.1);
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #ff69b4;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #e91e63;
}

.modal-body h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body h4::before {
    content: '✨';
    font-size: 0.875rem;
}

.modal-body ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.modal-body li {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
    transition: color 0.2s ease;
}

.modal-body li:hover {
    color: rgba(255, 255, 255, 1);
}

.modal-body li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #ff69b4;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 105, 180, 0.1);
    border: 1px solid rgba(255, 105, 180, 0.3);
}

.modal-body p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-body strong {
    color: #ff69b4;
    font-weight: 600;
}

/* Modal Footer */
.modal-footer {
    padding: 1rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.modal-footer .cta-button {
    width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    background: linear-gradient(135deg, #ff69b4, #8a2be2);
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.modal-footer .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.4);
}

.modal-footer .cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.modal-footer .cta-button:hover::before {
    left: 100%;
}

/* Image Modal Specific */
.image-modal {
    max-width: 90vw;
    max-height: 90vh;
    background: transparent;
    border: none;
    box-shadow: none;
}

.image-modal-content {
    background: transparent;
    padding: 0;
}

.image-modal .image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-full-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
}

/* Animation Classes */
@keyframes animate-modal-enter {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes animate-modal-exit {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

@keyframes animate-slide-down {
    0% {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes animate-slide-up {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.animate-modal-enter {
    animation: animate-modal-enter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-modal-exit {
    animation: animate-modal-exit 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-down {
    animation: animate-slide-down 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-slide-up {
    animation: animate-slide-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Body lock when modal is open */
.modal-open {
    overflow: hidden !important;
    padding-right: var(--scrollbar-width, 0);
}

/* Focus styles */
.offer-modal:focus {
    outline: 2px solid #ff69b4;
    outline-offset: -2px;
}

.modal-content button:focus,
.modal-content a:focus {
    outline: 2px solid #ff69b4;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Dark mode enhancements */
[data-theme="dark"] .modal-header {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.08), rgba(138, 43, 226, 0.08));
}

[data-theme="dark"] .modal-footer {
    background: rgba(255, 255, 255, 0.03);
}

/* Light mode support */
[data-theme="light"] .offer-modal {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .modal-header {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.1), rgba(138, 43, 226, 0.1));
}

[data-theme="light"] .modal-header h3 {
    color: #1a1a1a;
}

[data-theme="light"] .modal-body {
    color: #1a1a1a;
}

[data-theme="light"] .modal-body li {
    color: rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .modal-body p {
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .modal-footer {
    background: rgba(0, 0, 0, 0.02);
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .offer-modal {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body h4 {
        font-size: 1rem;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .offer-modal {
        width: 98%;
        max-height: 98vh;
        border-radius: 12px;
    }

    .modal-header {
        padding: 1.5rem 1rem 1rem;
    }

    .modal-body {
        padding: 1.5rem 1rem;
    }

    .modal-footer {
        padding: 1rem 1rem 1.5rem;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-body li {
        padding-left: 1.5rem;
        font-size: 0.9rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .offer-modal {
        border: 2px solid #ff69b4;
    }

    .modal-close {
        border: 2px solid white;
    }

    .modal-body li::before {
        background: #ff69b4;
        color: white;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .offer-modal,
    .modal-overlay,
    .modal-close,
    .modal-footer .cta-button {
        transition: none;
        animation: none;
    }

    .offer-modal.active {
        transform: translate(-50%, -50%);
    }

    .animate-modal-enter,
    .animate-modal-exit,
    .animate-slide-down,
    .animate-slide-up {
        animation: none;
    }
}

/* Print styles */
@media print {
    .modal-overlay,
    .offer-modal {
        display: none !important;
    }
} 