/**
 * VOD Grid Styles
 *
 * Provides styling for all 6 VOD display skins:
 * grid, list, carousel, overlay, overlay-carousel, minimal.
 *
 * Uses CSS custom properties for easy theming via shortcode
 * attributes, Elementor controls, and Gutenberg block settings.
 *
 * @package Tvstartup_OTT_Platform
 * @since   1.8.0
 */

/* ==========================================================================
   CSS Custom Properties (Defaults)
   ========================================================================== */

.ts-ott-vods {
    --ts-ott-font-family: inherit;
    --ts-ott-title-color: #1a1a2e;
    --ts-ott-desc-color: #6b7280;
    --ts-ott-bg-color: #ffffff;
    --ts-ott-accent-color: #6366f1;
    --ts-ott-border-radius: 12px;
    --ts-ott-card-padding: 1rem;
    --ts-ott-card-spacing: 1.25rem;
    /*
     * Note: --ts-ott-columns is intentionally NOT declared here so that
     * an inline style on the parent .ts-ott-vods-wrapper (set by the
     * shortcode / Elementor widget / Gutenberg block) can cascade down
     * to this element. The default fallback (3) is provided in the
     * var() consumers below. Responsive @media rules further down still
     * win on mobile because they target .ts-ott-vods--grid (etc.) directly.
     */
    --ts-ott-transition: 0.25s ease;

    font-family: var(--ts-ott-font-family);
    box-sizing: border-box;
    width: 100%;
}

.ts-ott-vods *,
.ts-ott-vods *::before,
.ts-ott-vods *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Category Sections
   ========================================================================== */

.ts-ott-vods-wrapper {
    font-family: var(--ts-ott-font-family, inherit);
    box-sizing: border-box;
    width: 100%;
}

.ts-ott-vod-category {
    margin-bottom: 2.5rem;
}

.ts-ott-vod-category:last-child {
    margin-bottom: 0;
}

.ts-ott-vod-category__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ts-ott-category-title-color, var(--ts-ott-title-color, #1a1a2e));
    margin: 0 0 1rem 0;
    padding-bottom: 0;
    font-family: var(--ts-ott-font-family, inherit);
    line-height: 1.3;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.ts-ott-vods--empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ts-ott-desc-color);
    font-size: 1rem;
}

/* ==========================================================================
   VOD Card Link Wrapper
   ========================================================================== */

.ts-ott-vod-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    min-width: 0;
    overflow: hidden;
}

.ts-ott-vod-card-link:hover,
.ts-ott-vod-card-link:focus,
.ts-ott-vod-card-link:active {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   VOD Card (Base Styles)
   ========================================================================== */

.ts-ott-vod-card {
    background-color: var(--ts-ott-bg-color);
    border-radius: var(--ts-ott-border-radius);
    overflow: hidden;
    transition: transform var(--ts-ott-transition),
                box-shadow var(--ts-ott-transition);
    position: relative;
    min-width: 0;
}

.ts-ott-vod-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* --- Thumbnail --- */

.ts-ott-vod-card__thumbnail {
    position: relative;
    overflow: hidden;
    background-color: #f3f4f6;
    aspect-ratio: 16 / 9;
}

.ts-ott-vod-card__thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ts-ott-transition);
}

.ts-ott-vod-card:hover .ts-ott-vod-card__thumbnail img {
    transform: scale(1.05);
}

.ts-ott-vod-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background-color: #f3f4f6;
    color: #d1d5db;
}

/* --- Duration Badge --- */

.ts-ott-vod-card__duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.1875rem 0.5rem;
    border-radius: 4px;
    line-height: 1.4;
    z-index: 5;
    letter-spacing: 0.025em;
}

/* --- Content --- */

.ts-ott-vod-card__content {
    padding: var(--ts-ott-card-padding);
}

.ts-ott-vod-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ts-ott-title-color);
    margin: 0 0 0.375rem 0;
    line-height: 1.3;
    font-family: var(--ts-ott-font-family);
}

.ts-ott-vod-card__desc {
    font-size: 0.875rem;
    color: var(--ts-ott-desc-color);
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

/* --- Meta (Rating + Year) --- */

.ts-ott-vod-card__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
    color: var(--ts-ott-desc-color);
}

.ts-ott-vod-card__rating {
    display: inline-block;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--ts-ott-accent-color);
    font-weight: 600;
    padding: 0.125rem 0.4375rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.ts-ott-vod-card__year {
    display: inline-block;
    color: var(--ts-ott-desc-color);
    font-weight: 500;
    font-size: 0.75rem;
}

