/* Vrh Kalendar: javne stranice */
:root {
  --accent: #2563eb;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --danger: #dc2626;
  --r: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not(.is-embed) {
    --bg: #0b0d12;
    --panel: #12151c;
    --ink: #f3f4f6;
    --ink-2: #d1d5db;
    --muted: #9ca3af;
    --line: #262b36;
    --soft: #1a1f29;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.is-embed body { background: transparent; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
a { color: inherit; }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* okvir */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 16px; }
.is-embed .shell { min-height: 0; padding: 0; }
.panel { width: 100%; max-width: 1000px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 30px rgba(0,0,0,.05); }
.is-embed .panel { box-shadow: none; }
.shell.narrow .panel { max-width: 560px; padding: 32px; }
.foot { margin: 0; font-size: 13px; color: var(--muted); }
.foot a { text-decoration: none; }
.foot a[aria-current] { color: var(--ink); font-weight: 600; }
.foot .sep { margin: 0 4px; }

/* raspored stranice za rezervaciju */
.book { display: grid; grid-template-columns: 300px 1fr; min-height: 520px; }
.side { padding: 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.main { padding: 28px; min-width: 0; position: relative; }
.host { display: flex; flex-direction: column; gap: 12px; }
.host-who { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 500; line-height: 1.3; }
.host-who small { color: var(--muted); font-weight: 400; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.host-title { font-size: 22px; }
.host-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.host-meta li { display: flex; gap: 8px; align-items: center; }
.host-meta svg { color: var(--muted); }
.host-desc { margin: 0; color: var(--muted); }
.was { display: flex; flex-direction: column; font-size: 14px; color: var(--muted); }
.was s { color: var(--ink-2); }
.side-picked { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; background: var(--soft); font-weight: 500; }
.side-picked svg { color: var(--accent); margin-top: 2px; }

/* kalendar */
.pick { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 28px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-head h2 { font-size: 17px; }
.cal-nav { display: flex; gap: 4px; }
.icon { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.icon:hover:not(:disabled) { background: var(--soft); }
.icon:disabled { opacity: .3; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dow span { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.day { aspect-ratio: 1; max-height: 56px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; cursor: default; position: relative; }
.day.has { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--ink); font-weight: 600; cursor: pointer; }
.day.has:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.day.sel { background: var(--accent) !important; color: #fff !important; }
.day.today::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.days.is-loading { opacity: .4; pointer-events: none; }
.tz { margin-top: 20px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; max-width: 100%; }
.tz select { border: 0; background: transparent; color: var(--ink-2); font: inherit; max-width: 240px; cursor: pointer; }
.times h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.slot-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 2px; }
.slot { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 10px; padding: 11px 12px; font: inherit; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.slot:hover { border-color: var(--accent); color: var(--accent); }
.slot.sel { background: var(--accent); border-color: var(--accent); color: #fff; }

/* obrazac */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.form h2 { font-size: 18px; margin-bottom: 2px; }
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted); font: inherit; padding: 0; cursor: pointer; }
.back:hover { color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
input, textarea, select { font: inherit; color: var(--ink); }
.field input, .field textarea, .phone select {
  width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field textarea:focus, .phone select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.invalid, .field .invalid { border-color: var(--danger) !important; }
.phone { display: flex; gap: 8px; }
.phone select { width: auto; flex: none; padding-right: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { margin: 0; color: var(--danger); font-size: 14px; }
.error.banner { margin-bottom: 16px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.wide { width: 100%; margin-top: 4px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink-2); filter: none; }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.row { display: flex; flex-wrap: wrap; gap: 10px; }

/* potvrda i upravljanje */
.done { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
.done h2 { font-size: 22px; }
.done p, .manage p { margin: 0; }
.ok { width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, #16a34a 14%, transparent); color: #16a34a; display: grid; place-items: center; }
.ok svg { width: 22px; height: 22px; stroke-width: 2.4; }
.facts { display: grid; grid-template-columns: 70px 1fr; gap: 8px 16px; margin: 4px 0; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.manage { display: flex; flex-direction: column; gap: 16px; }
.manage h1 { font-size: 22px; }
.manage form { display: flex; flex-direction: column; gap: 14px; }
.msg h1 { font-size: 22px; margin-bottom: 8px; }
.msg p { color: var(--ink-2); }
.pad { padding: 8px; }

.loading { display: grid; place-items: center; min-height: 300px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* mobitel i uske ugrađene stranice */
@media (max-width: 860px) {
  .pick { grid-template-columns: 1fr; }
  .slot-list { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}
@media (max-width: 720px) {
  .shell { padding: 16px; justify-content: flex-start; }
  .book { grid-template-columns: 1fr; min-height: 0; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; gap: 14px; }
  .main { padding: 20px; }
  .host-title { font-size: 19px; }
  .shell.narrow .panel { padding: 22px; }
}
@media (max-width: 380px) {
  .grid { gap: 3px; }
  .phone select { max-width: 104px; }
}
