/**
 * DailyZohar Parasha Video Player Styles
 * 
 * INSTALLATION: Place this file in /wp-content/themes/your-theme/css/
 * Or copy contents to your DIVI custom CSS
 */

/* Container */
.dz-parasha-player {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Header */
.dz-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #d4af37; /* Gold border */
}

.dz-parasha-title {
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.dz-name-hebrew {
    display: block;
    font-size: 2.5em;
    color: #1a3a5c; /* Deep blue */
    font-weight: 600;
    margin-bottom: 5px;
    direction: rtl;
}

.dz-name-english {
    display: block;
    font-size: 1.5em;
    color: #555;
    font-weight: 400;
}

.dz-shabbat-info {
    color: #666;
    font-size: 1.1em;
    margin-top: 10px;
}

/* Language Selector */
.dz-language-selector {
    text-align: center;
    margin-bottom: 20px;
}

.dz-language-selector label {
    margin-right: 10px;
    font-weight: 500;
    color: #333;
}

.dz-language-selector select {
    padding: 8px 15px;
    font-size: 1em;
    border: 2px solid #1a3a5c;
    border-radius: 5px;
    background: white;
    color: #1a3a5c;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dz-language-selector select:hover,
.dz-language-selector select:focus {
    border-color: #d4af37;
    outline: none;
}

/* Video Container */
.dz-video-container {
    margin-bottom: 25px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dz-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.dz-vimeo-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.dz-no-video {
    padding: 60px 20px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #1a3a5c 0%, #2c5282 100%);
}

.dz-no-video p {
    margin: 0;
    font-size: 1.2em;
}

/* Navigation */
.dz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.dz-nav-btn {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 120px;
}

.dz-nav-btn.dz-prev,
.dz-nav-btn.dz-next {
    background: #f5f5f5;
    color: #1a3a5c;
    flex: 1;
}

.dz-nav-btn.dz-prev:hover,
.dz-nav-btn.dz-next:hover {
    background: #1a3a5c;
    color: #fff;
}

.dz-nav-btn.dz-prev {
    justify-content: flex-start;
}

.dz-nav-btn.dz-next {
    justify-content: flex-end;
    text-align: right;
}

.dz-nav-btn.dz-current {
    background: #d4af37;
    color: #fff;
    font-weight: 600;
    justify-content: center;
    min-width: 140px;
}

.dz-nav-btn.dz-current:hover {
    background: #b8962e;
}

.dz-nav-arrow {
    font-size: 1.5em;
    font-weight: bold;
}

.dz-prev .dz-nav-arrow {
    margin-right: 10px;
}

.dz-next .dz-nav-arrow {
    margin-left: 10px;
}

.dz-nav-text {
    display: flex;
    flex-direction: column;
}

.dz-nav-text small {
    font-size: 0.75em;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dz-nav-text span:not(.dz-nav-arrow) {
    font-size: 1.1em;
    font-weight: 500;
}

/* Parasha Selector */
.dz-parasha-selector {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 25px;
}

.dz-parasha-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.dz-parasha-selector select {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.dz-parasha-selector select:hover,
.dz-parasha-selector select:focus {
    border-color: #1a3a5c;
    outline: none;
}

.dz-parasha-selector select optgroup {
    font-weight: bold;
    color: #1a3a5c;
}

/* All Names Display */
.dz-all-names {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #d4af37;
}

.dz-all-names h3 {
    margin: 0 0 15px 0;
    color: #1a3a5c;
    font-size: 1.2em;
}

.dz-all-names ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.dz-all-names li {
    padding: 8px 12px;
    background: white;
    border-radius: 5px;
    font-size: 0.95em;
}

.dz-all-names li strong {
    color: #1a3a5c;
}

/* Error State */
.dz-error {
    padding: 40px 20px;
    text-align: center;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    color: #856404;
}

/* Page Container (for template use) */
.dz-page-container {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dz-parasha-player {
        padding: 15px;
    }
    
    .dz-name-hebrew {
        font-size: 2em;
    }
    
    .dz-name-english {
        font-size: 1.2em;
    }
    
    .dz-navigation {
        flex-direction: column;
    }
    
    .dz-nav-btn {
        justify-content: center !important;
        text-align: center !important;
    }
    
    .dz-nav-btn.dz-prev,
    .dz-nav-btn.dz-next {
        order: 2;
    }
    
    .dz-nav-btn.dz-current {
        order: 1;
    }
    
    .dz-all-names ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dz-name-hebrew {
        font-size: 1.6em;
    }
    
    .dz-name-english {
        font-size: 1em;
    }
    
    .dz-nav-arrow {
        font-size: 1.2em;
    }
}

/* RTL Support for Hebrew */
[dir="rtl"] .dz-parasha-player,
.dz-parasha-player[data-language="hebrew"] {
    direction: rtl;
}

[dir="rtl"] .dz-nav-btn.dz-prev {
    flex-direction: row-reverse;
}

[dir="rtl"] .dz-nav-btn.dz-next {
    flex-direction: row-reverse;
}

/* Print Styles */
@media print {
    .dz-navigation,
    .dz-language-selector,
    .dz-parasha-selector {
        display: none;
    }
    
    .dz-video-container {
        background: #f5f5f5;
        padding: 20px;
    }
    
    .dz-video-wrapper {
        display: none;
    }
    
    .dz-video-container::after {
        content: "Video available at DailyZohar.com";
        display: block;
        text-align: center;
        padding: 40px;
    }
}

/* DIVI Compatibility */
.et_pb_section .dz-parasha-player {
    max-width: 100%;
}

.et_pb_row .dz-video-wrapper {
    padding-bottom: 56.25% !important;
}
