/**
 * Podcast Plugin - Player Styles
 * @package Podcast
 */

/* Player Container */
.podcast-player {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.podcast-player * {
    box-sizing: border-box;
}

/* Cover */
.podcast-player__cover {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.podcast-player__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.podcast-player__cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.podcast-player__cover-placeholder .dashicons {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.8);
}

/* Info */
.podcast-player__info {
    flex: 1;
    min-width: 0;
}

.podcast-player__show {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.podcast-player__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podcast-player__episode-num {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* Controls */
.podcast-player__controls {
    width: 100%;
    margin-top: 20px;
}

/* Progress Bar */
.podcast-player__progress {
    margin-bottom: 16px;
}

.podcast-player__progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.podcast-player__progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #667eea;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.podcast-player__progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.podcast-player__times {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-variant-numeric: tabular-nums;
}

/* Buttons */
.podcast-player__buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.podcast-player__btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.podcast-player__btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.podcast-player__btn:active {
    transform: scale(0.95);
}

.podcast-player__btn--play {
    width: 64px;
    height: 64px;
    background: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.podcast-player__btn--play:hover {
    background: #5a6fd6;
}

.podcast-player__btn--rewind,
.podcast-player__btn--forward {
    width: 44px;
    height: 44px;
}

/* Actions */
.podcast-player__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.podcast-player__btn--speed {
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
}

/* Volume */
.podcast-player__volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.podcast-player__volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.podcast-player__volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

/* Chapters */
.podcast-player__chapters {
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.podcast-player__chapters-toggle {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.podcast-player__chapters-toggle:hover {
    color: #fff;
}

.podcast-player__chapters-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
}

.podcast-player__chapter {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.podcast-player__chapter:hover {
    background: rgba(255, 255, 255, 0.05);
}

.podcast-player__chapter.active {
    color: #667eea;
}

.podcast-player__chapter-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    width: 60px;
    font-variant-numeric: tabular-nums;
}

.podcast-player__chapter-title {
    font-size: 14px;
}

/* Hidden audio element */
.podcast-player__audio {
    display: none;
}

/* Locked Player */
.podcast-player--locked {
    position: relative;
}

.podcast-player__lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.podcast-player__lock-overlay svg {
    color: rgba(255, 255, 255, 0.8);
}

.podcast-player__lock-message {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin: 12px 0;
}

.podcast-player__login-btn,
.podcast-player__upgrade-btn {
    display: inline-block;
    background: #667eea;
    color: #fff;
    padding: 10px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.podcast-player__login-btn:hover,
.podcast-player__upgrade-btn:hover {
    background: #5a6fd6;
    color: #fff;
}

/* Default Style Layout */
.podcast-player--default {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.podcast-player--default .podcast-player__cover {
    width: 120px;
    height: 120px;
}

.podcast-player--default .podcast-player__info {
    flex: 1;
    min-width: 200px;
}

.podcast-player--default .podcast-player__controls {
    width: 100%;
}

/* Compact Style */
.podcast-player--compact {
    padding: 16px;
}

.podcast-player--compact .podcast-player__cover {
    width: 60px;
    height: 60px;
}

.podcast-player--compact .podcast-player__title {
    font-size: 14px;
}

.podcast-player--compact .podcast-player__btn--play {
    width: 48px;
    height: 48px;
}

/* Responsive */
@media (max-width: 600px) {
    .podcast-player {
        padding: 16px;
    }

    .podcast-player--default {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .podcast-player__cover {
        width: 150px !important;
        height: 150px !important;
    }

    .podcast-player__volume-slider {
        display: none;
    }
}
