/* LUHAMET 2.0 – vlastní styly (mimo Tabler) */

@import url("https://rsms.me/inter/inter.css");

/* Klikací karty veličin → graf */
.metric-link {
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.metric-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .10);
    border-color: var(--tblr-blue);
}

/* Barevný odznak „Graf" – pozadí dané třídami bg-blue-lt/text-blue, zde jen hover */
.graf-tag {
    font-weight: 600;
    transition: background-color .12s ease, color .12s ease;
}
a.graf-tag { text-decoration: none; }
a.graf-tag:hover,
.metric-link:hover .graf-tag {
    background-color: var(--tblr-blue) !important;
    color: #fff !important;
}

/* ── Přehled (heatmapa) ─────────────────────────────────────────── */
/* tabulka je vložená napevno – do výšky roluje celá stránka, jen na úzkém mobilu vodorovný scroll */
.prehled-wrap { overflow-x: auto; }
.prehled-heat { border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.prehled-heat th,
.prehled-heat td {
    text-align: center;
    padding: .25rem .4rem;
    white-space: nowrap;
    font-size: .82rem;
}
.prehled-heat thead th {
    position: sticky; top: 0; z-index: 3;
    background: var(--tblr-bg-surface, #fff);
    font-weight: 600;
}
.prehled-heat .ph-day,
.prehled-heat .ph-corner {
    position: sticky; left: 0; z-index: 2;
    background: var(--tblr-bg-surface, #fff);
    font-weight: 600;
}
.prehled-heat .ph-corner { z-index: 4; }
.prehled-heat .ph-cell { color: #1a2330; font-weight: 600; }
.prehled-heat .ph-na { background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(130,130,130,.08) 4px, rgba(130,130,130,.08) 8px); }
.prehled-heat .ph-sum { background: var(--tblr-bg-surface-secondary, #f6f8fb); }
.prehled-heat .ph-today { outline: 2px solid var(--tblr-dark, #1f2937); outline-offset: -2px; }
.prehled-heat .ph-ext { box-shadow: inset 0 0 0 2px rgba(214,57,57,.9); }
/* klikací buňka → graf (anchor vyplní celou buňku) */
.prehled-heat .ph-link {
    display: block;
    margin: -.25rem -.4rem;
    padding: .25rem .4rem;
    color: inherit;
    text-decoration: none;
}
.prehled-heat .ph-link:hover { text-decoration: underline; filter: brightness(.94); }
.prehled-heat .ph-main { display: block; font-weight: 600; line-height: 1.05; }
.prehled-heat .ph-sub  { display: block; font-size: .7rem; opacity: .72; line-height: 1; margin-top: 1px; font-weight: 500; }
/* zvýraznění celého řádku při najetí myší – ať se v tabulce neztratíš */
.prehled-heat tbody tr:hover td,
.prehled-heat tbody tr:hover th {
    box-shadow: inset 0 2px 0 rgba(31, 41, 55, .85), inset 0 -2px 0 rgba(31, 41, 55, .85);
}
.prehled-heat tbody tr:hover .ph-day {
    background: var(--tblr-primary, #066fd1) !important;
    color: #fff;
}
/* souhrnná patička (měsíc) – oddělit od dat */
.prehled-heat tfoot td,
.prehled-heat tfoot th { border-top: 2px solid var(--tblr-border-color, #d8dce1); font-weight: 600; }
.prehled-heat tfoot .ph-day { font-size: .78rem; }
.prehled-heat .ph-foot-cell { background: var(--tblr-bg-surface-secondary, #f6f8fb); color: #1a2330; }

/* Rekordy – klikací hodnota vede na graf */
.rec-link { color: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
.rec-link:hover { text-decoration: underline; }
.rec-ico { opacity: .3; font-size: .85em; vertical-align: baseline; }
.rec-link:hover .rec-ico { opacity: 1; color: var(--tblr-primary, #066fd1); }

/* ── Archiv (datová tabulka) – roluje celá stránka, jen na mobilu vodorovný posuv ── */
.archiv-wrap { overflow-x: auto; }
.archiv-table { font-variant-numeric: tabular-nums; white-space: nowrap; margin-bottom: 0; }
.archiv-table thead th { position: sticky; top: 0; z-index: 3; background: var(--tblr-bg-surface, #fff); }
.archiv-table th[data-sort] { cursor: pointer; user-select: none; }
.archiv-table th[data-sort]:hover { background: var(--tblr-bg-surface-secondary, #f6f8fb); }
.archiv-table .ar-time { position: sticky; left: 0; z-index: 2; background: var(--tblr-bg-surface, #fff); font-weight: 600; }
.archiv-table thead .ar-time { z-index: 4; }
.archiv-table tbody tr:hover td, .archiv-table tbody tr:hover .ar-time { background: var(--tblr-bg-surface-secondary, #f6f8fb); }
.ar-hidden { display: none !important; }
