/* Rezervácie servisu — spoločný dizajnový základ (tokeny eshopu DAMO Slovakia) */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/static/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/static/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --red: #d3141b;
  --red-hover: #b71017;
  --red-press: #9e0d13;
  --red-tint: #fdf3f3;
  --red-tint-2: #fbe5e6;
  --red-ring: rgba(211, 20, 27, .22);
  --navy: #00345a;
  --ink: #1d3149;
  --text: #314158;
  --muted: #56698a;
  --subtle: #8a99ae;
  --line: #e4eaf2;
  --line-2: #cad5e2;
  --control: #7b8ba3;          /* hranice ovládacích prvkov: 3,46 : 1 na bielej (WCAG 1.4.11) */
  --placeholder: #65768f;      /* 4,6 : 1 */
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --green: #0b7a3e;
  --green-tint: #e7f6ee;
  --amber: #a14a06;
  --amber-tint: #fff4e2;
  --blue: #1f59c4;
  --blue-tint: #eaf1fd;
  --violet: #6b3fc9;
  --violet-tint: #f1ecfc;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 38, 68, .05);
  --shadow: 0 1px 2px rgba(16, 38, 68, .04), 0 8px 28px -10px rgba(16, 38, 68, .14);
  --shadow-lg: 0 28px 60px -18px rgba(16, 38, 68, .30);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0; color: var(--navy); line-height: 1.2; letter-spacing: -.015em; }
p { margin: 0; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-hover); }
button { font: inherit; color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* „Preskočiť na obsah": viditeľný, keď naň príde fokus */
.skip:focus {
  position: fixed !important; left: 12px; top: 12px; z-index: 1100; width: auto; height: auto; margin: 0; overflow: visible;
  clip: auto; white-space: normal; padding: .625rem 1rem; background: #fff; color: var(--navy); font-weight: 650;
  border-radius: 10px; box-shadow: var(--shadow-lg);
}
/* tmavomodrý rámček fokusu: 12,8 : 1 na bielej, dobre viditeľný aj pri červených tlačidlách */
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
a[href^="tel:"] { white-space: nowrap; }
::selection { background: var(--red-tint-2); }

.ico-svg { width: 24px; height: 24px; flex: none; }
.ico-sm { width: 18px; height: 18px; }
.ico-xs { width: 16px; height: 16px; }
.ico-lg { width: 28px; height: 28px; }

/* ---------- tlačidlá ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 0 1.25rem; border-radius: 12px; border: 1px solid transparent;
  font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease),
    box-shadow .15s var(--ease), transform .08s var(--ease);
  user-select: none; white-space: nowrap;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .45; box-shadow: none; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 18px -10px rgba(211, 20, 27, .75); }
.btn-primary:hover:not(:disabled) { background: var(--red-hover); color: #fff; }
.btn-primary:active:not(:disabled) { background: var(--red-press); }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--line-2); }
.btn-secondary:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--navy); }
.btn-danger { background: #fff; color: #b3121a; border-color: #efc5c7; }
.btn-danger:hover:not(:disabled) { background: var(--red-tint); color: #9e0d13; border-color: #e3a3a6; }
.btn-sm { min-height: 38px; padding: 0 .875rem; font-size: .9375rem; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 0 1.5rem; font-size: 1.0625rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn .spinner { width: 18px; height: 18px; border-width: 2px; }

.link-btn {
  background: none; border: 0; padding: 0; color: var(--red); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--red-hover); }

.spinner {
  display: inline-block; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- formulár ---------- */
.field { display: grid; gap: .375rem; min-width: 0; align-content: start; }
.field > label, .label { font-weight: 600; font-size: .9375rem; color: var(--navy); }
.field .opt { font-weight: 500; color: var(--muted); font-size: .8125rem; margin-left: .25rem; }
.hint { font-size: .8125rem; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  min-height: 48px; padding: .6875rem .875rem; border: 1px solid var(--control); border-radius: 12px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
.select {
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder); opacity: 1; }
@media (hover: hover) { .input:hover, .textarea:hover, .select:hover { border-color: var(--navy); } }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-ring); }
.field.invalid .input, .field.invalid .textarea, .field.invalid .select { border-color: #d3141b; background: #fffbfb; }
.field-error { display: flex; gap: .375rem; align-items: flex-start; color: #b3121a; font-size: .8125rem; font-weight: 500; }
.field-error .ico-svg { width: 16px; height: 16px; margin-top: 1px; }

.check {
  display: flex; gap: .75rem; align-items: flex-start; cursor: pointer; padding: .25rem 0;
  font-size: .9375rem; color: var(--text); line-height: 1.45;
}
.check input {
  flex: none; margin: 1px 0 0; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--control);
  background: #fff; display: grid; place-content: center; cursor: pointer; -webkit-appearance: none; appearance: none;
  transition: background-color .12s var(--ease), border-color .12s var(--ease);
}
.check input::before {
  content: ''; width: 12px; height: 12px; transform: scale(0); transition: transform .12s var(--ease);
  background: #fff; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.check input:checked { background: var(--red); border-color: var(--red); }
.check input:checked::before { transform: scale(1); }
.check input:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.check b { color: var(--navy); font-weight: 600; }

.switch { display: inline-flex; align-items: center; gap: .75rem; cursor: pointer; font-weight: 600; color: var(--navy); }
.switch input {
  -webkit-appearance: none; appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--control);
  position: relative; cursor: pointer; transition: background-color .15s var(--ease); flex: none; margin: 0;
}
.switch input::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s var(--ease);
}
.switch input:checked { background: var(--red); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- prepínač (segmenty) ---------- */
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: .5rem 1rem; border-radius: 10px; font-weight: 650; color: var(--muted);
  cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; font-size: .9375rem; }
