/* Enhanced Podcast Episode Styles */

/* MP3 Player Block */
.podcast-mp3-player {
    margin: 1.5rem 0;
}

.podcast-mp3-player iframe,
.podcast-mp3-player script + iframe {
    max-width: 100%;
    height: auto;
}

/* YouTube Player Block */
.podcast-youtube-player {
    margin: 1.5rem 0;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.youtube-subscribe {
    text-align: center;
    margin-top: 1rem;
}

.youtube-subscribe-button {
    background: #ff0000 !important;
    color: white !important;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.youtube-subscribe-button:hover {
    background: #cc0000 !important;
    color: white !important;
}

.youtube-subscribe-button::before {
    content: "▶";
    font-size: 14px;
}

/* Transcript Block */
.podcast-transcript {
    margin: 2rem 0;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #f8f9fa;
}

.podcast-transcript summary {
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    background: #ffffff;
    border-radius: 8px;
    margin: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
}

.podcast-transcript summary:hover {
    background: #f1f3f4;
}

.podcast-transcript summary::before {
    content: "▶";
    font-size: 0.8em;
    transition: transform 0.2s ease;
    color: #666;
}

.podcast-transcript[open] summary::before {
    transform: rotate(90deg);
}

.podcast-transcript summary::-webkit-details-marker {
    display: none;
}

.podcast-transcript > *:not(summary) {
    padding: 0 1.5rem 1.5rem;
    line-height: 1.7;
    color: #444;
}

.podcast-transcript p {
    margin-bottom: 1rem;
}

.podcast-transcript p:last-child {
    margin-bottom: 0;
}

/* Block Editor Previews */
.podcast-mp3-player-preview,
.podcast-youtube-player-preview,
.podcast-transcript-preview {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 1rem 0;
}

.podcast-mp3-player-preview .placeholder-player,
.podcast-youtube-player-preview .placeholder-video {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #eee;
    margin: 10px 0;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-responsive {
        padding-bottom: 75%; /* Adjust for mobile */
    }
    
    .youtube-subscribe-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .podcast-transcript summary,
    .podcast-transcript > *:not(summary) {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Integration with Twenty Twenty-Five theme */
.wp-block-group .podcast-mp3-player,
.wp-block-group .podcast-youtube-player,
.wp-block-group .podcast-transcript {
    margin-top: 0;
}

/* Font Awesome Icons Support */
.podcast-subscribe-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.podcast-subscribe-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    color: white;
    transition: opacity 0.2s ease;
    border: none;
    cursor: pointer;
}

.podcast-subscribe-buttons .btn:hover {
    opacity: 0.9;
    color: white;
}

.podcast-subscribe-buttons .btn i {
    font-size: 1.1em;
}

/* Accessibility */
.podcast-transcript[open] {
    outline: 2px solid transparent;
}

.podcast-transcript summary:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.youtube-subscribe-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Dark mode support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .podcast-transcript {
        background: #1a1a1a;
        border-color: #333;
        color: #e0e0e0;
    }
    
    .podcast-transcript summary {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    .podcast-transcript summary:hover {
        background: #333;
    }
    
    .podcast-transcript > *:not(summary) {
        color: #ccc;
    }
}