.ow_main_menu .tv_main_menu_item {
    background: url(../../../themes/flatty/images/main_movies.svg) no-repeat 3px center;
}
.ow_main_menu .tv_main_menu_item:hover,
.ow_main_menu .tv_main_menu_item.active {
    background-image: url(../../../themes/flatty/images/main_movies.svg);
}

.tv-widget {
    font-family: inherit;
}

.tv-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #f7f7f7;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 4px 4px 0 0;
    flex-wrap: wrap;
}

.tv-nav select {
    font-size: 12px;
    padding: 3px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    max-width: 140px;
}

.tv-nav-country {
    flex: 0 0 auto;
}

.tv-nav-category {
    flex: 1 1 110px;
    min-width: 80px;
}

.tv-nav-fav-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    flex: 0 0 auto;
    position: relative;
}

.tv-fav-dropdown {
    position: relative;
}

.tv-fav-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 3px 8px;
    border: 1px solid #faad14;
    border-radius: 3px;
    background: #fffdf5;
    color: #873800;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.tv-fav-menu-btn:hover {
    background: #fff8e1;
    border-color: #d48806;
}

.tv-fav-star {
    color: #faad14;
    font-size: 13px;
}

.tv-fav-arrow {
    font-size: 10px;
    color: #873800;
    margin-left: 2px;
}

.tv-fav-panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 250px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    font-size: 12px;
    overflow: hidden;
}

.tv-fav-panel-head {
    padding: 6px 10px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: #333;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tv-fav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}

.tv-fav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    padding: 2px 4px 2px 8px;
    transition: background 0.15s;
}

.tv-fav-item:last-child {
    border-bottom: none;
}

.tv-fav-item:hover {
    background: #fbfbfb;
}

