/* Jednotný prázdný stav (templates/_empty.html, window.thEmpty v _nav.html) + chybové stránky (error.html)
   Styl: Y2K / Frutiger Aero „retro okno“ v barvách TravelHackers (fialová + žlutá). */

.th-empty {
    --w-edge: rgba(167, 139, 250, .35);
    --w-body-1: rgba(30, 24, 66, .92);
    --w-body-2: rgba(13, 10, 34, .96);
    --w-ink: #f1f5f9;
    --w-muted: #a5a3c9;
    --w-btn2-1: rgba(255, 255, 255, .10);
    --w-btn2-2: rgba(255, 255, 255, .03);
    --w-btn2-edge: rgba(167, 139, 250, .35);
    --w-files-bg: rgba(0, 0, 0, .28);
    --w-files-edge: rgba(167, 139, 250, .22);
    --w-files-hover: rgba(124, 58, 237, .22);
    --w-violet-1: #c4b5fd;
    --w-violet-2: #7c3aed;
    --w-violet-3: #5b21b6;
    --w-yellow: #fde047;
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 8px auto;
    border-radius: 14px;
    overflow: hidden;
    text-align: center;
    font-family: Tahoma, Verdana, 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(180deg, var(--w-body-1), var(--w-body-2));
    border: 1px solid var(--w-edge);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 40px rgba(0, 0, 0, .5), 0 0 40px rgba(124, 58, 237, .12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: thWinIn .35s cubic-bezier(.2, .9, .3, 1.2) both;
}
.th-empty-sm { max-width: 380px; border-radius: 12px; }

/* Titulek okna */
.th-win-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 6px 8px 6px 12px;
    background: linear-gradient(180deg, var(--w-violet-1) 0%, var(--w-violet-2) 48%, var(--w-violet-3) 52%, #8b5cf6 100%);
    color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-align: left;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .45);
}
.th-win-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-win-btns { display: flex; gap: 4px; flex: none; }
.th-win-btns i {
    width: 20px; height: 18px; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 700;
    border: 1px solid rgba(255, 255, 255, .7); border-radius: 4px;
    background: linear-gradient(180deg, #ddd6fe, #7c3aed); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.th-win-btns i:last-child { background: linear-gradient(180deg, #fecaca, #dc2626); }

.th-win-body { display: flex; flex-direction: column; align-items: center; padding: 26px 22px 24px; }
.th-empty-sm .th-win-body { padding: 18px 16px 18px; }

/* Lesklá „bublina“ s ikonou */
.th-empty-ic { position: relative; width: 84px; height: 84px; margin-bottom: 14px; display: grid; place-items: center; }
.th-empty-ic::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 50% 30%, #ffffff 0%, #ede9fe 30%, #a78bfa 72%, #6d28d9 100%);
    border: 1px solid #6d28d9;
    box-shadow: inset 0 -6px 12px rgba(76, 29, 149, .45), 0 8px 18px rgba(91, 33, 182, .35);
}
.th-empty-ic::after { /* odlesk */
    content: ''; position: absolute; left: 18%; right: 18%; top: 7%; height: 38%; border-radius: 50%;
    background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
}
.th-empty-ic span { position: relative; z-index: 1; font-size: 38px; line-height: 1; animation: thEmptyFloat 4s ease-in-out infinite; filter: drop-shadow(0 3px 3px rgba(40, 10, 90, .35)); }
.th-empty-sm .th-empty-ic { width: 60px; height: 60px; margin-bottom: 10px; }
.th-empty-sm .th-empty-ic span { font-size: 28px; }

.th-empty-t { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: var(--w-ink); line-height: 1.3; }
.th-empty-sm .th-empty-t { font-size: 15px; }
.th-empty-p { margin: 0 auto; max-width: 360px; font-size: 13.5px; line-height: 1.55; color: var(--w-muted); }
.th-empty-sm .th-empty-p { font-size: 12.5px; }

/* Tlačítka: gelové (hlavní) a stříbrné (vedlejší) */
.th-empty-a { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.th-empty-sm .th-empty-a { margin-top: 12px; }
.th-empty-btn {
    position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; overflow: hidden;
    border: 1px solid #4c1d95; border-radius: 999px; cursor: pointer;
    background: linear-gradient(180deg, #c4b5fd 0%, #8b5cf6 45%, #6d28d9 55%, #7c3aed 100%);
    color: #fff !important; font: inherit; font-size: 13.5px; font-weight: 800; text-decoration: none !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 6px 16px rgba(91, 33, 182, .4);
    transition: transform .15s, filter .15s;
}
.th-empty-btn::before { content: ''; position: absolute; left: 10px; right: 10px; top: 2px; height: 45%; border-radius: 999px; background: linear-gradient(rgba(255, 255, 255, .6), rgba(255, 255, 255, 0)); pointer-events: none; }
.th-empty-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.th-empty-btn2 {
    display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 999px;
    border: 1px solid var(--w-btn2-edge); background: linear-gradient(180deg, var(--w-btn2-1), var(--w-btn2-2));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 3px 8px rgba(0, 0, 0, .2);
    color: var(--w-ink) !important; font-size: 13.5px; font-weight: 700; text-decoration: none !important;
}
.th-empty-btn2:hover { filter: brightness(1.04); }
.th-empty-sm .th-empty-btn, .th-empty-sm .th-empty-btn2 { padding: 8px 15px; font-size: 12.5px; }

/* LCD displej (chybové stránky, lze použít i jinde) */
.th-lcd {
    width: 100%; margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; text-align: left;
    background: linear-gradient(180deg, #1e1b4b, #0f0b2e); color: var(--w-yellow, #fde047);
    font: 700 13px/1.6 'Lucida Console', 'Courier New', monospace; letter-spacing: .5px;
    text-shadow: 0 0 6px rgba(253, 224, 71, .55);
    border: 1px solid rgba(167, 139, 250, .3); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .06);
}
.th-lcd b { font-size: 26px; letter-spacing: 3px; }
.th-lcd .blink { animation: thBlink 1s steps(1) infinite; }

/* Seznam „souborů“ (tipy na 404) */
.th-files { width: 100%; margin-top: 18px; padding: 8px; text-align: left; background: var(--w-files-bg); border: 1px solid var(--w-files-edge); border-radius: 8px; box-shadow: inset 1px 1px 3px rgba(0, 0, 0, .25); }
.th-files-h { margin: 2px 6px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--w-muted); }
.th-files a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 4px; color: var(--w-ink) !important; font-size: 12.5px; text-decoration: none !important; }
.th-files a:hover { background: var(--w-files-hover); }
.th-files .ico { font-size: 16px; }

/* Světlý režim webu: světlé „stříbrné“ okno */
html.light .th-empty {
    --w-edge: #8b85b8; --w-body-1: #f6f5ff; --w-body-2: #d9d6ef; --w-ink: #1e1b4b; --w-muted: #4c4a73;
    --w-btn2-1: #ffffff; --w-btn2-2: #dedbf0; --w-btn2-edge: #8b85b8;
    --w-files-bg: #ffffff; --w-files-edge: #b9b4d9; --w-files-hover: #ede9fe;
    box-shadow: inset 0 1px 0 #fff, 0 18px 40px rgba(30, 20, 80, .25);
}

@keyframes thEmptyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes thWinIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes thBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .th-empty, .th-empty-ic span, .th-lcd .blink { animation: none; } }
