/**
 * RMWF Film Modal Styles
 */

/* Modal Container */
.rmwf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rmwfFadeIn 0.3s ease;
}

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

/* Overlay */
.rmwf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

/* Modal Content Container */
.rmwf-modal-container {
    position: relative;
    background: white;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: rmwfSlideUp 0.3s ease;
}

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

/* Close Button */
.rmwf-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.rmwf-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.rmwf-modal-close svg {
    width: 20px;
    height: 20px;
}

/* Loading State */
.rmwf-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px;
}

.rmwf-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: rmwfSpin 1s linear infinite;
}

@keyframes rmwfSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Content */
.rmwf-modal-content {
    position: relative;
}

.rmwf-modal-loaded {
    display: flex;
    flex-direction: column;
}

/* Image */
.rmwf-modal-image-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #000;
}

.rmwf-modal-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Info Section */
.rmwf-modal-info {
    padding: 40px;
}

.rmwf-modal-info h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #2c3e50;
    line-height: 1.2;
}

/* Meta Info */
.rmwf-modal-meta {
    margin-bottom: 20px;
}

.rmwf-film-length {
    display: inline-block;
    color: #e74c3c;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Excerpt */
.rmwf-film-excerpt {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
}

/* Screening Section */
.rmwf-screening-section {
    margin-bottom: 30px;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
}

.rmwf-screening-title {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 15px 0;
}

.rmwf-screenings-list > div {
    margin-bottom: 12px;
    font-size: 15px;
    color: #2c3e50;
    line-height: 1.6;
}

/* Learn More Button */
.rmwf-btn-learn-more {
    display: inline-block;
    padding: 14px 32px;
    background: #e74c3c;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.rmwf-btn-learn-more:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* Error State */
.rmwf-modal-error {
    padding: 60px 40px;
    text-align: center;
}

.rmwf-modal-error p {
    font-size: 16px;
    color: #e74c3c;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rmwf-modal-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 4px;
    }
    
    .rmwf-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
    
    .rmwf-modal-info {
        padding: 24px;
    }
    
    .rmwf-modal-info h2 {
        font-size: 24px;
    }
    
    .rmwf-film-excerpt {
        font-size: 15px;
    }
    
    .rmwf-btn-learn-more {
        display: block;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .rmwf-modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .rmwf-modal-info {
        padding: 20px;
    }
    
    .rmwf-modal-info h2 {
        font-size: 22px;
    }
}

/* Smooth Scrolling */
.rmwf-modal-container {
    scrollbar-width: thin;
    scrollbar-color: #e74c3c #f0f0f0;
}

.rmwf-modal-container::-webkit-scrollbar {
    width: 8px;
}

.rmwf-modal-container::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.rmwf-modal-container::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 4px;
}

.rmwf-modal-container::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}