.tv-fav-item-play {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #262626;
    text-decoration: none;
    padding: 5px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-fav-item-play:hover {
    color: #1890ff;
}

.tv-fav-item-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-fav-item-country {
    font-size: 10px;
    background: #f0f0f0;
    color: #666;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.tv-fav-item-del {
    background: transparent;
    border: none;
    color: #bfbfbf;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 3px;
    transition: all 0.15s;
}

.tv-fav-item-del:hover {
    color: #ff4d4f;
    background: #fff1f0;
}

.tv-fav-empty-hint {
    padding: 14px 10px;
    text-align: center;
    color: #8c8c8c;
    line-height: 1.4;
}

.tv-fav-empty-hint small {
    color: #bfbfbf;
}

.tv-fav-panel-footer {
    padding: 6px 10px;
    background: #fafafa;
    border-top: 1px solid #eee;
    text-align: right;
}

.tv-fav-clear-all {
    color: #8c8c8c;
    font-size: 11px;
    text-decoration: none;
}

.tv-fav-clear-all:hover {
    color: #ff4d4f;
}

.tv-fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid #faad14;
    background: #fffbe6;
    color: #d46b08;
    cursor: pointer;
    line-height: 1.4;
    white-space: nowrap;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.tv-fav-btn:hover {
    background: #ffe58f;
    border-color: #d48806;
    color: #873800;
}

/* Blinking button animation to attract attention to saving */
.tv-fav-btn.tv-fav-blink {
    animation: tv-fav-blink-glow 1.1s infinite ease-in-out;
}

.tv-fav-btn.tv-fav-blink .tv-fav-icon {
    animation: tv-star-pulse 1.1s infinite ease-in-out;
}

@keyframes tv-fav-blink-glow {
    0%, 100% {
        background-color: #fffbe6;
        border-color: #faad14;
        box-shadow: 0 0 2px rgba(250, 173, 20, 0.4);
        color: #d46b08;
        transform: scale(1);
    }
    50% {
        background-color: #ffd666;
        border-color: #fa541c;
        box-shadow: 0 0 10px 2px rgba(250, 84, 28, 0.7);
        color: #bf2600;
        transform: scale(1.05);
    }
}

@keyframes tv-star-pulse {
    0%, 100% {
        transform: scale(1);
        color: #faad14;
    }
    50% {
        transform: scale(1.35);
        color: #f5222d;
    }
}

.tv-fav-btn.tv-fav-saved {
    background: #f6ffed;
    border-color: #52c41a;
    color: #237804;
    animation: none;
    box-shadow: none;
}

.tv-fav-btn.tv-fav-saved .tv-fav-icon {
    color: #52c41a;
    animation: none;
}

.tv-fav-btn.tv-fav-saved:hover {
    background: #fff1f0;
    border-color: #ff4d4f;
    color: #cf1322;
}

.tv-fav-btn.tv-fav-saved:hover .tv-fav-icon {
    color: #cf1322;
}

.tv-nav-browse {
    font-size: 11px;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
}

.tv-nav-browse:hover {
    color: #333;
}

.tv-player-container {
    position: relative;
    margin-bottom: 12px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.tv-player {
    width: 100%;
    max-height: 300px;
    display: block;
}

.tv-player-title {
    padding: 6px 10px;
    color: #fff;
    font-size: 13px;
    background: rgba(0,0,0,0.7);
}

.tv-player-close {
    position: absolute;
    top: 6px;
    right: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    opacity: 0.8;
}

.tv-player-close:hover {
    opacity: 1;
}

.tv-channel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.tv-channel-item {
    border-bottom: 1px solid #eee;
}

.tv-channel-item:last-child {
    border-bottom: none;
}

.tv-channel-link {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s;
}

.tv-channel-link:hover {
    background: #f5f5f5;
}

.tv-channel-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.tv-channel-category {
    font-size: 11px;
    color: #999;
    text-transform: capitalize;
    margin-left: 8px;
}

.tv-empty p {
    color: #666;
    font-size: 13px;
    text-align: center;
    padding: 20px 10px;
}

.tv-empty-msg {
    color: #666;
    font-size: 13px;
    text-align: center;
    padding: 20px 10px;
}

/* TV page: bigger player */
.tv-page .tv-player {
    max-height: 500px;
}

/* EPG section (below player) */
.tv-epg-section {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 16px;
    padding: 10px;
}

.tv-epg-now {
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 8px;
}

.tv-epg-now-label {
    font-weight: 700;
    color: #4caf50;
    margin-right: 6px;
}

.tv-epg-now-time {
    color: #555;
    font-size: 12px;
    margin-right: 8px;
}

.tv-epg-now-title {
    font-weight: 500;
}

.tv-epg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tv-epg-table th {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 2px solid #ddd;
    font-size: 12px;
    color: #666;
}

.tv-epg-table td {
    padding: 4px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.tv-epg-time {
    white-space: nowrap;
    color: #555;
    font-size: 12px;
}

.tv-epg-title {
    font-weight: 500;
}

.tv-epg-desc {
    display: block;
    font-weight: normal;
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.tv-epg-current {
    background: #fff3cd;
    font-weight: 600;
    border-left: 3px solid #f5a623;
}

.tv-epg-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.tv-epg-list li {
    padding: 3px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.tv-epg-programs {
    max-height: 300px;
    overflow-y: auto;
}

/* EPG channel grid (on TV page) */
.tv-epg-heading {
    margin: 16px 0 10px;
    font-size: 16px;
}

.tv-epg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}

.tv-epg-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.tv-epg-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tv-epg-card.tv-epg-has-stream {
    border-color: #4caf50;
    background: #f9fff9;
}

.tv-epg-card.tv-epg-active {
    border-color: #1a73e8;
    background: #e8f0fe;
    box-shadow: 0 2px 8px rgba(26,115,232,0.2);
}

.tv-epg-card-link {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.tv-epg-channel-name {
    font-size: 13px;
    font-weight: 500;
}

.tv-epg-badge {
    color: #4caf50;
    font-size: 11px;
}
