/* ============================================================
   KalkulačkaSK – s.r.o. vs Živnostník 2025
   style.css
   ============================================================ */

/* ─── GOOGLE FONTS ────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* ─── DESIGN TOKENS ───────────────────────────────────────────── */
:root {
  --emerald-950: #022c22;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-300: #6ee7b7;
  --emerald-200: #a7f3d0;
  --emerald-100: #d1fae5;
  --emerald-50:  #ecfdf5;

  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-100: #fef3c7;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white: #ffffff;

  --ziv-color: #059669;
  --ziv-light: #d1fae5;
  --sro-color: #1d4ed8;
  --sro-light: #dbeafe;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.08);
  --shadow-card: 0 2px 8px rgba(6,95,70,.08), 0 1px 3px rgba(6,95,70,.05);

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* ─── RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--slate-50);
  color: var(--slate-800);
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ──────────────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, var(--emerald-950) 0%, var(--emerald-800) 60%, var(--emerald-700) 100%);
  position: relative;
  overflow: hidden;
  padding: 2.5rem 1.25rem 3.5rem;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(52,211,153,.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(16,185,129,.12) 0%, transparent 60%);
  pointer-events: none;
}

header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 48px;
  background: var(--slate-50);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.header-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(52,211,153,.18);
  border: 1px solid rgba(52,211,153,.35);
  color: var(--emerald-300);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 100px;
  margin-bottom: 1.1rem;
}

.header-badge::before { content: '●'; font-size: .5rem; }

/* H1 – dvojriadkový, vizuálne odlíšený */
h1 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin-bottom: .9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}

.h1-line1 {
  /* Hlavné slová – veľké, biele */
  font-size: clamp(1.9rem, 6vw, 3.2rem);
  color: var(--white);
  letter-spacing: -.01em;
}

.h1-line2 {
  /* Podtitul v rámci H1 – menšie, emerald */
  font-size: clamp(1rem, 3vw, 1.45rem);
  color: var(--emerald-300);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: .01em;
}

/* Header sub – krátky, výrazný */
.header-sub {
  display: inline-block;
  color: rgba(255,255,255,.55);
  font-size: clamp(.8rem, 2vw, .9rem);
  font-weight: 400;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* ─── MAIN LAYOUT ─────────────────────────────────────────────── */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* ─── SECTION TITLES ──────────────────────────────────────────── */
.section-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--emerald-700);
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--emerald-200);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  color: var(--slate-900);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: .5rem;
}

/* ─── CARD ────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(6,95,70,.07);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .card { padding: 2rem 2.25rem; }
}

/* ─── FORM ────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}

.form-group { display: flex; flex-direction: column; gap: .4rem; }

label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--slate-600);
  letter-spacing: .02em;
}

.input-wrap { position: relative; }

.input-prefix {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .9rem;
  font-weight: 600;
  color: var(--slate-400);
  pointer-events: none;
}

input[type="number"] {
  width: 100%;
  padding: .75rem .9rem .75rem 2.1rem;
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 600;
  color: var(--slate-900);
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

input[type="number"]:focus {
  border-color: var(--emerald-500);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(16,185,129,.15);
}

/* Placeholder styling */
input[type="number"]::placeholder {
  color: var(--slate-400);
  font-weight: 400;
  font-family: var(--font-body);
}

.hint {
  font-size: .73rem;
  color: var(--slate-400);
  margin-top: .1rem;
}

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* ─── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  flex: 1;
  min-width: 160px;
  padding: .85rem 1.5rem;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
  color: var(--white);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  letter-spacing: .02em;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  box-shadow: 0 4px 14px rgba(5,150,105,.35);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(5,150,105,.45);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: .85rem 1.25rem;
  background: var(--white);
  color: var(--slate-600);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.btn-secondary:hover {
  border-color: var(--slate-400);
  color: var(--slate-800);
}

/* ─── RESULTS ─────────────────────────────────────────────────── */
#results-section { display: none; }
#results-section.visible { display: block; }

/* ─── COMPARISON CARDS ────────────────────────────────────────── */
.compare-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .compare-grid { grid-template-columns: 1fr 1fr; }
}

.entity-card {
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.entity-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}

