/* Spalvos imamos iš TIKRŲ temos kintamųjų (--ih-border, --ih-accent,
 * --ih-ink - žr. infolaikas-hub-theme/style.css), su atsargine reikšme,
 * jei kada nebūtų apibrėžti. Tas pats raštas, kaip Orai (assets/orai.css)
 * ir Kalendorius (css/kalendorius.css) pluginuose - savas pavadinimų
 * vardų srautas (iht-*), bet realiai susietas su temos dizainu. */
.iht {
    --iht-line: var(--ih-border, #E3D6C0);
    --iht-ink: var(--ih-ink, #2B2016);
    --iht-muted: #8F8172;
    --iht-soft: #6b5f50;
    --iht-acc: var(--ih-accent, #D9691E);
    --iht-live: #2B593F;
    --iht-live-bg: #EBF3EE;
    max-width: 980px;
    margin: 0 auto;
    padding: 20px 16px 50px;
    overflow-x: hidden; /* apsauga nuo horizontalaus "pasistūmimo" mobiliame, jei koks vidinis elementas per platus */
    /* AIŠKIAI nurodomas sraitas (tas pats kaip temos --ih-body-font/Radijo
     * plugino), su tikru šriftu atsargai - kad kanalų pavadinimai NIEKADA
     * nepaveldėtų serif šrifto iš kokio nors aukštesnio/platesnio CSS
     * elemento (tik H2/H3 antraštės sąmoningai lieka serif - žr. žemiau). */
    font-family: var(--ih-body-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}
.iht, .iht *, .iht *::before, .iht *::after { box-sizing: border-box; }

.iht-head { margin-bottom: 16px; }
.iht-head-row { display: flex; align-items: center; gap: 10px; }
.iht-head-logo { border-radius: 6px; flex-shrink: 0; }
.iht-lead { margin: 6px 0 0; color: var(--iht-soft); font-size: 15px; line-height: 1.55; }
.iht-upd { font-size: 12px; color: var(--iht-muted); margin-top: 6px; }
.iht-stale { color: #b5651d; }
.iht-empty { color: var(--iht-muted); font-size: 14px; }

.iht-section-label { font-family: 'Fraunces', Georgia, serif; font-size: 16px; color: var(--iht-ink); margin: 30px 0 10px; }

.iht-card { position: relative; background: #fff; border: 1px solid var(--iht-line); border-radius: 18px; box-shadow: 0 2px 10px rgba(43,32,22,.05); padding: 16px 18px; }

/* Redagavimo ženkliukas - matomas TIK prisijungusiam administratoriui,
 * nukreipia tiesiai į atitinkamą admin lauką ir iškart jį paruošia
 * redagavimui (žr. ai.php jumpToHash()). */
.iht-admin-edit {
    position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1;
    background: #fff; border: 1px solid var(--iht-line); color: var(--iht-acc); text-decoration: none;
    box-shadow: 0 1px 4px rgba(43,32,22,.12); z-index: 2;
}
.iht-admin-edit:hover { background: var(--iht-live-bg); color: var(--iht-acc); }

/* "Dabar rodoma" - gyva kortelė */
.iht-live-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--iht-live); font-weight: 700; margin-bottom: 4px; }
.iht-live-title { font-size: 20px; font-weight: 700; color: var(--iht-ink); margin-bottom: 6px; overflow-wrap: anywhere; }
.iht-live-orig { font-weight: 400; color: var(--iht-muted); font-size: 15px; }
.iht-live-desc { font-size: 14px; color: var(--iht-soft); margin: 6px 0; }
.iht-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.iht-tag { background: var(--iht-live-bg); color: var(--iht-live); font-size: 12px; padding: 3px 9px; border-radius: 20px; font-weight: 600; }
.iht-tag-muted { background: #F5F0E6; color: var(--iht-muted); }

/* Progreso juosta - naudojama ir "Dabar rodoma" kortelėje, ir hub grid'e */
.iht-now-bar { display: block; height: 6px; background: #EDE4D4; border-radius: 4px; overflow: hidden; flex: 1 1 auto; }
.iht-now-bar-fill { display: block; height: 100%; background: var(--iht-live); }

/* "Dabar rodoma" kortelėje - progreso blokas AIŠKIAI atskirtas nuo likusio
 * teksto (savas paragrafas, laikai prie pat juostos, procentas po ja). */
.iht-progress { margin-top: 14px; padding-top: 12px; border-top: 1px solid #F2ECDE; }
.iht-progress-row { display: flex; align-items: center; gap: 10px; }
.iht-progress-time { font-size: 12px; color: var(--iht-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.iht-progress-pct { font-size: 12px; color: var(--iht-muted); text-align: center; margin: 6px 0 0; }

/* "Toliau" - savas, aiškiai atskirtas blokelis (spalvotas fonas, ne vien tekstas eilutėje). */
.iht-next { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; background: var(--iht-live-bg); border-radius: 12px; }
.iht-next-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--iht-live); flex-shrink: 0; }
.iht-next-title { font-size: 14px; font-weight: 600; color: var(--iht-ink); flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.iht-next-time { font-size: 13px; color: var(--iht-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* Dienų mygtukai - vienos eilutės juosta, slenkanti horizontaliai mobiliame */
.iht-day-tabs { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.iht-day-tab { flex-shrink: 0; background: #fff; border: 1px solid var(--iht-line); border-radius: 20px; padding: 7px 14px; font-size: 13px; cursor: pointer; color: var(--iht-soft); white-space: nowrap; }
.iht-day-tab.is-active { background: var(--iht-acc); color: #fff; border-color: var(--iht-acc); }

.iht-schedule { display: flex; flex-direction: column; border: 1px solid var(--iht-line); border-radius: 14px; overflow: hidden; background: #fff; }
.iht-sched-row { display: grid; grid-template-columns: 50px minmax(0,1fr) auto; gap: 8px 10px; padding: 10px 14px; border-bottom: 1px solid #F2ECDE; font-size: 14px; align-items: center; }
.iht-sched-row:last-child { border-bottom: none; }
.iht-sched-row.is-now { background: var(--iht-live-bg); }
/* Jau praėjusios laidos - laikas ir pavadinimas pritemdyti bei perbraukti,
 * BET pati "Jau rodyta" žyma NEpritemdyta (savas kontrastingas foninis
 * ženkliukas), kad liktų gerai įskaitoma, ne beveik nematoma. */
.iht-sched-row.is-past .iht-sched-time, .iht-sched-row.is-past .iht-sched-title { opacity: .5; text-decoration: line-through; text-decoration-color: var(--iht-muted); }
.iht-sched-done { font-size: 11px; font-weight: 700; color: #fff; background: #B08D6A; text-align: center; text-transform: uppercase; letter-spacing: .03em; padding: 3px 9px; border-radius: 20px; white-space: nowrap; justify-self: end; }
.iht-sched-time { color: var(--iht-acc); font-weight: 600; }
.iht-sched-title { color: var(--iht-ink); min-width: 0; overflow-wrap: anywhere; }
.iht-sched-orig { color: var(--iht-muted); font-weight: 400; }
.iht-sched-genres { display: block; font-size: 12px; color: var(--iht-muted); margin-top: 2px; }

/* Kategorijų greitosios nuorodos (chip'ai) ir sekcijos - tas pats raštas
 * kaip Radijo plugino žanrų juosta (ihr-chips/ihr-genre). */
.iht-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: none; }
.iht-chips::-webkit-scrollbar { display: none; }
.iht-chip { flex-shrink: 0; white-space: nowrap; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--iht-line); background: #fff; color: var(--iht-ink); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.iht-chip:hover { background: var(--iht-ink); color: #fff; border-color: var(--iht-ink); }
.iht-cat-section { margin-top: 26px; scroll-margin-top: 20px; }
.iht-cat-head { font-family: 'Fraunces', Georgia, serif; font-size: 16px; color: var(--iht-ink); margin: 0 0 10px; }

/* Kanalų tinkleliai (hub "Visi kanalai" ir channel.php "Kiti kanalai") -
 * tas pats vizualinis raštas, kaip Radijo plugino stočių kortelės
 * (.ihr-card/.ihr-logo): kvadratinis logotipo laukelis + pavadinimas ir
 * kategorija greta, ne mažas 20px ženkliukas kaip anksčiau. */
.iht-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.iht-chan-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--iht-ink); padding: 10px 14px; }
.iht-chan-card:hover { border-color: var(--iht-acc); box-shadow: 0 6px 18px rgba(43,32,22,.08); }
.iht-chan-logo {
    width: 52px; height: 52px; border-radius: 14px; overflow: hidden; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #F5F0E6; color: var(--iht-ink); font-weight: 800; font-size: 19px;
}
.iht-chan-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.iht-chan-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.iht-chan-name { font-family: inherit; font-size: 14.5px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iht-chan-cat { font-size: 12px; color: var(--iht-muted); }

/* "Daugiau" - nuorodos į atskirus puslapius (Dabar rodoma / Šį vakarą),
 * ne inline sekcijos - žmogus nukeliauja į kitą URL, nenuslenka žemyn. */
.iht-nav-cards { display: flex; flex-wrap: wrap; gap: 12px; }
.iht-nav-card { flex: 1 1 220px; display: flex; flex-direction: column; gap: 3px; text-decoration: none; position: relative; padding-right: 36px; font-family: inherit; }
.iht-nav-card-title { font-size: 15px; font-weight: 700; color: var(--iht-ink); }
.iht-nav-card-sub { font-size: 13px; color: var(--iht-muted); font-weight: 400; }
.iht-nav-card-arrow { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--iht-acc); font-size: 18px; }
.iht-nav-card:hover { border-color: var(--iht-acc); }

/* "Apie kanalą" + DUK blokas puslapio apačioje (outro) - tas pats raštas,
 * kaip Radijo plugino ihr-about/ihr-facts/ihr-faq. */
.iht-about { margin-top: 20px; }
.iht-about p { line-height: 1.65; font-size: 15px; color: var(--iht-soft); margin: 0 0 10px; }
.iht-about p:last-child { margin-bottom: 0; }
.iht-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 14px 0 0; font-size: 14px; }
.iht-facts dt { color: var(--iht-muted); }
.iht-facts dd { margin: 0; font-weight: 600; color: var(--iht-ink); }
.iht-faq-item { border-bottom: 1px solid #F2ECDE; padding: 10px 0; }
.iht-faq-item:last-child { border-bottom: 0; }
.iht-faq-item summary { cursor: pointer; font-weight: 700; font-size: 14.5px; list-style: none; position: relative; padding-right: 22px; color: var(--iht-ink); }
.iht-faq-item summary::-webkit-details-marker { display: none; }
.iht-faq-item summary::after { content: "+"; position: absolute; right: 0; top: -2px; font-size: 18px; color: var(--iht-acc); }
.iht-faq-item[open] summary::after { content: "\2212"; }
.iht-faq-item p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--iht-muted); }

.iht-source { font-size: 12px; color: #a39b8c; margin-top: 30px; }

/* /tv/ pagrindinis puslapis */
.iht-search-card { padding: 16px; margin-bottom: 10px; position: relative; }
.iht-search-label { display: block; font-size: 13px; color: var(--iht-muted); margin-bottom: 8px; }
.iht-search-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--iht-line); border-radius: 999px; font-size: 15px; }
.iht-search-input:focus { outline: none; border-color: var(--iht-acc); box-shadow: 0 0 0 3px rgba(217,105,30,.12); }
.iht-search-results { background: #fff; border: 1px solid var(--iht-line); border-radius: 14px; margin-top: 8px; max-height: 360px; overflow-y: auto; }
.iht-result-row { display: grid; grid-template-columns: 50px minmax(0,1fr) auto; gap: 10px; padding: 9px 12px; text-decoration: none; color: var(--iht-ink); border-bottom: 1px solid #F2ECDE; font-size: 14px; align-items: center; }
.iht-result-row:last-child { border-bottom: none; }
.iht-result-row span:first-child { color: var(--iht-muted); font-size: 13px; }
.iht-result-row span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.iht-result-row span:last-child { color: var(--iht-muted); font-size: 12px; text-align: right; white-space: nowrap; }
.iht-result-row:hover { background: var(--iht-live-bg); }
.iht-no-results { padding: 12px; color: var(--iht-muted); font-size: 14px; margin: 0; }

.iht-now-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.iht-now-card { flex: 1 1 220px; max-width: 260px; text-decoration: none; color: var(--iht-ink); display: flex; flex-direction: column; gap: 6px; }
.iht-now-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.iht-now-chan { font-family: 'Fraunces', Georgia, serif; font-size: 14px; color: var(--iht-acc); min-width: 0; overflow-wrap: anywhere; }

.iht-mini-logo {
    width: 22px; height: 22px; border-radius: 6px; overflow: hidden; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #F5F0E6; color: var(--iht-ink); font-weight: 800; font-size: 10px;
}
.iht-mini-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.iht-now-title { font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.iht-now-none { font-size: 13px; color: var(--iht-muted); }
.iht-now-time { font-size: 12px; color: var(--iht-muted); }
.iht-now-next { font-size: 12px; color: var(--iht-muted); }

.iht-evening-list { display: flex; flex-direction: column; border: 1px solid var(--iht-line); border-radius: 14px; overflow: hidden; background: #fff; }
.iht-evening-row { display: grid; grid-template-columns: 50px 130px minmax(0,1fr); gap: 8px 10px; padding: 10px 14px; text-decoration: none; color: var(--iht-ink); border-bottom: 1px solid #F2ECDE; font-size: 14px; align-items: center; }
.iht-evening-row:last-child { border-bottom: none; }
.iht-evening-row:hover { background: var(--iht-live-bg); }
.iht-evening-time { color: var(--iht-acc); font-weight: 600; }
.iht-evening-chan { color: var(--iht-muted); font-size: 13px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.iht-evening-chan .iht-mini-logo { width: 18px; height: 18px; font-size: 9px; }
.iht-evening-chan-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iht-evening-title { min-width: 0; overflow-wrap: anywhere; }

/* Visos eilutės su laiko/pavadinimo gardelėmis - BŪTINA minmax(0,1fr), ne
 * vien "1fr": be to, ilgas, nelūžtantis tekstas (pvz. pavadinimas be
 * tarpų) priverstų visą grid'ą būti platesnį už konteinerį, o kadangi
 * .iht turi overflow-x:hidden, tai tiesiog NUPJAUDAVO turinį mobiliame -
 * todėl reikėdavo slinkti į šonus, kad pamatytum likusią eilutę. */
@media (max-width: 600px) {
    .iht-evening-row { grid-template-columns: 44px minmax(0,1fr); row-gap: 2px; }
    .iht-evening-chan { grid-column: 2; }
    .iht-sched-row { grid-template-columns: 44px minmax(0,1fr) auto; }
    .iht-sched-genres { display: none; }
    .iht-sched-done { font-size: 10px; padding: 2px 7px; }
    .iht-result-row { grid-template-columns: 40px minmax(0,1fr); }
    .iht-result-row span:last-child { display: none; }
    .iht-facts { grid-template-columns: 1fr; gap: 2px 0; }
    .iht-facts dt { margin-top: 8px; }
    .iht-facts dt:first-child { margin-top: 0; }
    .iht-chan-logo { width: 44px; height: 44px; font-size: 16px; }
    .iht-head-row { flex-wrap: wrap; }
}
