/* ============================================================
   paragraf.tools — Tools Shared Stylesheet
   Used by all tool pages (/nastroje/*)
   ============================================================ */

/* ── Form groups ── */
.fg { margin-bottom: 16px; }
.fg__l { display: block; font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dark-dim); margin-bottom: 4px; }
.fg__h { font-size: .76rem; color: var(--text-dark-dim); margin-bottom: 5px; line-height: 1.4; }
.fg__sfx { display: flex; }
.fg__sfx .fg__in { border-radius: 6px 0 0 6px; border-right: none; }
.fg__in { width: 100%; padding: 10px 12px; border: 1px solid var(--ivory-mid); border-radius: 6px; font-family: var(--font-sans); font-size: .9rem; color: var(--text-dark); background: var(--surface); transition: border .15s; }
.fg__in:focus { outline: none; border-color: var(--purple-500); box-shadow: 0 0 0 3px rgba(112, 71, 176, .15); }
.fg__u { padding: 10px 12px; background: var(--ivory-soft); border: 1px solid var(--ivory-mid); border-radius: 0 6px 6px 0; font-size: .78rem; color: var(--text-dark-dim); white-space: nowrap; font-weight: 500; }
select.fg__in { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
textarea.fg__in { resize: vertical; min-height: 60px; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }
input[type=date] { font-family: var(--font-sans); }

/* ── Toggle switch ── */
.tg { position: relative; width: 36px; height: 19px; background: var(--ivory-mid); border-radius: 10px; cursor: pointer; transition: background .15s; border: none; flex-shrink: 0; }
.tg.on { background: var(--orange-500); }
.tg::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; background: var(--surface); border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.tg.on::after { transform: translateX(17px); }
.tg-row { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.tg-text { font-size: .8rem; color: var(--text-dark-dim); }

/* ── Buttons (tool-specific) ── */
.btn { display: inline-block; padding: 10px 22px; font-family: var(--font-sans); font-size: .84rem; font-weight: 500; border: none; border-radius: 5px; cursor: pointer; transition: all .15s; }
.btn--primary { background: var(--orange-500); color: #fff; }
.btn--primary:hover { background: var(--orange-600); transform: translateY(-1px); }
.btn--secondary { background: var(--surface); color: var(--text-dark-dim); border: 1px solid var(--ivory-mid); }
.btn--secondary:hover { border-color: var(--purple-400); }
.btn--outline { background: none; border: 1px solid var(--orange-500); color: var(--orange-500); }
.btn--outline:hover { background: var(--gold-dim); }
.btn--export { background: var(--purple-900); color: var(--orange-400); border: 1px solid var(--orange-500); }
.btn--export:hover { background: var(--purple-800); transform: translateY(-1px); }

/* ── Result card ── */
.rc { background: var(--purple-900); border-radius: 10px; padding: clamp(18px, 3vw, 24px); margin: 20px 0; }
.rc__lab { font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-light-dim); margin-bottom: 2px; }
.rc__val { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: var(--orange-400); }
.rc__sub { font-size: .78rem; color: var(--text-light-dim); margin-top: 4px; }
.rc__row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; }
.rc__k { font-size: .82rem; color: rgba(243, 239, 250, 0.65); }
.rc__v { font-size: .82rem; font-weight: 500; color: #F3EFFA; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc__v--g { color: var(--orange-400); font-weight: 600; }
.rc__sep { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 8px 0; }

/* ── Info box ── */
.ib { background: var(--surface); border: 1px solid var(--ivory-mid); border-radius: 8px; padding: 14px; margin: 14px 0; font-size: .82rem; line-height: 1.6; color: var(--text-dark-dim); }
.ib b { color: var(--text-dark); font-weight: 500; }
.ib--warn { border-color: var(--orange-500); background: rgba(249, 115, 22, .06); }

/* ── Mode switch (tariff) ── */
.ms { display: flex; background: var(--surface); border: 1px solid var(--ivory-mid); border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
.ms__b { flex: 1; padding: 10px 8px; text-align: center; font-family: var(--font-sans); font-size: .78rem; font-weight: 500; cursor: pointer; border: none; background: var(--surface); color: var(--text-dark-dim); transition: all .15s; border-right: 1px solid var(--ivory-mid); }
.ms__b:last-child { border-right: none; }
.ms__b.on { background: var(--purple-900); color: var(--orange-400); }
.ms__sub { font-size: .72rem; font-weight: 400; display: block; margin-top: 2px; opacity: .6; }

/* ── Scenario buttons (tariff simple) ── */
.scens { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.scen { padding: 8px 10px; border: 1px solid var(--ivory-mid); border-radius: 5px; background: var(--surface); cursor: pointer; text-align: left; transition: all .15s; font-family: var(--font-sans); }
.scen:hover { border-color: var(--purple-400); }
.scen.on { border-color: var(--orange-500); background: var(--gold-dim); }
.scen__n { display: block; font-size: .8rem; font-weight: 500; color: var(--text-dark); }
.scen__d { font-size: .72rem; color: var(--text-dark-dim); margin-top: 1px; }

/* ── Box (generic container) ── */
.box { background: var(--surface); border: 1px solid var(--ivory-mid); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.box__t { font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-500); margin-bottom: 12px; }

/* ── Big result display ── */
.big { text-align: center; padding: 16px 0 10px; }
.big__val { font-family: var(--font-serif); font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 700; color: var(--orange-500); }
.big__sub { font-size: .78rem; color: var(--text-dark-dim); margin-top: 4px; }

/* ── Detail rows ── */
.det { margin: 16px 0; }
.det__r { display: flex; justify-content: space-between; padding: 6px 0; font-size: .85rem; border-bottom: 1px solid var(--ivory-mid); }
.det__r:last-child { border-bottom: none; font-weight: 500; }

/* ── Comparison bar ── */
.cmp { background: var(--ivory-soft); border-radius: 8px; padding: 14px; margin: 16px 0; }
.cmp__bar { height: 8px; background: var(--ivory-mid); border-radius: 4px; overflow: hidden; margin: 6px 0; }
.cmp__fill { height: 100%; background: var(--orange-500); border-radius: 4px; transition: width .4s ease; }

/* ── Tabs (multi-tool pages) ── */
.tabs { display: flex; gap: 0; margin-bottom: 20px; border: 1px solid var(--ivory-mid); border-radius: 8px; overflow: hidden; }
.tabs__btn { flex: 1; padding: 10px; text-align: center; font-size: .78rem; font-weight: 500; cursor: pointer; border: none; background: var(--surface); color: var(--text-dark-dim); transition: all .15s; border-right: 1px solid var(--ivory-mid); }
.tabs__btn:last-child { border-right: none; }
.tabs__btn.on { background: var(--purple-900); color: var(--orange-400); }

/* ── Expert mode (tariff) ── */
.acts-list { margin: 16px 0; }
.acts-cat { font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-500); margin: 16px 0 6px; }
.act-row { display: grid; grid-template-columns: 24px 1fr auto auto 64px; gap: 4px 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--ivory-mid); font-size: .82rem; }
.act-row:last-child { border-bottom: none; }
.act-row.has-val { background: rgba(249, 115, 22, .06); }
.act__type { font-size: .72rem; font-weight: 600; text-align: center; color: var(--text-dark-dim); }
.act__type--half { color: var(--orange-500); }
.act__name { color: var(--text-dark-dim); line-height: 1.3; }
.act__ref { font-size: .72rem; color: var(--text-dark-dim); opacity: .6; white-space: nowrap; }
/* ── Quantity stepper (shared) ── */
.qty { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--ivory-mid); border-radius: 6px; overflow: hidden; background: var(--surface); transition: border-color .15s; }
.qty:focus-within { border-color: var(--purple-500); box-shadow: 0 0 0 2px rgba(112, 71, 176, .15); }
.qty__btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: none; background: var(--ivory-soft); cursor: pointer; font-size: 1rem; font-weight: 500; color: var(--text-dark-dim); transition: all .12s; user-select: none; -webkit-user-select: none; padding: 0; line-height: 1; }
.qty__btn:hover { background: var(--gold-dim); color: var(--text-dark); }
.qty__btn:active { background: var(--orange-500); color: #fff; }
.qty__in { width: 36px; height: 30px; border: none; border-left: 1px solid var(--ivory-mid); border-right: 1px solid var(--ivory-mid); text-align: center; font-size: .82rem; font-family: var(--font-sans); color: var(--text-dark); background: var(--surface); -moz-appearance: textfield; }
.qty__in::-webkit-outer-spin-button, .qty__in::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty__in:focus { outline: none; }
.qty--has-val .qty__in { font-weight: 600; color: var(--orange-600); }
.qty--has-val { border-color: var(--orange-500); }

.act__amt { text-align: right; font-family: var(--font-serif); color: var(--text-dark); white-space: nowrap; }
.act__note { grid-column: 1 / -1; }
.act__note textarea { width: 100%; padding: 4px 8px; border: 1px solid var(--ivory-mid); border-radius: 4px; font-size: .78rem; font-family: var(--font-sans); resize: none; min-height: 28px; }

/* ── Expert totals strip ── */
.etotals { background: var(--purple-900); border-radius: 8px; padding: 12px 16px; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.etotals__row { text-align: center; }
.etotals__l { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-light-dim); }
.etotals__v { font-family: var(--font-serif); font-size: 1rem; color: var(--text-light); font-weight: 500; }
.etotals__v--g { color: var(--orange-400); }

/* ── Export mode ── */
.exp-toggle { margin: 16px 0; }
.exp-header { margin: 16px 0; }
.exp-fields { margin: 12px 0; }
.exp-btn { margin: 12px 0; }

/* ── Wizard steps ── */
.wiz__steps { display: flex; gap: 0; margin-bottom: 24px; border: 1px solid var(--ivory-mid); border-radius: 8px; overflow: hidden; }
.wiz__step { flex: 1; padding: 8px 10px; text-align: center; font-size: .72rem; font-weight: 500; color: var(--text-dark-dim); background: var(--surface); border-right: 1px solid var(--ivory-mid); transition: all .15s; cursor: pointer; }
.wiz__step:last-child { border-right: none; }
.wiz__step.active { background: var(--purple-900); color: var(--orange-400); }
.wiz__step.done { background: var(--ivory-soft); color: var(--text-dark); }
.wiz__step-num { display: block; font-size: .72rem; opacity: .6; margin-bottom: 1px; }
.wiz__panel { display: none; }
.wiz__panel.on { display: block; }
.wiz__nav { display: flex; gap: 8px; margin-top: 20px; }

/* ── Summary preview ── */
.preview { background: var(--purple-900); border-radius: 10px; padding: clamp(18px, 3vw, 24px); margin: 16px 0; color: var(--text-light); font-size: .84rem; line-height: 1.7; }
.preview h3 { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; color: var(--orange-400); margin-bottom: 10px; }
.preview .row { display: flex; justify-content: space-between; padding: 3px 0; }
.preview .k { color: var(--text-light-dim); }
.preview .v { color: var(--text-light); }

/* ── Guide steps ── */
.guide-step { background: var(--surface); border: 1px solid var(--ivory-mid); border-radius: 8px; padding: 16px; margin-bottom: 12px; display: flex; gap: 14px; align-items: flex-start; }
.guide-num { flex-shrink: 0; width: 32px; height: 32px; background: var(--purple-900); color: var(--orange-400); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 600; }
.guide-body { flex: 1; }
.guide-body h4 { font-size: .88rem; font-weight: 500; color: var(--text-dark); margin-bottom: 4px; }
.guide-body p { font-size: .82rem; color: var(--text-dark-dim); margin: 0 0 6px; }
.guide-body a { color: var(--orange-500); }
.guide-tip { background: var(--gold-dim); border-radius: 5px; padding: 8px 10px; margin-top: 6px; font-size: .78rem; color: var(--text-dark-dim); }

/* ── Table (ISIR, interest breakdown) ── */
.tbl { width: 100%; border-collapse: collapse; font-size: .82rem; margin: 12px 0; }
.tbl th { background: var(--purple-900); color: var(--text-light); font-weight: 500; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px; text-align: left; }
.tbl td { padding: 6px 10px; border-bottom: 1px solid var(--ivory-mid); }
.tbl tr:nth-child(even) td { background: var(--neutral-50); }
.tbl tfoot td { font-weight: 500; border-top: 2px solid var(--purple-900); }
.tbl-sum td { font-weight: 600; border-top: 1px solid var(--neutral-300); }
.tbl-total td { font-weight: 700; background: var(--purple-900); color: var(--text-light); border: none; }
.tbl-total td.r { color: var(--orange-400); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Tool-page CTA ── */
.tool-cta { background: var(--gold-dim); border: 1px solid rgba(var(--gold-rgb), 0.2); border-radius: 8px; padding: 16px; text-align: center; margin: 20px 0; }
.tool-cta__t { font-size: .84rem; color: var(--text-dark); margin-bottom: 6px; }

/* ── ISIR link ── */
.isir-link { display: inline-block; padding: 8px 16px; background: var(--orange-500); color: #fff; border-radius: 5px; font-weight: 500; font-size: .84rem; text-decoration: none; transition: all .15s; }
.isir-link:hover { background: var(--orange-600); transform: translateY(-1px); }

/* ── Validation warning ── */
.val-warn { background: rgba(249,115,22,.06); border: 1px solid rgba(249,115,22,.4); border-radius: 8px; padding: 14px 16px; margin: 12px 0; animation: valShake .3s ease; }
.val-warn__title { font-size: .78rem; font-weight: 600; color: var(--danger, #E65100); margin-bottom: 8px; }
.val-warn__list { display: flex; flex-wrap: wrap; gap: 6px; }
.val-warn__item { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; background: white; border: 1px solid rgba(249,115,22,.4); border-radius: 20px; font-size: .78rem; color: var(--danger, #BF360C); text-decoration: none; cursor: pointer; transition: all .12s; }
.val-warn__item:hover { background: rgba(249,115,22,.06); border-color: var(--danger, #E65100); transform: translateY(-1px); }
.val-warn__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger, #E65100); flex-shrink: 0; }
.fg__in--err { border-color: var(--danger, #E65100) !important; box-shadow: 0 0 0 3px rgba(230,81,0,.15) !important; }
@keyframes valShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }

/* ── Combobox (searchable dropdown) ── */
.combo { position: relative; }
.combo__list { position: absolute; top: 100%; left: 0; right: 0; max-height: 220px; overflow-y: auto; background: var(--surface); border: 1px solid var(--purple-500); border-top: none; border-radius: 0 0 6px 6px; box-shadow: 0 6px 20px rgba(0,0,0,.12); z-index: 50; display: none; }
.combo__list.open { display: block; }
.combo__opt { padding: 8px 12px; font-size: .84rem; cursor: pointer; border-bottom: 1px solid var(--ivory-mid); color: var(--text-dark); }
.combo__opt:last-child { border-bottom: none; }
.combo__opt:hover, .combo__opt.active { background: var(--purple-50); color: var(--purple-900); }
.combo__opt mark { background: transparent; color: var(--orange-500); font-weight: 600; }
.combo__empty { padding: 10px 12px; font-size: .82rem; color: var(--text-dark-dim); font-style: italic; }

/* ── IČO lookup row ── */
.ico-row { display: flex; gap: 6px; align-items: flex-end; }
.ico-row .fg__in { flex: 1; }
.ico-btn { padding: 8px 14px; border: 1px solid var(--orange-500); background: var(--gold-dim); color: var(--purple-900); border-radius: 6px; font-size: .78rem; font-weight: 500; cursor: pointer; white-space: nowrap; transition: all .12s; font-family: var(--font-sans); }
.ico-btn:hover { background: var(--orange-500); color: #fff; }
.ico-btn:disabled { opacity: .5; cursor: wait; }
.ico-result { font-size: .78rem; color: var(--orange-500); margin-top: 2px; }
.ico-err { font-size: .78rem; color: #E65100; margin-top: 2px; }

/* ── Tool trust badge ── */
.tool-trust { display: flex; align-items: center; gap: 8px; padding: 12px 16px; margin: 16px 0; background: var(--purple-50, #f3effa); border-radius: 8px; font-size: .8rem; color: var(--neutral-600, #6b7280); }
.tool-trust__icon { font-size: 1rem; flex-shrink: 0; }
.tool-trust a { color: var(--purple-700, #5b21b6); font-weight: 600; text-decoration: none; }
.tool-trust a:hover { color: var(--orange-500); }

/* ── In-house CTA — replaces AdSense ── */
.promo-cta { margin: 16px 0; }
.promo-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 10px; background: linear-gradient(135deg, var(--purple-50, #F3EFFA) 0%, rgba(249,115,22,.04) 100%); border: 1px solid rgba(112,71,176,.1); }
.promo-cta__text { font-size: .84rem; color: var(--neutral-700, #45404D); }
.promo-cta__btn { display: inline-flex; padding: 8px 16px; background: var(--purple-900, #2D1B4E); color: #F3EFFA; border-radius: 6px; font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: all .15s; }
.promo-cta__btn:hover { background: var(--purple-700, #4A2D7A); transform: translateY(-1px); }
.partner-mode .promo-cta { display: none; }
@media (max-width: 600px) { .promo-cta__inner { flex-direction: column; text-align: center; } }

/* ── Tool disclaimer ── */
.tool-disclaimer { font-size: .76rem; color: var(--text-dark-dim); margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--ivory-mid); }

/* ── Layout helpers ── */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ft { font-size: .76rem; color: var(--text-dark-dim); margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--ivory-mid); line-height: 1.6; }

/* ── Panel/show toggle (tariff, travel) ── */
.pnl,.exp-header,.exp-btn,.act__note,.R{display:none}
.pnl.show,.exp-header.show,.exp-btn.show,.act__note.show,.R.show{display:block}
.exp-fields{display:none}.exp-fields.show{display:block}

/* ── Presets (deadline) ── */
.presets{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:16px}
.preset{padding:6px 12px;border:1px solid var(--ivory-mid);border-radius:20px;background:var(--surface);cursor:pointer;font-family:var(--font-sans);font-size:.74rem;color:var(--text-dark-dim);transition:all .12s;white-space:nowrap}
.preset:hover{border-color:var(--purple-400);color:var(--text-dark)}
.preset.on{background:var(--purple-900);color:var(--orange-400);border-color:var(--purple-900)}

/* ── Responsive ── */
@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; }
  .scens { grid-template-columns: 1fr; }
  .act-row { grid-template-columns: 24px 1fr auto 52px; font-size: .78rem; }
  .act__ref { display: none; }
  .etotals { flex-direction: column; gap: 8px; }
}