/* --- Genre Tags --- */

.ts-ott-vod-card__genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.ts-ott-vod-genre-tag {
    display: inline-block;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--ts-ott-accent-color);
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    line-height: 1.4;
}

/* ==========================================================================
   Skin: Grid
   ========================================================================== */

.ts-ott-vods--grid {
    display: grid;
    grid-template-columns: repeat(var(--ts-ott-columns, 3), 1fr);
    gap: var(--ts-ott-card-spacing);
}

.ts-ott-vods--grid > .ts-ott-vod-card-link {
    display: flex;
    flex-direction: column;
}

.ts-ott-vods--grid > .ts-ott-vod-card-link > .ts-ott-vod-card,
.ts-ott-vods--grid > .ts-ott-vod-card {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ts-ott-vods--grid .ts-ott-vod-card__content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ts-ott-vods--grid .ts-ott-vod-card__genres {
    margin-top: auto;
}

.ts-ott-vods--grid .ts-ott-vod-card__thumbnail {
    aspect-ratio: 16 / 9;
}

.ts-ott-vods--grid .ts-ott-vod-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Skin: List
   ========================================================================== */

.ts-ott-vods--list {
    display: flex;
    flex-direction: column;
    gap: var(--ts-ott-card-spacing);
}

.ts-ott-vods--list .ts-ott-vod-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.ts-ott-vods--list .ts-ott-vod-card__thumbnail {
    width: 240px;
    min-width: 240px;
    flex-shrink: 0;
}

.ts-ott-vods--list .ts-ott-vod-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ts-ott-vods--list .ts-ott-vod-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   Skin: Carousel
   ========================================================================== */

.ts-ott-vods--carousel {
    position: relative;
    overflow: hidden;
}

.ts-ott-vods__track {
    display: flex;
    gap: var(--ts-ott-card-spacing);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 0.5rem;
}

.ts-ott-vods__track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.ts-ott-vods--carousel .ts-ott-vod-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.ts-ott-vods--carousel .ts-ott-vod-card__thumbnail {
    aspect-ratio: 16 / 9;
}

.ts-ott-vods--carousel .ts-ott-vod-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carousel Buttons */

.ts-ott-vod-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background-color: var(--ts-ott-bg-color);
    color: var(--ts-ott-title-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--ts-ott-transition),
                box-shadow var(--ts-ott-transition),
                opacity var(--ts-ott-transition);
    opacity: 0;
    padding: 0;
}

.ts-ott-vods--carousel:hover .ts-ott-vod-carousel-btn,
.ts-ott-vods--overlay-carousel:hover .ts-ott-vod-carousel-btn,
.ts-ott-vods--detail-carousel:hover .ts-ott-vod-carousel-btn {
    opacity: 1;
}

.ts-ott-vod-carousel-btn:hover {
    background-color: var(--ts-ott-accent-color);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.ts-ott-vod-carousel-btn--prev {
    left: 12px;
}

.ts-ott-vod-carousel-btn--next {
    right: 12px;
}

.ts-ott-vod-carousel-btn svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Skin: Overlay
   ========================================================================== */

.ts-ott-vods--overlay {
    display: grid;
    grid-template-columns: repeat(var(--ts-ott-columns, 3), 1fr);
    gap: var(--ts-ott-card-spacing);
}

.ts-ott-vods--overlay .ts-ott-vod-card {
    cursor: pointer;
}

.ts-ott-vods--overlay .ts-ott-vod-card__thumbnail {
    aspect-ratio: 16 / 9;
}

.ts-ott-vods--overlay .ts-ott-vod-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ts-ott-vod-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--ts-ott-card-padding);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    color: #ffffff;
    transform: translateY(100%);
    transition: transform var(--ts-ott-transition);
}

.ts-ott-vods--overlay .ts-ott-vod-card:hover .ts-ott-vod-card__overlay {
    transform: translateY(0);
}

.ts-ott-vod-card__overlay .ts-ott-vod-card__title {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.ts-ott-vod-card__overlay .ts-ott-vod-card__desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8125rem;
    margin-bottom: 0;
}

.ts-ott-vod-card__overlay .ts-ott-vod-card__meta {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.25rem;
}