.seg button:hover { color: var(--navy); }
.seg button[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.seg .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: .75rem;
  display: inline-grid; place-items: center; font-weight: 700; }


/* ---------- karty, odznaky, hlásenia ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 24px; }
.badge {
  display: inline-flex; align-items: center; gap: .375rem; padding: .1875rem .625rem; border-radius: var(--pill);
  font-size: .8125rem; font-weight: 650; line-height: 1.5; white-space: nowrap; background: var(--surface-2); color: var(--text);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-pending { background: var(--amber-tint); color: var(--amber); }
.badge-confirmed { background: var(--blue-tint); color: var(--blue); }
.badge-arrived { background: var(--violet-tint); color: var(--violet); }
.badge-done { background: var(--green-tint); color: var(--green); }
.badge-no_show { background: #f1f3f6; color: #5a6475; }
.badge-cancelled { background: #f6eeee; color: #8f3a3e; }

.alert {
  display: flex; gap: .75rem; align-items: flex-start; padding: 14px 16px; border-radius: 14px;
  font-size: .9375rem; line-height: 1.5; border: 1px solid transparent;
}
.alert .ico-svg { margin-top: 1px; }
.alert-info { background: var(--blue-tint); color: #143f8a; border-color: #d6e3fb; }
.alert-warn { background: var(--amber-tint); color: #7a3a05; border-color: #f6dfb7; }
.alert-error { background: #fdf0f0; color: #8e1116; border-color: #f4cfd1; }
.alert-success { background: var(--green-tint); color: #0a5c30; border-color: #c9ebd8; }
.alert b { font-weight: 650; }

/* ---------- toast ---------- */
.toasts {
  position: fixed; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  display: flex; gap: .75rem; align-items: center; padding: 12px 16px; border-radius: 14px;
  background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); font-weight: 550; font-size: .9375rem;
  animation: toast-in .22s var(--ease); pointer-events: auto;
}
.toast.error { background: #9e0d13; }
.toast > span { flex: 1; }
.toast-x { flex: none; width: 32px; height: 32px; margin: -6px -8px -6px 0; border: 0; border-radius: 8px; background: transparent; color: #fff;
  display: grid; place-items: center; cursor: pointer; }
.toast-x:hover { background: rgba(255, 255, 255, .14); }
.toast-x:focus-visible { outline-color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- modál ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 900; background: rgba(9, 25, 46, .42); backdrop-filter: blur(2px);
  display: grid; place-items: center; padding: 16px; animation: fade-in .15s var(--ease);
}
.modal {
  width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 24px; animation: pop-in .18s var(--ease);
}
.modal h2 { font-size: 1.25rem; margin-bottom: .5rem; }
.modal .modal-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
