/* ===== Czech VAT / DPH Checker — TechTools.cz =====
   Public tool, account:none, bilingual EN/CS. Dark theme, mobile-first.
   Loaded AFTER /shared-topnav.css so this :root seeds --tt-topnav-h. */

:root {
    --primary-bg: #0a0a0f;
    --secondary-bg: #141419;
    --card-bg: #1a1a24;
    --card-bg-2: #20202c;
    --border-color: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --ok: #34d399;
    --ok-bg: rgba(52, 211, 153, 0.12);
    --warn: #fbbf24;
    --warn-bg: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.12);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.72);
    --text-muted: rgba(255, 255, 255, 0.50);
    --radius-sm: 0.45rem;
    --radius-md: 0.7rem;
    --radius-lg: 1.1rem;
    --transition: 0.2s ease;
    --tt-topnav-h: 64px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary-bg); color: var(--text-primary); line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-secondary); }
.page { min-height: calc(100vh - var(--tt-topnav-h)); }
.app { max-width: 720px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* hero */
.hero { text-align: center; padding: 1.5rem 0 0.5rem; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 600;
    color: var(--accent-secondary); background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 0.32rem 0.75rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero h1 {
    font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.6rem;
    background: linear-gradient(120deg, #fff 30%, #c7d2fe 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lead { color: var(--text-secondary); font-size: 1.02rem; max-width: 38rem; margin: 0 auto 1.6rem; }
.lead strong { color: var(--text-primary); }

/* form */
.vat-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; max-width: 38rem; margin: 0 auto; text-align: left; }
.vat-field { display: flex; flex-direction: column; gap: 0.35rem; }
.vat-field.country { flex: 0 0 8.5rem; }
.vat-field.number { flex: 1 1 12rem; min-width: 0; }
.vat-field label { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; }
.vat-field input, .vat-field select {
    width: 100%; background: var(--card-bg-2); color: var(--text-primary); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); padding: 0.75rem 0.8rem; font-size: 1rem; font-family: inherit; min-height: 50px;
    transition: border-color var(--transition);
}
.vat-field input:focus, .vat-field select:focus { outline: none; border-color: var(--accent-primary); }
.vat-field select { cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.7rem center; padding-right: 2rem; }
.check-btn {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.5rem; background: var(--accent-gradient);
    color: #fff; border: none; border-radius: var(--radius-sm); padding: 0 1.3rem; min-height: 50px;
    font-size: 0.98rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: filter var(--transition), transform var(--transition);
}
.check-btn:hover { filter: brightness(1.1); }
.check-btn:active { transform: scale(0.98); }
.check-btn:disabled { opacity: 0.6; cursor: default; }

.examples { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; font-size: 0.85rem; }
.examples-label { color: var(--text-muted); }
.chip {
    background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-secondary);
    border-radius: 999px; padding: 0.34rem 0.8rem; font-size: 0.83rem; font-family: inherit; cursor: pointer; min-height: 32px;
    transition: all var(--transition);
}
.chip:hover { border-color: var(--accent-primary); color: var(--text-primary); background: var(--card-bg-2); }

/* status */
.status { text-align: center; margin: 1.5rem auto 0; max-width: 38rem; padding: 1rem 1.2rem; border-radius: var(--radius-md); font-size: 0.95rem; }
.status.loading { color: var(--text-secondary); }
.status.error { color: var(--danger); background: var(--danger-bg); border: 1px solid rgba(248, 113, 113, 0.3); }
.spinner { display: inline-block; width: 1.1em; height: 1.1em; border: 2px solid rgba(255,255,255,0.25); border-top-color: var(--accent-secondary); border-radius: 50%; margin-right: 0.5rem; vertical-align: -0.18em; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* result card */
.result { margin-top: 1.6rem; }
.verdict {
    display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.4rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; border: 1px solid var(--border-color); border-bottom: none;
}
.verdict-icon { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0; }
.verdict-text h2 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.verdict-text p { margin: 0.2rem 0 0; font-size: 0.88rem; color: var(--text-secondary); }
.verdict.valid { background: linear-gradient(160deg, var(--ok-bg), transparent); }
.verdict.valid .verdict-icon { background: var(--ok-bg); color: var(--ok); }
.verdict.invalid { background: linear-gradient(160deg, var(--danger-bg), transparent); }
.verdict.invalid .verdict-icon { background: var(--danger-bg); color: var(--danger); }
.verdict.unknown { background: linear-gradient(160deg, var(--warn-bg), transparent); }
.verdict.unknown .verdict-icon { background: var(--warn-bg); color: var(--warn); }

.card-body {
    border: 1px solid var(--border-color); border-top: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--card-bg); padding: 1.2rem 1.4rem 1.4rem; display: grid; gap: 1.1rem;
}
.facts { display: grid; gap: 0.1rem; }
.fact { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border-color); }
.fact:last-child { border-bottom: none; }
.fact-k { color: var(--text-muted); font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.fact-k i { width: 1rem; text-align: center; }
.fact-v { text-align: right; font-size: 0.92rem; font-weight: 500; word-break: break-word; }
.fact-v .vp-yes { color: var(--ok); font-weight: 600; }
.fact-v .vp-no { color: var(--text-muted); }
.copy-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.82rem; padding: 0.15rem 0.35rem; margin-left: 0.35rem; border-radius: 0.3rem; transition: color var(--transition); }
.copy-btn:hover { color: var(--accent-secondary); }
.copy-btn.copied { color: var(--ok); }

.sources { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.src-chip { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.65rem; border-radius: 999px; background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(52,211,153,0.3); }
.src-chip.muted { background: rgba(255,255,255,0.04); color: var(--text-muted); border-color: var(--border-color); }
.src-note { color: var(--text-muted); font-size: 0.82rem; }

.ares-link { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; font-weight: 600; color: var(--accent-secondary); text-decoration: none; }
.ares-link:hover { text-decoration: underline; }

/* about / footer */
.about { margin-top: 2.5rem; padding-top: 1.6rem; border-top: 1px solid var(--border-color); }
.about h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.6rem; }
.about p { color: var(--text-secondary); font-size: 0.92rem; max-width: 44rem; }
.about p.muted { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.6rem; }
.foot { margin-top: 1.5rem; color: var(--text-muted); font-size: 0.82rem; text-align: center; }
.foot a { color: var(--text-secondary); }

.toast {
    position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%) translateY(1rem);
    background: var(--card-bg-2); color: var(--text-primary); border: 1px solid var(--border-strong);
    border-radius: var(--radius-md); padding: 0.7rem 1.1rem; font-size: 0.88rem; font-weight: 500;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: all var(--transition);
    z-index: calc(var(--tt-z-toast, 1100) + 10);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast i { color: var(--ok); margin-right: 0.4rem; }

/* responsive */
@media (max-width: 560px) {
    .app { padding: 1rem 0.85rem 2.5rem; }
    .vat-field.country { flex: 1 1 100%; }
    .vat-field.number { flex: 1 1 100%; }
    .check-btn { flex: 1 1 100%; justify-content: center; }
    .fact { flex-direction: column; gap: 0.15rem; align-items: flex-start; }
    .fact-v { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Dark-theme dropdown fix (fleet sweep 2026-06-30): native <option>s do NOT inherit
   the dark theme — the OS paints the open list white, so without explicit colours the
   options are white-on-white (invisible). Literal hex per .claude/rules/coding-standards.md. */
select option { background-color: #1a1a24; color: #ffffff; }
