/**
 * Ez Church Elementor Frontend Styles
 * 
 * Optimized for audio sermon browsing and playback
 * Classic church aesthetic with modern UX
 */

:root {
    --ezchurch-primary: #2c5f2d;
    --ezchurch-primary-dark: #1a3a1b;
    --ezchurch-primary-light: #4a8a4d;
    --ezchurch-accent: #d4af37;
    --ezchurch-text: #333333;
    --ezchurch-text-light: #666666;
    --ezchurch-border: #e0e0e0;
    --ezchurch-bg: #ffffff;
    --ezchurch-bg-alt: #f9f9f9;
}

/* ========================================
   Sermon Audio List Layout
   ======================================== */

.ezchurch-sermon-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ezchurch-sermon-item {
    background: var(--ezchurch-bg);
    border: 1px solid var(--ezchurch-border);
    border-radius: var(--border-radius, 8px);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.ezchurch-sermon-item:hover {
    box-shadow: 0 4px 12px rgba(44, 95, 45, 0.1);
    border-color: var(--ezchurch-primary-light);
    transform: translateY(-2px);
}

.ezchurch-sermon-item.playing {
    border-color: var(--ezchurch-primary);
    background: linear-gradient(to right, rgba(44, 95, 45, 0.05), transparent);
}

/* Sermon Header */
.ezchurch-sermon-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.ezchurch-sermon-play-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ezchurch-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
}

.ezchurch-sermon-play-btn:hover {
    background: var(--ezchurch-primary-dark);
    transform: scale(1.1);
}

.ezchurch-sermon-play-btn.playing {
    background: var(--ezchurch-accent);
}

.ezchurch-sermon-info {
    flex: 1;
    min-width: 0;
}

.ezchurch-sermon-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ezchurch-text);
    margin: 0 0 4px 0;
    font-family: Georgia, serif;
}

.ezchurch-sermon-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ezchurch-sermon-title a:hover {
    color: var(--ezchurch-primary);
}

.ezchurch-sermon-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: var(--ezchurch-text-light);
    align-items: center;
}

.ezchurch-sermon-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ezchurch-sermon-meta-item i {
    color: var(--ezchurch-primary);
}

.ezchurch-sermon-speaker {
    font-weight: 600;
    color: var(--ezchurch-primary);
}

.ezchurch-sermon-series {
    background: var(--ezchurch-bg-alt);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Audio Player */
.ezchurch-audio-player {
    margin-top: 12px;
    padding: 12px;
    background: var(--ezchurch-bg-alt);
    border-radius: 6px;
    display: none;
}

.ezchurch-sermon-item.playing .ezchurch-audio-player {
    display: block;
}

.ezchurch-audio-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ezchurch-audio-progress {
    flex: 1;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.ezchurch-audio-progress-bar {
    height: 100%;
    background: var(--ezchurch-primary);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.ezchurch-audio-time {
    font-size: 12px;
    color: var(--ezchurch-text-light);
    min-width: 45px;
    text-align: center;
}

.ezchurch-audio-volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ezchurch-volume-slider {
    width: 80px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    cursor: pointer;
}

/* Download Button */
.ezchurch-sermon-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--ezchurch-bg-alt);
    border: 1px solid var(--ezchurch-border);
    border-radius: 4px;
    color: var(--ezchurch-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ezchurch-sermon-download:hover {
    background: var(--ezchurch-primary);
    color: white;
    border-color: var(--ezchurch-primary);
}

/* ========================================
   Sermon Series Grid
   ======================================== */

.ezchurch-series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ezchurch-series-card {
    background: var(--ezchurch-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ezchurch-series-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(44, 95, 45, 0.15);
}

.ezchurch-series-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.ezchurch-series-content {
    padding: 20px;
}

.ezchurch-series-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
    font-family: Georgia, serif;
    color: var(--ezchurch-text);
}

.ezchurch-series-description {
    font-size: 14px;
    color: var(--ezchurch-text-light);
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.ezchurch-series-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--ezchurch-primary);
    font-weight: 600;
}

/* ========================================
   Sermon Filters
   ======================================== */

.ezchurch-sermon-filters {
    background: var(--ezchurch-bg-alt);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 32px;
}

.ezchurch-filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.ezchurch-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ezchurch-filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ezchurch-text);
}

.ezchurch-filter-input,
.ezchurch-filter-select {
    padding: 10px 12px;
    border: 1px solid var(--ezchurch-border);
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
}

.ezchurch-filter-input:focus,
.ezchurch-filter-select:focus {
    outline: none;
    border-color: var(--ezchurch-primary);
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

.ezchurch-filter-btn {
    padding: 10px 24px;
    background: var(--ezchurch-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ezchurch-filter-btn:hover {
    background: var(--ezchurch-primary-dark);
}

.ezchurch-filter-reset {
    background: transparent;
    color: var(--ezchurch-text-light);
    border: 1px solid var(--ezchurch-border);
}

.ezchurch-filter-reset:hover {
    background: var(--ezchurch-bg-alt);
    color: var(--ezchurch-text);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .ezchurch-sermon-header {
        flex-direction: column;
    }
    
    .ezchurch-sermon-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .ezchurch-series-grid {
        grid-template-columns: 1fr;
    }
    
    .ezchurch-filters-row {
        grid-template-columns: 1fr;
    }
    
    .ezchurch-audio-controls {
        flex-wrap: wrap;
    }
}

/* ========================================
   Loading States
   ======================================== */

.ezchurch-loading {
    text-align: center;
    padding: 40px;
    color: var(--ezchurch-text-light);
}

.ezchurch-loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--ezchurch-border);
    border-top-color: var(--ezchurch-primary);
    border-radius: 50%;
    animation: ezchurch-spin 0.8s linear infinite;
}

@keyframes ezchurch-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Empty States
   ======================================== */

.ezchurch-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--ezchurch-text-light);
}

.ezchurch-no-results-icon {
    font-size: 48px;
    color: var(--ezchurch-border);
    margin-bottom: 16px;
}

.ezchurch-no-results-text {
    font-size: 18px;
    margin: 0;
}