.entity-card.zivnostnik {
  background: linear-gradient(160deg, #f0fdf4 0%, #ecfdf5 100%);
  border-color: rgba(5,150,105,.2);
}

.entity-card.zivnostnik::before {
  background: linear-gradient(90deg, var(--emerald-500), var(--emerald-400));
}

.entity-card.sro {
  background: linear-gradient(160deg, #eff6ff 0%, #dbeafe 40%, #eff6ff 100%);
  border-color: rgba(29,78,216,.18);
}

.entity-card.sro::before {
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
}

.entity-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .3rem;
}

.entity-card.zivnostnik .entity-title { color: var(--emerald-700); }
.entity-card.sro .entity-title { color: #1d4ed8; }

.entity-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--slate-900);
  margin-bottom: 1rem;
}

.net-income {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: .3rem;
}

.entity-card.zivnostnik .net-income { color: var(--emerald-700); }
.entity-card.sro .net-income { color: #1d4ed8; }

.net-label {
  font-size: .78rem;
  color: var(--slate-500);
  margin-bottom: 1.25rem;
}

/* breakdown rows */
.breakdown { display: flex; flex-direction: column; gap: .45rem; }

.brow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  font-size: .8rem;
  padding-bottom: .45rem;
  border-bottom: 1px dashed var(--slate-200);
}

.brow:last-child { border-bottom: none; padding-bottom: 0; }

.brow-label { color: var(--slate-500); flex: 1; }

.brow-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--slate-700);
  white-space: nowrap;
}

.brow-value.negative { color: #dc2626; }
.brow-value.positive { color: var(--emerald-700); }

/* winner badge */
.winner-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--amber-400);
  color: var(--slate-900);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 100px;
  box-shadow: 0 2px 6px rgba(251,191,36,.4);
}

/* ─── BREAKEVEN CARD ──────────────────────────────────────────── */
.breakeven-card {
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--emerald-950) 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.breakeven-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52,211,153,.15) 0%, transparent 70%);
  pointer-events: none;
}

@media (min-width: 640px) {
  .breakeven-card {
    flex-direction: row;
    align-items: center;
  }
}

.breakeven-icon { font-size: 2.5rem; line-height: 1; }
.breakeven-content { flex: 1; }

.breakeven-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--emerald-400);
  margin-bottom: .3rem;
}

.breakeven-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: .5rem;
}

.breakeven-amount {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 700;
  color: var(--emerald-400);
  line-height: 1;
  margin-bottom: .3rem;
}

.breakeven-desc {
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  max-width: 380px;
}

.breakeven-position {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  font-size: .82rem;
  text-align: center;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .breakeven-position { min-width: 180px; }
}

.breakeven-position .pos-label {
  color: rgba(255,255,255,.55);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .3rem;
}

.breakeven-position .pos-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}

.pos-value.above { color: #60a5fa; }
.pos-value.below { color: var(--emerald-400); }

/* ─── CHART ───────────────────────────────────────────────────── */
.chart-wrap {
  position: relative;
  height: 280px;
}

@media (min-width: 640px) {
  .chart-wrap { height: 340px; }
}

/* ─── TABLE ───────────────────────────────────────────────────── */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.detail-table thead th {
  background: var(--slate-50);
  padding: .65rem 1rem;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate-500);
  border-bottom: 2px solid var(--slate-200);
}

.detail-table thead th:not(:first-child) { text-align: right; }

.detail-table tbody td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
}

.detail-table tbody td:not(:first-child) {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 600;
  text-align: right;
}

.detail-table tbody tr:hover td { background: var(--slate-50); }

.detail-table .row-total td {
  font-weight: 700;
  border-top: 2px solid var(--slate-200);
  border-bottom: none;
  padding-top: .8rem;
}

.detail-table .row-total td:first-child { color: var(--slate-900); }

