/* Rezervační kalendář – vhaji.cz
   Barvy si můžeš doladit tady nahoře, zbytek není potřeba měnit. */
.rz {
  --rz-bg: #f6f3ec;          /* pozadí bloku */
  --rz-card: #ffffff;        /* pozadí kalendáře a formuláře */
  --rz-text: #1e2216;        /* text */
  --rz-muted: #6b6f60;       /* vedlejší text */
  --rz-line: #dcd8cc;        /* linky */
  --rz-free: #e7eedc;        /* volný den */
  --rz-free-text: #2f3d1e;
  --rz-busy: #e6e2da;        /* obsazený den */
  --rz-busy-text: #a29d92;
  --rz-partial: #f3e3c3;     /* částečně obsazeno */
  --rz-accent: #1e2216;      /* vybraný termín, tlačítko */
  --rz-accent-text: #ffffff;
  --rz-ok: #2f6b2f;
  --rz-bad: #a33a2a;
  --rz-radius: 10px;

  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
  background: var(--rz-bg);
  border-radius: calc(var(--rz-radius) * 1.6);
  color: var(--rz-text);
  font: inherit;
  text-align: left;
  box-sizing: border-box;
}
.rz *, .rz *::before, .rz *::after { box-sizing: border-box; }
.rz button, .rz input, .rz select, .rz textarea { font: inherit; color: inherit; }
.rz [hidden] { display: none !important; }

.rz-cal, .rz-side {
  background: var(--rz-card);
  border-radius: var(--rz-radius);
  padding: 20px;
  min-width: 0;
}
.rz-cal { align-self: start; }

/* hlavička měsíce */
.rz-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rz-title { font-weight: 600; font-size: 1.1em; }
.rz-nav {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--rz-line); background: transparent; cursor: pointer;
  font-size: 22px; line-height: 1; display: grid; place-items: center;
}
.rz-nav:hover:not(:disabled) { background: var(--rz-free); }
.rz-nav:disabled { opacity: .3; cursor: default; }

.rz-wd, .rz-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.rz-wd span { text-align: center; font-size: .8em; color: var(--rz-muted); padding: 4px 0; text-transform: uppercase; letter-spacing: .04em; }
.rz-grid.rz-loading { opacity: .4; pointer-events: none; }

.rz-day {
  aspect-ratio: 1 / 1; min-height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px; padding: 0;
  font-size: .95em; font-variant-numeric: tabular-nums;
  background: transparent; position: relative; overflow: hidden;
}
.rz-day > span { position: relative; z-index: 1; }
button.rz-day { cursor: pointer; }
.rz-empty { visibility: hidden; }
.rz-past, .rz-closed, .rz-unknown { color: var(--rz-line); }
.rz-free { background: var(--rz-free); color: var(--rz-free-text); font-weight: 500; }
button.rz-free:hover { outline: 2px solid var(--rz-accent); outline-offset: -2px; }
.rz-busy { background: var(--rz-busy); color: var(--rz-busy-text); text-decoration: line-through; }
.rz-partial { background: linear-gradient(135deg, var(--rz-free) 50%, var(--rz-partial) 50%); color: var(--rz-free-text); font-weight: 500; }
button.rz-partial:hover { outline: 2px solid var(--rz-accent); outline-offset: -2px; }

/* noci: den, kdy cizí host odjíždí / přijíždí – půlený */
.rz-free.rz-after-busy { background: linear-gradient(135deg, var(--rz-busy) 50%, var(--rz-free) 50%); }
.rz-busy.rz-before-busy { background: linear-gradient(135deg, var(--rz-free) 50%, var(--rz-busy) 50%); }

/* lze zvolit jako den odjezdu */
.rz-can-out { text-decoration: none; color: var(--rz-free-text); font-weight: 500; }
button.rz-can-out:hover { outline: 2px solid var(--rz-accent); outline-offset: -2px; }