.ts-ott-vod-card__overlay .ts-ott-vod-card__rating {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.ts-ott-vod-card__overlay .ts-ott-vod-card__year {
    color: rgba(255, 255, 255, 0.8);
}

/* Duration badge on overlay thumbnail */
.ts-ott-vods--overlay .ts-ott-vod-card__duration {
    bottom: 0.5rem;
    right: 0.5rem;
}

/* ==========================================================================
   Skin: Overlay Carousel
   ========================================================================== */

.ts-ott-vods--overlay-carousel {
    position: relative;
    overflow: hidden;
}

.ts-ott-vods--overlay-carousel .ts-ott-vods__track {
    display: flex;
    gap: var(--ts-ott-card-spacing);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.ts-ott-vods--overlay-carousel .ts-ott-vods__track::-webkit-scrollbar {
    display: none;
}

.ts-ott-vods--overlay-carousel .ts-ott-vod-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    cursor: pointer;
}

.ts-ott-vods--overlay-carousel .ts-ott-vod-card__thumbnail {
    aspect-ratio: 16 / 9;
}

.ts-ott-vods--overlay-carousel .ts-ott-vod-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay text on hover */
.ts-ott-vods--overlay-carousel .ts-ott-vod-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--ts-ott-card-padding);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    color: #ffffff;
    transform: translateY(100%);
    transition: transform var(--ts-ott-transition);
}

.ts-ott-vods--overlay-carousel .ts-ott-vod-card:hover .ts-ott-vod-card__overlay {
    transform: translateY(0);
}

.ts-ott-vods--overlay-carousel .ts-ott-vod-card__overlay .ts-ott-vod-card__title {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.ts-ott-vods--overlay-carousel .ts-ott-vod-card__overlay .ts-ott-vod-card__desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8125rem;
    margin-bottom: 0;
}

.ts-ott-vods--overlay-carousel .ts-ott-vod-card__overlay .ts-ott-vod-card__meta {
    color: rgba(255, 255, 255, 0.9);
}

.ts-ott-vods--overlay-carousel .ts-ott-vod-card__overlay .ts-ott-vod-card__rating {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.ts-ott-vods--overlay-carousel .ts-ott-vod-card__overlay .ts-ott-vod-card__year {
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   Skin: Detail Carousel
   ========================================================================== */

.ts-ott-vods--detail-carousel {
    position: relative;
    overflow: hidden;
}

.ts-ott-vods--detail-carousel .ts-ott-vods__track {
    display: flex;
    gap: var(--ts-ott-card-spacing);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.ts-ott-vods--detail-carousel .ts-ott-vods__track::-webkit-scrollbar {
    display: none;
}

.ts-ott-vods--detail-carousel .ts-ott-vod-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    cursor: pointer;
}

.ts-ott-vods--detail-carousel .ts-ott-vod-card__thumbnail {
    aspect-ratio: 16 / 9;
}

.ts-ott-vods--detail-carousel .ts-ott-vod-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay text on hover */
.ts-ott-vods--detail-carousel .ts-ott-vod-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--ts-ott-card-padding);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    color: #ffffff;
    transform: translateY(100%);
    transition: transform var(--ts-ott-transition);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ts-ott-vods--detail-carousel .ts-ott-vod-card:hover .ts-ott-vod-card__overlay {
    transform: translateY(0);
}

.ts-ott-vods--detail-carousel .ts-ott-vod-card__overlay .ts-ott-vod-card__title {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.ts-ott-vods--detail-carousel .ts-ott-vod-card__overlay .ts-ott-vod-card__desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8125rem;
    margin-bottom: 0;
}

.ts-ott-vods--detail-carousel .ts-ott-vod-card__overlay .ts-ott-vod-card__meta {
    color: rgba(255, 255, 255, 0.9);
}

.ts-ott-vods--detail-carousel .ts-ott-vod-card__overlay .ts-ott-vod-card__rating {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.ts-ott-vods--detail-carousel .ts-ott-vod-card__overlay .ts-ott-vod-card__year {
    color: rgba(255, 255, 255, 0.8);
}

/* Expand button */
.ts-ott-vod-card__expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    cursor: pointer;
    padding: 0;
    margin-top: 0.5rem;
    align-self: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ts-ott-vod-card__expand-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: #fff;
}

/* Active item indicator arrow */
.ts-ott-vods--detail-carousel .ts-ott-vod-card--active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(0, 0, 0, 0.85);
    z-index: 20;
}