.col-ziv { color: var(--emerald-700) !important; }
.col-sro { color: #1d4ed8 !important; }

.th-ziv {
  border-bottom-color: var(--emerald-500) !important;
  color: var(--emerald-700) !important;
}

.th-sro {
  border-bottom-color: #3b82f6 !important;
  color: #1d4ed8 !important;
}

/* ─── TABS ────────────────────────────────────────────────────── */
.tab-group {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: .4rem 1rem;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  border: 1.5px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-500);
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn.active {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: var(--white);
}

/* ─── CTA SECTION ─────────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: .5rem 0 1rem;
}

.cta-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--slate-900);
  margin-bottom: .4rem;
}

.cta-sub {
  font-size: .85rem;
  color: var(--slate-500);
  margin-bottom: 1.5rem;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

@media (min-width: 560px) {
  .cta-buttons { flex-direction: row; justify-content: center; }
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.35rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  letter-spacing: .01em;
}

.cta-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.cta-btn-primary {
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
  color: var(--white);
  box-shadow: 0 4px 14px rgba(5,150,105,.3);
}

.cta-btn-secondary {
  background: var(--white);
  color: var(--slate-800);
  border: 1.5px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.cta-btn-tertiary {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(29,78,216,.25);
}

/* ─── ADSENSE PLACEHOLDER ─────────────────────────────────────── */
#adsense-banner {
  background: var(--slate-100);
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-md);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-400);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 1.5rem 0;
}

/* ─── FOOTER ──────────────────────────────────────────────────── */
footer {
  background: var(--slate-900);
  color: var(--slate-400);
  text-align: center;
  padding: 2rem 1rem;
  font-size: .8rem;
  line-height: 1.8;
}

footer a {
  color: var(--emerald-400);
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

/* Tlačidlo-odkaz (pre modálne okná vo footeri a cookie banneri) */
.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: inherit;
  color: var(--emerald-400);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition);
  line-height: inherit;
}

.footer-link-btn:hover {
  color: var(--emerald-300);
  text-decoration: underline;
}

/* V cookie banneri – farba biela / svetlejšia */
.cookie-link {
  color: var(--emerald-300);
}

.footer-disclaimer {
  font-size: .73rem;
  color: var(--slate-600);
  max-width: 600px;
  margin: .75rem auto 0;
  line-height: 1.7;
}

/* ─── COOKIE BANNER ───────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 999;
  background: var(--slate-900);
  border-top: 1px solid var(--slate-700);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  align-items: flex-start;
  box-shadow: 0 -4px 24px rgba(0,0,0,.25);
}

@media (min-width: 600px) {
  #cookie-banner {
    flex-direction: row;
    align-items: center;
  }
}

#cookie-banner p {
  font-size: .8rem;
  color: var(--slate-400);
  flex: 1;
  line-height: 1.5;
}

.cookie-btn {
  padding: .55rem 1.25rem;
  background: var(--emerald-600);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: filter var(--transition);
}

.cookie-btn:hover { filter: brightness(1.1); }

/* ─── MODÁLNE OKNÁ ────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15,23,42,.7);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  /* Použij flex len keď je zobrazené */
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  max-width: 560px;
  width: 100%;
  max-height: 85dvh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s cubic-bezier(.4,0,.2,1) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-box h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  padding-right: 2rem; /* miesto pre × */
}

.modal-box h3 {
  font-size: .85rem;
  font-weight: 700;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 1.25rem;
  margin-bottom: .35rem;
}

.modal-box p {
  font-size: .875rem;
  color: var(--slate-600);
  line-height: 1.65;
}

.modal-box a {
  color: var(--emerald-700);
  text-decoration: underline;
}

