/* TV Player Frontend Styles
 * Matches Puzzles-9 dark theme
 */

/* Header with season selector */
.tv-player-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    float: right;
    margin-right: -14px;
}

.tv-player-header label {
    color: #ffffff;
    font-family: Oxygen, sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

/* Season dropdown - styled to match theme */
.tv-player-header .season-select {
    flex: 1;
    max-width: 280px;
    height: 40px;
    padding: 8px 40px 8px 14px;
    font-family: Oxygen, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    background-color: #333333;
    border: 2px solid #00a0db;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;

    /* Custom dropdown arrow */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300a0db' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}

.tv-player-header .season-select:hover {
    background-color: #3d3d3d;
    border-color: #00bcff;
}

.tv-player-header .season-select:focus {
    border-color: #00bcff;
    box-shadow: 0 0 0 3px rgba(0, 160, 219, 0.25);
}

/* Dropdown options (for browsers that support it) */
.tv-player-header .season-select option {
    background-color: #222222;
    color: #ffffff;
    padding: 10px;
}

/* Season pagination buttons */
.tv-player-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.tv-season-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-family: Oxygen, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background-color: #333333;
    border: 2px solid #555555;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tv-season-btn:hover {
    background-color: #444444;
    border-color: #00a0db;
}

.tv-season-btn.active {
    background-color: #00a0db;
    border-color: #00a0db;
    color: #ffffff;
}

/* Current season indicator (animated) */
.tv-player-season-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    padding: 20px 40px;
    background: rgba(0, 160, 219, 0.95);
    color: #ffffff;
    font-family: Oxygen, sans-serif;
    font-size: 24px;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    text-align: center;
}

.tv-player-season-indicator.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.tv-player-season-indicator .indicator-season {
    display: block;
    font-size: 32px;
    margin-bottom: 4px;
}

.tv-player-season-indicator .indicator-episodes {
    display: block;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
}

/* Player wrapper styling */
.tv-player-container center {
    display: block;
}

#tv-jwplayer {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Loading state overlay */
.tv-player-loading {
    position: relative;
}

.tv-player-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 17, 17, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* ===== MOBILE RESPONSIVE ===== */

/* Tablets and smaller */
@media (max-width: 1000px) {
    .tv-player-pagination {
        gap: 6px;
    }

    .tv-season-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 10px;
        font-size: 13px;
    }

    .tv-player-header {
        padding: 10px 14px;
    }

    .tv-player-header .season-select {
        max-width: 240px;
        height: 38px;
        font-size: 13px;
    }

    .tv-player-season-indicator {
        padding: 16px 30px;
        font-size: 20px;
    }

    .tv-player-season-indicator .indicator-season {
        font-size: 26px;
    }
}

/* Mobile phones */
@media (max-width: 767px) {
    .tv-player-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }

    .tv-player-header label {
        text-align: center;
        font-size: 13px;
    }

    .tv-player-header .season-select {
        max-width: 100%;
        width: 100%;
        height: 44px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 10px 40px 10px 14px;
        text-align: center;
        text-align-last: center;
    }

    .tv-player-season-indicator {
        width: 80%;
        max-width: 280px;
        padding: 16px 20px;
        font-size: 18px;
    }

    .tv-player-season-indicator .indicator-season {
        font-size: 24px;
    }

    .tv-player-season-indicator .indicator-episodes {
        font-size: 13px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .tv-player-container {
        margin: 15px 0;
    }

    .tv-player-header {
        padding: 10px;
        border-radius: 3px;
    }

    .tv-player-header .season-select {
        height: 48px;
        font-size: 16px;
        border-radius: 3px;
    }

    #tv-jwplayer {
        border-radius: 3px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .tv-player-header .season-select {
        min-height: 44px; /* Apple's recommended touch target size */
    }

    .tv-player-header .season-select:focus {
        box-shadow: none; /* Remove focus ring on touch devices */
    }
}