.ts-ott-vods--detail-carousel .ts-ott-vod-card--active .ts-ott-vod-card__overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ==========================================================================
   Detail Panel
   ========================================================================== */

.ts-ott-vod-detail {
    position: relative;
    margin-top: 1.25rem;
    border-radius: 12px;
    overflow: hidden;
    background-color: #000;
    animation: tsVodDetailSlideIn 0.35s ease-out;
}

@keyframes tsVodDetailSlideIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Background thumbnail with overlay */
.ts-ott-vod-detail__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ts-ott-vod-detail__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ts-ott-vod-detail__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(0, 0, 0, 0.97) 0%,
        rgba(0, 0, 0, 0.93) 50%,
        rgba(0, 0, 0, 0.75) 100%
    );
}

/* Close button */
.ts-ott-vod-detail__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 5;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ts-ott-vod-detail__close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Body layout */
.ts-ott-vod-detail__body {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 2rem;
    align-items: stretch;
    padding: 2rem 2.5rem;
    min-height: 220px;
    color: #fff;
}

.ts-ott-vod-detail__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Play button — pill style */
.ts-ott-vod-detail__play {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 50px;
    background: #fff;
    color: #111;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 1.25rem;
    width: fit-content;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ts-ott-vod-detail__play:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
    text-decoration: none;
    color: #111;
}

.ts-ott-vod-detail__play svg {
    flex-shrink: 0;
}

/* Title */
.ts-ott-vod-detail__title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