.modal-close {
  position: absolute;
  top: 1.1rem; right: 1.25rem;
  background: var(--slate-100);
  border: none;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  font-size: .85rem;
  color: var(--slate-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.modal-close:hover {
  background: var(--slate-200);
  color: var(--slate-800);
}

.modal-footer-actions {
  margin-top: 1.75rem;
  display: flex;
  justify-content: flex-end;
}

/* V modáli btn-primary nemá flex:1 */
.modal-footer-actions .btn-primary {
  flex: unset;
  min-width: auto;
  padding: .7rem 1.5rem;
}

/* ─── ANIMÁCIE ────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up     { animation: fadeUp .45s cubic-bezier(.4,0,.2,1) both; }
.fade-up-d1  { animation-delay: .08s; }
.fade-up-d2  { animation-delay: .16s; }
.fade-up-d3  { animation-delay: .24s; }
.fade-up-d4  { animation-delay: .32s; }
.fade-up-d5  { animation-delay: .40s; }

/* ─── UTILITIES ───────────────────────────────────────────────── */
.table-scroll  { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mt-1          { margin-top: .5rem; }
.mt-2          { margin-top: 1rem; }
.mt-3          { margin-top: 1.5rem; }
.mb-1          { margin-bottom: .5rem; }

/* ─── ENTITY NOTE (jednoosobová) ──────────────────────────── */
.entity-note {
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 500;
  color: var(--slate-400);
  vertical-align: middle;
}

/* ─── DPH WARNING ─────────────────────────────────────────── */
.dph-warning {
  margin-top: 1rem;
  padding: .55rem .85rem;
  background: var(--amber-100);
  border-left: 3px solid var(--amber-400);
  border-radius: var(--radius-sm);
  font-size: .78rem;
  color: #92400e;
  font-weight: 500;
}

/* ─── ADVANCED TOGGLE ─────────────────────────────────────── */
.advanced-toggle {
  margin-top: 1.25rem;
  margin-bottom: .25rem;
}

.btn-advanced {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: none;
  border: 1.5px dashed var(--slate-300);
  border-radius: var(--radius-md);
  padding: .5rem 1rem;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  color: var(--slate-500);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.btn-advanced:hover {
  border-color: var(--emerald-500);
  color: var(--emerald-700);
  background: var(--emerald-50);
}

.advanced-icon { font-size: .9rem; }

.advanced-chevron {
  display: inline-block;
  font-size: 1.1rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform var(--transition);
  margin-left: .15rem;
}

.advanced-chevron.open {
  transform: rotate(90deg);
}

/* ─── ADVANCED PANEL ──────────────────────────────────────── */
.advanced-panel {
  margin-top: .85rem;
  padding: 1.25rem;
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  animation: fadeUp .25s ease both;
}

.advanced-panel[hidden] { display: none; }

.advanced-divider {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.advanced-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--slate-200);
}

/* Checkbox group */
.form-group--checks {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.checkbox-label {
  display: flex;
  align-items: center;   /* vertically center all children */
  gap: .75rem;
  cursor: pointer;
  font-size: .82rem;
  color: var(--slate-700);
  line-height: 1.4;
  position: relative;    /* needed for absolute-positioned real input */
}

.checkbox-text {
  display: flex;
  flex-direction: column;
  gap: .05rem;
}

.checkbox-label input[type="checkbox"] {
  /* Keep in flow so it receives clicks, but visually hidden */
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  opacity: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  cursor: pointer;
}

.checkbox-box {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--slate-300);
  border-radius: 4px;
  background: var(--white);
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  pointer-events: none; /* clicks handled by the real input above */
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-box {
  background: var(--emerald-600);
  border-color: var(--emerald-600);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-box::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.checkbox-label strong {
  display: block;
  font-weight: 600;
  font-size: .83rem;
  color: var(--slate-800);
}

.checkbox-label small {
  display: block;
  font-size: .73rem;
  color: var(--slate-400);
  margin-top: .1rem;
}

/* Number input in advanced panel – no left-pad needed for emoji prefix */
.advanced-panel input[type="number"] {
  padding-left: 2.4rem;
}

/* ─── ERROR TOAST ─────────────────────────────────────────── */
.error-toast {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-left: 4px solid #dc2626;
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  font-size: .85rem;
  color: #991b1b;
  font-weight: 500;
  margin-bottom: 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .3s ease, opacity .3s ease, margin .3s ease;
}

.error-toast.visible {
  max-height: 80px;
  opacity: 1;
}

.error-toast-icon { font-size: 1rem; flex-shrink: 0; }

.error-toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #dc2626;
  font-size: .9rem;
  cursor: pointer;
  padding: 0 .2rem;
  opacity: .7;
  flex-shrink: 0;
}
.error-toast-close:hover { opacity: 1; }

/* ─── INFO NOTE (in result cards) ────────────────────────── */
.info-note {
  margin-top: .75rem;
  padding: .5rem .8rem;
  background: var(--emerald-50);
  border-left: 3px solid var(--emerald-400);
  border-radius: var(--radius-sm);
  font-size: .78rem;
  color: var(--emerald-800);
  font-weight: 500;
}