/* TV Program Widget — standalone plugin styles */

.tv-widget {
    margin-top: 10px;
}

.tv-channels {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
}

.tv-channel-btn {
    flex: 1;
    padding: 10px 8px;
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: 8px;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    line-height: 1.3;
}

.tv-channel-btn:hover {
    background: #e8e8e8;
    color: #222;
}

.tv-channel-btn.active {
    background: #e91e63;
    color: #fff;
    border-color: #c2185b;
}

.tv-program-list {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e91e63 #f0f0f0;
}

.tv-program-list::-webkit-scrollbar {
    width: 4px;
}

.tv-program-list::-webkit-scrollbar-thumb {
    background: #e91e63;
    border-radius: 4px;
}

.tv-program-list::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.tv-program-item {
    display: flex;
    gap: 12px;
    padding: 10px 5px;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
    transition: background 0.2s ease;
}

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

.tv-program-item.current {
    background: rgba(233, 30, 99, 0.08);
    margin: 0 -5px;
    padding: 10px;
    border-radius: 8px;
    border-bottom-color: transparent;
}

.tv-program-time {
    font-size: 13px;
    font-weight: 700;
    color: #e91e63;
    min-width: 42px;
    flex-shrink: 0;
}

.tv-program-item.current .tv-program-time {
    color: #fff;
    background: #e91e63;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.tv-program-title {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.tv-program-item.current .tv-program-title {
    color: #222;
    font-weight: 600;
}

.tv-program-item.now-badge::after {
    content: 'сейчас';
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #e91e63;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tv-loading,
.tv-error {
    text-align: center;
    padding: 30px 0;
    color: #999;
    font-size: 14px;
}

.tv-loading .fa,
.tv-error .fa {
    margin-right: 8px;
}

/* Dark theme support — auto-detect common dark backgrounds */
@media (prefers-color-scheme: dark) {
    .tv-channel-btn {
        background: #2a2a2a;
        color: #ccc;
    }
    .tv-channel-btn:hover {
        background: #3a3a3a;
        color: #fff;
    }
    .tv-program-item {
        border-bottom-color: #333;
    }
    .tv-program-title {
        color: #aaa;
    }
    .tv-program-item.current .tv-program-title {
        color: #fff;
    }
}
