/**
 * Popup Styles
 * Les Robes Infidèles Theme
 */

/* Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                backdrop-filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(5px);
}

/* Popup Container */
.popup-container {
    position: relative;
    background: #fff;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    border-radius: 0px;
    transform: scale(0.7) translateY(-30px);
    opacity: 0;
    padding: 30px;
}

.popup-overlay.active .popup-container {
    animation: popupSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.popup-overlay.closing .popup-container {
    animation: popupSlideOut 0.5s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes popupSlideIn {
    0% {
        transform: scale(0.7) translateY(-30px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes popupSlideOut {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(0.7) translateY(30px);
        opacity: 0;
    }
}

/* Close Button */
.popup-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: #fff;
    border: 1px solid var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--accent-color);
    font-size: 1.5rem;
    line-height: 1;
    z-index: 10;
}

.popup-close:hover {
    transform: rotate(90deg);
}

.popup-close:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Popup Body */
.popup-body {
    color: var(--accent-color);
}

.popup-content {
    font-size: 1.2em;
    line-height: 1.6;
    border: 1px dashed var(--accent-color);
    padding: 30px;
}

.popup-content p {
    margin-bottom: 1rem;
}

.popup-content p:last-child {
    margin-bottom: 0;
}

.popup-content h1,
.popup-content h2,
.popup-content h3,
.popup-content h4,
.popup-content h5,
.popup-content h6 {
    font-family: 'Playfair Display', serif;
    color: #C85A28;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.popup-content h1 {
    font-size: 2rem;
}

.popup-content h2 {
    font-size: 1.75rem;
}

.popup-content h3 {
    font-size: 1.5rem;
}

.popup-content a {
    color: #C85A28;
    text-decoration: none;
    border-bottom: 1px solid #C85A28;
    transition: all 0.3s ease;
}

.popup-content a:hover {
    color: #a04820;
    border-bottom-color: #a04820;
}

.popup-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
}

.popup-content ul,
.popup-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.popup-content li {
    margin-bottom: 0.5rem;
}

/* Popup Footer (optional) */
.popup-footer {
    padding: 1.5rem 3rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    background: #f8f8f8;
    border-radius: 0 0 10px 10px;
}

.popup-footer button {
    background: #C85A28;
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-footer button:hover {
    background: #a04820;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200, 90, 40, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .popup-container {
        width: 80%;
        max-height: 90vh;
    }
    
    .popup-body {
        padding: 0;
    }
    
    .popup-footer {
        padding: 1rem 2rem;
    }
    
    .popup-close {
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .popup-close{
        top: -20px;
        right: -20px;
    }
    
    .popup-body {
        padding: 0;
    }
    
    .popup-footer {
        padding: 0.75rem 1.5rem;
    }
    
    .popup-content {
        font-size: 0.9rem;
    }
}

/* Accessibility */
.popup-overlay:focus-within .popup-container {
    outline: 2px solid #C85A28;
    outline-offset: 4px;
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
}

/* Animation for closing */
.popup-overlay.closing {
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.6, 1), 
                visibility 0s 0.5s;
}
