/*! purgecss start ignore */
/* ══════════════════════════════════════════════════════════════════
   📺 TV MODULE v3.0 — Televize & YouTube
   Horizontální channel karty, quick search chips, cinema player
   ══════════════════════════════════════════════════════════════════ */

.tv-module { padding: 16px; max-width: 900px; margin: 0 auto; }

/* ─── SECTIONS ─── */
.tv-section { margin-bottom: 6px; }
.tv-section h3 {
    font-size: 0.85rem; color: #a0aec0; margin: 20px 0 8px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.tv-section-note {
    font-size: 0.78rem; color: #cbd5e0; margin: -4px 0 8px; font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   CHANNEL LIST — horizontal cards with icon + info
   ═══════════════════════════════════════════════════════════ */
.tv-channel-list {
    display: flex; flex-direction: column; gap: 6px;
}

.tv-channel-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: white; border: 1.5px solid #e2e8f0; border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    text-align: left;
    min-height: 56px;
}

.tv-channel-card:hover {
    border-color: #5BA8A0; background: #f8fffe;
    box-shadow: 0 2px 8px rgba(91,168,160,0.1);
}
.tv-channel-card:active { transform: scale(0.98); box-shadow: none; }

.tv-channel-card.active {
    border-color: #5BA8A0;
    background: linear-gradient(135deg, #f0fdfa, #e6fffa);
    box-shadow: 0 0 0 2px rgba(91,168,160,0.15);
}

.tv-channel-card-icon {
    font-size: 1.6rem; width: 40px; text-align: center; flex-shrink: 0;
}

.tv-channel-card-info {
    flex: 1; min-width: 0;
}
.tv-channel-card-info strong {
    display: block; font-size: 0.92rem; color: #2d3748; font-weight: 600;
}
.tv-channel-card-info span {
    font-size: 0.78rem; color: #a0aec0;
}

.tv-badge-live {
    font-size: 0.6rem; font-weight: 700; color: #ef4444;
    background: rgba(239,68,68,0.08); padding: 2px 8px;
    border-radius: 8px; flex-shrink: 0; letter-spacing: 0.04em;
}
.tv-badge-ext {
    font-size: 0.85rem; color: #a0aec0; flex-shrink: 0;
}

/* Favorite stats */
.tv-fav-stats {
    display: block; font-size: 0.7rem; color: #5BA8A0; font-weight: 500; margin-top: 1px;
}

.tv-channel-external { border-style: dashed; }

/* ═══════════════════════════════════════════════════════════
   SEARCH — pill input + suggestion chips
   ═══════════════════════════════════════════════════════════ */
.tv-search-section { margin-bottom: 16px; }

.tv-search-box {
    display: flex; gap: 0;
    background: white; border: 2px solid #e2e8f0; border-radius: 16px;
    overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s;
}
.tv-search-box:focus-within {
    border-color: #5BA8A0; box-shadow: 0 0 0 3px rgba(91,168,160,0.1);
}

.tv-search-input {
    flex: 1; padding: 13px 16px; border: none; background: transparent;
    font-size: 1rem; color: #2d3748; outline: none; min-height: 48px;
}
.tv-search-input::placeholder { color: #cbd5e0; }

.tv-search-btn {
    padding: 12px 20px; background: #5BA8A0; color: white;
    border: none; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: background 0.2s; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.tv-search-btn:hover { background: #4a9990; }
.tv-search-btn:active { background: #3d8a83; }

/* Suggestion chips */
.tv-suggest-row {
    display: flex; gap: 6px; margin-top: 8px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
}
.tv-suggest-row::-webkit-scrollbar { display: none; }

.tv-suggest-chip {
    padding: 6px 14px; background: #f0fdfa; border: 1px solid #b2dfdb;
    border-radius: 20px; font-size: 0.8rem; color: #2d6b65;
    cursor: pointer; white-space: nowrap; transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.tv-suggest-chip:hover { background: #e6fffa; border-color: #5BA8A0; }
.tv-suggest-chip:active { transform: scale(0.95); }

/* Search results */
.tv-search-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px; margin-top: 12px; max-height: 440px;
    overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 2px;
}

.tv-search-result {
    display: flex; flex-direction: column;
    background: white; border: 1.5px solid #e2e8f0; border-radius: 12px;
    overflow: hidden; cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent; text-align: left;
}
.tv-search-result:hover { border-color: #5BA8A0; box-shadow: 0 4px 12px rgba(91,168,160,0.12); }
.tv-search-result:active { transform: scale(0.97); }

.tv-search-thumb {
    width: 100%; aspect-ratio: 16/9; background-size: cover;
    background-position: center; background-color: #1a1a2e;
    position: relative; display: flex; align-items: center; justify-content: center;
}

.tv-search-play {
    width: 42px; height: 42px; background: rgba(0,0,0,0.55); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; opacity: 0; transition: opacity 0.2s;
}
.tv-search-result:hover .tv-search-play { opacity: 1; }

.tv-search-duration {
    position: absolute; bottom: 5px; right: 5px;
    background: rgba(0,0,0,0.85); color: white;
    font-size: 0.68rem; font-weight: 600; padding: 1px 5px;
    border-radius: 3px;
}

.tv-search-info { padding: 8px 10px; }
.tv-search-info strong {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; font-size: 0.85rem; color: #2d3748; line-height: 1.3; margin-bottom: 2px;
}
.tv-search-info span { font-size: 0.75rem; color: #a0aec0; }

.tv-search-loading {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 24px; color: #718096; font-size: 0.9rem;
}
.tv-spinner {
    width: 20px; height: 20px; border: 2px solid #e2e8f0;
    border-top-color: #5BA8A0; border-radius: 50%;
    animation: tvSpin 0.8s linear infinite;
}
@keyframes tvSpin { to { transform: rotate(360deg); } }

.tv-search-empty { text-align: center; color: #a0aec0; padding: 20px; font-size: 0.9rem; }

/* ═══════════════════════════════════════════════════════════
   PLAYER — cinema mode
   ═══════════════════════════════════════════════════════════ */
.tv-player-area {
    margin-bottom: 16px; border-radius: 16px; overflow: hidden;
    background: #0d1117; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.tv-now-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: linear-gradient(135deg, #1a4a45, #0f2d2a); color: white;
}
.tv-now-icon { font-size: 1.1rem; flex-shrink: 0; }
.tv-now-name { font-size: 0.92rem; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-now-live {
    font-size: 0.6rem; color: #ef4444; font-weight: 700; flex-shrink: 0;
    background: rgba(239,68,68,0.15); padding: 2px 8px; border-radius: 10px;
    animation: tvPulse 2s infinite; letter-spacing: 0.04em;
}
@keyframes tvPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.tv-now-controls { display: flex; gap: 4px; flex-shrink: 0; margin-left: auto; }

.tv-ctrl {
    width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px; background: rgba(255,255,255,0.08); color: white;
    font-size: 1rem; cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.tv-ctrl:hover { background: rgba(255,255,255,0.18); }
.tv-ctrl:active { transform: scale(0.9); }
.tv-ctrl-stop { background: rgba(239,68,68,0.3); border-color: rgba(239,68,68,0.3); }
.tv-ctrl-stop:hover { background: rgba(239,68,68,0.5); }

.tv-video-wrap { position: relative; width: 100%; background: #000; max-height: 60vh; }
.tv-video-element {
    width: 100%; aspect-ratio: 16/9; max-height: 60vh;
    display: block; background: #000; border: none;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
    .tv-module { padding: 20px; }
    .tv-channel-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tv-search-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) and (min-width: 481px) {
    .tv-channel-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tv-search-grid { grid-template-columns: repeat(2, 1fr); }
    .tv-video-wrap, .tv-video-element { max-height: 50vh; }
}

@media (max-width: 480px) {
    .tv-module { padding: 10px 8px; }
    .tv-section h3 { font-size: 0.78rem; margin: 14px 0 6px; }
    .tv-channel-card { padding: 10px 12px; gap: 10px; min-height: 48px; border-radius: 12px; }
    .tv-channel-card-icon { font-size: 1.3rem; width: 32px; }
    .tv-channel-card-info strong { font-size: 0.85rem; }
    .tv-channel-card-info span { font-size: 0.72rem; }
    .tv-search-input { padding: 11px 14px; font-size: 0.95rem; }
    .tv-search-btn { padding: 11px 16px; font-size: 0.85rem; }
    .tv-suggest-chip { font-size: 0.75rem; padding: 5px 12px; }
    .tv-search-grid { grid-template-columns: 1fr; max-height: 300px; }
    .tv-search-result { flex-direction: row; }
    .tv-search-thumb { width: 130px; min-width: 130px; border-radius: 10px 0 0 10px; }
    .tv-search-info { padding: 8px; }
    .tv-search-info strong { font-size: 0.8rem; }
    .tv-now-bar { padding: 8px 10px; }
    .tv-ctrl { width: 32px; height: 32px; font-size: 0.9rem; }
    .tv-video-wrap, .tv-video-element { max-height: 42vh; }
}

@media (max-width: 360px) {
    .tv-search-result { flex-direction: column; }
    .tv-search-thumb { width: 100%; min-width: 100%; border-radius: 10px 10px 0 0; }
    .tv-channel-card { padding: 10px; gap: 8px; }
}
/*! purgecss end ignore */
