/* Podcast Player Component Styles */

.podcast-player {
    background-color: #2d2d2d;
    overflow: hidden;
    color: #fff;
    font-family: var(--font-sans, sans-serif);
    max-width: 400px;
    display: flex;
    flex-direction: column;
}

.podcast-player__header {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 16px;
    flex: 1;
}

.podcast-player__thumbnail {
    width: clamp(80px, 35%, 160px);
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}

.podcast-player__thumbnail--play {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.podcast-player__info {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.podcast-player__category {
    font-size: 0.8rem;
    color: #ccc;
    text-transform: capitalize;
    margin: 0;
}

.podcast-player__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

/* Controls bar at the bottom */
.podcast-player__controls {
    background-color: #1a1a1a;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.podcast-player__time {
    font-size: 0.75rem;
    color: #ccc;
    flex-shrink: 0;
    min-width: 32px;
    font-variant-numeric: tabular-nums;
}

.podcast-player__progress-wrap {
    flex: 1;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.podcast-player__progress-track {
    width: 100%;
    height: 4px;
    background-color: #555;
    position: relative;
    overflow: hidden;
}

.podcast-player__progress-fill {
    height: 100%;
    background-color: #c0392b;
    width: 0%;
    transition: width 0.1s linear;
}

.podcast-player__volume-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.podcast-player__volume-btn:hover {
    color: #fff;
}

.podcast-player__play-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 1.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.podcast-player__play-btn:hover {
    color: #c0392b;
}

.podcast-player__play-btn.is-buffering i {
    animation: podcast-spinner 1s linear infinite;
}

.podcast-player__play-btn.is-buffering i::before {
    content: "\F12E"; /* bi-arrow-clockwise */
}

@keyframes podcast-spinner {
    to { transform: rotate(360deg); }
}

.podcast-player__volume-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.podcast-player__volume-slider {
    width: 60px;
    height: 4px;
    cursor: pointer;
    accent-color: #c0392b;
    background: #555;
    outline: none;
    -webkit-appearance: none;
}

.podcast-player__volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    cursor: pointer;
}

.podcast-player__volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    cursor: pointer;
    border: none;
}

/* Full-width variant for list page / standalone */
.podcast-player--full {
    max-width: 100%;
}

/* Compact variant for course page float */
.podcast-player--compact {
    max-width: 320px;
}

@media (max-width: 767.98px) {
    .podcast-player--compact {
        max-width: 100%;
    }
}

/* Carousel wrapper */
.podcast-carousel {
    position: relative;
}

.podcast-carousel__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 4px;
}

.podcast-carousel__track::-webkit-scrollbar {
    display: none;
}

.podcast-carousel__item {
    flex: 0 0 calc(33.333% - 11px);
    scroll-snap-align: start;
    min-width: 280px;
}

@media (max-width: 991.98px) {
    .podcast-carousel__item {
        flex: 0 0 calc(50% - 8px);
    }
}

@media (max-width: 575.98px) {
    .podcast-carousel__item {
        flex: 0 0 90%;
    }
}

.podcast-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    color: #333;
    font-size: 1.2rem;
}

.podcast-carousel__nav:hover {
    background: #fff;
}

.podcast-carousel__nav--prev {
    left: -12px;
}

.podcast-carousel__nav--next {
    right: -12px;
}

.podcast-carousel__nav:disabled {
    opacity: 0.3;
    cursor: default;
}