/* Duration */
.ts-ott-vod-detail__duration {
    font-size: 0.8125rem;
    opacity: 0.55;
    display: block;
    margin-bottom: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* Description */
.ts-ott-vod-detail__desc {
    font-size: 0.875rem;
    line-height: 1.65;
    margin: 0;
    opacity: 0.75;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Right-side thumbnail link */
.ts-ott-vod-detail__thumb-link {
    flex-shrink: 0;
    width: 300px;
    text-decoration: none;
    display: block;
}

.ts-ott-vod-detail__thumb {
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.ts-ott-vod-detail__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* ==========================================================================
   Skin: Minimal
   ========================================================================== */

.ts-ott-vods--minimal {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ts-ott-vods--minimal .ts-ott-vod-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0.75rem 0;
    border-radius: 0;
    border-bottom: 1px solid #f3f4f6;
    background: transparent;
}

.ts-ott-vods--minimal .ts-ott-vod-card:last-child {
    border-bottom: none;
}

.ts-ott-vods--minimal .ts-ott-vod-card:hover {
    transform: none;
    box-shadow: none;
    background-color: #fafafa;
}

.ts-ott-vods--minimal .ts-ott-vod-card__thumbnail {
    width: 80px;
    min-width: 80px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 1rem;
    aspect-ratio: auto;
}

.ts-ott-vods--minimal .ts-ott-vod-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ts-ott-vods--minimal .ts-ott-vod-card__placeholder {
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
}

.ts-ott-vods--minimal .ts-ott-vod-card__placeholder svg {
    width: 24px;
    height: 24px;
}

.ts-ott-vods--minimal .ts-ott-vod-card__duration {
    font-size: 0.5625rem;
    padding: 0.125rem 0.3125rem;
    bottom: 0.25rem;
    right: 0.25rem;
}

.ts-ott-vods--minimal .ts-ott-vod-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    flex: 1;
    min-width: 0;
}

.ts-ott-vods--minimal .ts-ott-vod-card__title {
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
}

.ts-ott-vods--minimal .ts-ott-vod-card__desc {
    font-size: 0.8125rem;
    margin-bottom: 0;
}

.ts-ott-vods--minimal .ts-ott-vod-card__meta {
    margin-bottom: 0.125rem;
    font-size: 0.6875rem;
}

/* ==========================================================================
   Responsive: Tablet (max-width: 768px)
   ========================================================================== */

@media (max-width: 1024px) {
    /* Show carousel buttons on touch/tablet devices (no hover) */
    .ts-ott-vod-carousel-btn {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    /* Grid: reduce to 2 columns */
    .ts-ott-vods--grid {
        --ts-ott-columns: 2;
    }

    /* Overlay: reduce to 2 columns */
    .ts-ott-vods--overlay {
        --ts-ott-columns: 2;
    }

    /* List: reduce thumbnail width */
    .ts-ott-vods--list .ts-ott-vod-card__thumbnail {
        width: 180px;
        min-width: 180px;
    }

    /* Carousel: 2 items on tablet (JS reads this value) */
    .ts-ott-vods--carousel {
        --ts-ott-columns: 2;
    }

    /* Overlay Carousel: 2 items on tablet */
    .ts-ott-vods--overlay-carousel {
        --ts-ott-columns: 2;
    }

    /* Detail Carousel: 2 items on tablet */
    .ts-ott-vods--detail-carousel {
        --ts-ott-columns: 2;
    }

    .ts-ott-vod-detail__body {
        padding: 1.5rem 2rem;
        min-height: 180px;
    }

    .ts-ott-vod-detail__thumb-link {
        width: 240px;
    }

    .ts-ott-vod-detail__title {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Responsive: Mobile (max-width: 767px)
   ========================================================================== */

@media (max-width: 767px) {
    /* Grid: single column */
    .ts-ott-vods--grid {
        --ts-ott-columns: 1;
    }

    /* Overlay: single column */
    .ts-ott-vods--overlay {
        --ts-ott-columns: 1;
    }

    /* List: full-width stack */
    .ts-ott-vods--list .ts-ott-vod-card {
        flex-direction: column;
    }

    .ts-ott-vods--list .ts-ott-vod-card__thumbnail {
        width: 100%;
        min-width: 100%;
        aspect-ratio: 16 / 9;
    }

    /* Carousel: single item on mobile (JS reads this value) */
    .ts-ott-vods--carousel {
        --ts-ott-columns: 1;
    }

    /* Overlay Carousel: single item on mobile */
    .ts-ott-vods--overlay-carousel {
        --ts-ott-columns: 1;
    }

    /* Detail Carousel: single item on mobile */
    .ts-ott-vods--detail-carousel {
        --ts-ott-columns: 1;
    }

    /* Detail panel — mobile card layout */
    .ts-ott-vod-detail {
        border-radius: 10px;
    }

    .ts-ott-vod-detail__bg {
        display: none;
    }

    .ts-ott-vod-detail__body {
        flex-direction: column;
        gap: 0;
        padding: 0;
        min-height: auto;
    }

    .ts-ott-vod-detail__thumb-link {
        width: 100%;
        order: -1;
    }

    .ts-ott-vod-detail__thumb {
        border-radius: 10px 10px 0 0;
        max-height: 200px;
    }

    .ts-ott-vod-detail__thumb img {
        border-radius: 10px 10px 0 0;
        max-height: 200px;
        object-position: center top;
    }

    .ts-ott-vod-detail__info {
        padding: 1rem 1.25rem 1.25rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .ts-ott-vod-detail__title {
        font-size: 1.125rem;
        margin-bottom: 0.25rem;
        order: 1;
        width: 100%;
    }

    .ts-ott-vod-detail__duration {
        margin-bottom: 0.5rem;
        order: 2;
    }

    .ts-ott-vod-detail__desc {
        font-size: 0.8125rem;
        text-align: left;
        margin-bottom: 1rem;
        order: 3;
        width: 100%;
    }

    .ts-ott-vod-detail__play {
        margin: 0 auto;
        order: 10;
        width: 100%;
        justify-content: center;
    }

    .ts-ott-vod-detail__close {
        top: 0.5rem;
        right: 0.5rem;
        width: 30px;
        height: 30px;
        background: rgba(0, 0, 0, 0.5);
    }

    .ts-ott-vods--detail-carousel .ts-ott-vod-card--active::after {
        bottom: -8px;
        border-left-width: 8px;
        border-right-width: 8px;
        border-bottom-width: 8px;
    }

    /* Smaller carousel buttons on mobile */
    .ts-ott-vod-carousel-btn {
        width: 36px;
        height: 36px;
    }
    .ts-ott-vod-carousel-btn svg {
        width: 16px;
        height: 16px;
    }
    .ts-ott-vod-carousel-btn--prev {
        left: 8px;
    }
    .ts-ott-vod-carousel-btn--next {
        right: 8px;
    }

    /* Card spacing reduction */
    .ts-ott-vods {
        --ts-ott-card-spacing: 0.75rem;
    }

    .ts-ott-vod-card__title {
        font-size: 1rem;
    }

    .ts-ott-vod-card__desc {
        font-size: 0.8125rem;
    }

    .ts-ott-vod-category {
        margin-bottom: 1.75rem;
    }

    .ts-ott-vod-category__title {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Gutenberg Editor Preview Wrapper
   ========================================================================== */

.ts-ott-block-preview {
    padding: 0;
}