.rz-sel { background: var(--rz-accent) !important; color: var(--rz-accent-text) !important; text-decoration: none; font-weight: 600; border-radius: 0; }
.rz-sel.rz-start { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.rz-sel.rz-end { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.rz-day:focus-visible { outline: 3px solid var(--rz-accent); outline-offset: 1px; }

.rz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: .82em; color: var(--rz-muted); }
.rz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rz-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.rz-l-free { background: var(--rz-free); }
.rz-l-busy { background: var(--rz-busy); }
.rz-l-partial { background: linear-gradient(135deg, var(--rz-free) 50%, var(--rz-partial) 50%); }
.rz-l-sel { background: var(--rz-accent); }

/* pravá část */
.rz-name { margin: 0 0 10px; font-size: 1.25em; line-height: 1.25; }
.rz-summary p { margin: 0 0 6px; }
.rz-hint { color: var(--rz-muted); }
.rz-small { font-size: .85em; color: var(--rz-muted); }
.rz-range { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rz-range span { display: flex; flex-direction: column; }
.rz-range strong { font-size: .75em; text-transform: uppercase; letter-spacing: .05em; color: var(--rz-muted); font-weight: 600; }
.rz-arrow { font-size: 1.3em; color: var(--rz-muted); }
.rz-nights { font-weight: 600; }
.rz-times { margin: 10px 0 4px; }

.rz-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rz-line); }
.rz-row { margin-bottom: 12px; }
.rz-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rz label { display: block; font-size: .85em; color: var(--rz-muted); }
.rz input:not([type=checkbox]), .rz select, .rz textarea {
  display: block; width: 100%; margin-top: 4px;
  padding: 10px 12px; border: 1px solid var(--rz-line); border-radius: 8px;
  background: #fff; color: var(--rz-text); font-size: 16px;
}
.rz input:focus, .rz select:focus, .rz textarea:focus { outline: 2px solid var(--rz-accent); outline-offset: -1px; border-color: transparent; }
.rz textarea { resize: vertical; }
.rz-check { display: flex !important; gap: 8px; align-items: flex-start; margin: 4px 0 14px; line-height: 1.4; }
.rz-check input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--rz-accent); }
.rz-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.rz .rz-submit {
  width: 100%; padding: 14px 18px; border: 0; border-radius: 999px;
  background: var(--rz-accent); color: var(--rz-accent-text);
  font-weight: 600; cursor: pointer; transition: opacity .15s;
}
.rz .rz-submit:disabled { opacity: .35; cursor: not-allowed; }
.rz .rz-submit:not(:disabled):hover { opacity: .88; }
.rz-note { font-size: .8em; color: var(--rz-muted); margin: 10px 0 0; }
.rz-msg:empty { display: none; }
.rz-msg { margin-top: 12px; padding: 12px 14px; border-radius: 8px; font-size: .92em; }
.rz-ok { background: #e3efdf; color: var(--rz-ok); }
.rz-bad { background: #f6e1dc; color: var(--rz-bad); }
.rz-err { grid-column: 1 / -1; color: var(--rz-bad); }

/* cena */
.rz-price:empty { display: none; }
.rz-price { margin: 12px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--rz-bg); }
.rz-price > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rz-price > div + div { margin-top: 4px; }
.rz-price span { color: var(--rz-muted); font-size: .9em; }
.rz-price strong { font-size: 1.1em; font-variant-numeric: tabular-nums; }

/* platba */
.rz-pay-lead { font-weight: 600; margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; background: var(--rz-partial); }
.rz-pay-grid { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.rz-qr svg { display: block; width: 168px; height: 168px; border: 1px solid var(--rz-line); border-radius: 8px; }
.rz-pay dl { margin: 0; display: grid; gap: 2px; }
.rz-pay dt { font-size: .75em; text-transform: uppercase; letter-spacing: .05em; color: var(--rz-muted); margin-top: 6px; }
.rz-pay dt:first-child { margin-top: 0; }
.rz-pay dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-word; }
.rz .rz-copy { background: none; border: 0; padding: 0; font-weight: 600; cursor: pointer; text-align: left; border-bottom: 1px dashed var(--rz-line); position: relative; }
.rz .rz-copy:hover { border-bottom-color: var(--rz-accent); }
.rz-copy.rz-copied::after { content: attr(data-done); position: absolute; left: calc(100% + 8px); top: 0; font-size: .8em; font-weight: 400; color: var(--rz-ok); white-space: nowrap; }
.rz-pay .rz-small { margin: 12px 0 0; }
.rz .rz-again { margin-top: 18px; width: 100%; padding: 12px; border-radius: 999px; border: 1px solid var(--rz-line); background: transparent; cursor: pointer; font-weight: 600; }
.rz .rz-again:hover { background: var(--rz-free); }

@media (max-width: 760px) {
  .rz-pay-grid { grid-template-columns: 1fr; justify-items: center; }
  .rz-pay dl { justify-self: stretch; }
  .rz-qr svg { width: 200px; height: 200px; }
  .rz { grid-template-columns: 1fr; padding: 12px; gap: 12px; border-radius: var(--rz-radius); }
  .rz-cal, .rz-side { padding: 14px; }
  .rz-2 { grid-template-columns: 1fr; }
  .rz-wd, .rz-grid { gap: 3px; }
}
