/* Apartament Widna — okno rezerwacji (kalendarz z cenami). Tokeny z style.css. */
.rz-lock { overflow: hidden; }
.rz-dialog {
  width: min(1120px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6); overflow: auto;
}
.rz-dialog::backdrop { background: rgba(14, 13, 12, .78); backdrop-filter: blur(4px); }
.rz-dialog[open] { animation: rz-in .28s cubic-bezier(.2, .7, .2, 1); }
@keyframes rz-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .rz-dialog[open] { animation: none; } }

.rz { font: 300 16px/1.55 var(--sans); }
.rz button { font: inherit; color: inherit; cursor: pointer; }
.rz button:disabled { cursor: default; }

/* Góra: tytuł + wybór apartamentu */
.rz-top { display: flex; align-items: center; gap: 20px 28px; flex-wrap: wrap; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.rz-title { font-size: 1.7rem; line-height: 1.1; margin-right: auto; }
.rz-apts { display: flex; gap: 10px; flex-wrap: wrap; }
.rz-apt { display: flex; align-items: center; gap: 12px; padding: 6px 16px 6px 6px; background: transparent; border: 1px solid var(--line); text-align: left; transition: border-color .15s; }
.rz-apt img { width: 64px; height: 44px; object-fit: cover; filter: saturate(.85); }
.rz-apt b { display: block; font-weight: 400; font-family: var(--serif); font-size: 1.02rem; line-height: 1.2; }
.rz-apt small { display: block; font-size: 12.5px; color: var(--muted); }
.rz-apt:hover { border-color: var(--field); }
.rz-apt.on { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); }
.rz-apt.on img { filter: none; }
.rz-x { width: 44px; height: 44px; margin-left: 4px; border: 0; background: transparent; font-size: 30px !important; line-height: 1; color: var(--muted) !important; }
.rz-x:hover { color: var(--ink) !important; }

.rz-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto 1fr; grid-template-areas: "cal sum" "cal bar"; }
.rz-cal { grid-area: cal; }
.rz-sum { grid-area: sum; }
.rz-bar { grid-area: bar; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; padding: 0 26px 26px; background: #22211F; border-left: 1px solid var(--line); }

/* Kalendarz */
.rz-cal { padding: 22px 28px 26px; min-width: 0; }
.rz-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rz-nav button { width: 40px; height: 40px; border: 1px solid var(--line); background: transparent; font-size: 22px; line-height: 1; }
.rz-nav button:hover { border-color: var(--brass); color: var(--brass); }
.rz-hint { flex: 1; text-align: center; font-size: 14.5px; color: var(--soft); }
.rz-months { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.rz-month h4 { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; margin: 0 0 10px; text-transform: lowercase; }
.rz-month h4::first-letter { text-transform: uppercase; }
.rz-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.rz-wd { font-size: 12px; color: var(--muted); text-align: center; padding-bottom: 6px; }
.rz-day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 54px; padding: 0; border: 0; background: transparent; isolation: isolate;
}
.rz-day .n { font-family: var(--serif); font-size: 17px; line-height: 1.1; font-variant-numeric: lining-nums; }
.rz-day .p { font-size: 11px; color: var(--muted); line-height: 1.3; min-height: 1.3em; font-variant-numeric: tabular-nums; }
.rz-day:not(:disabled):hover::before { content: ""; position: absolute; inset: 3px; border: 1px solid var(--brass); z-index: -1; }
.rz-day.past { opacity: .28; }
.rz-day.taken .n { color: #6f6a62; text-decoration: line-through; text-decoration-color: #6f6a62; }
.rz-day.short:not(.mid):not(.end) { opacity: .45; }

/* Pasmo pobytu: jeden ciągły mosiężny pas od przyjazdu do wyjazdu, ścięty ukośnie jak kreska w logo A/W */
.rz-day.mid::after, .rz-day.start::after, .rz-day.end::after { content: ""; position: absolute; inset: 7px 0; z-index: -2; background: rgba(200, 162, 107, .16); }
.rz-day.start::after { left: 50%; }
.rz-day.end::after { right: 50%; }
.rz-day.solo::after { display: none; }
.rz-day.start .n, .rz-day.end .n { color: var(--bg); }
.rz-day.start .p, .rz-day.end .p { color: rgba(28, 27, 26, .72); }
.rz-day.start::before, .rz-day.end::before {
  content: ""; position: absolute; inset: 3px 4px; z-index: -1; background: var(--brass);
}
.rz-day.start::before { clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
.rz-day.end::before { clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%); }
.rz-day.mid .n { color: var(--ink); }
.rz-day.mid .p { color: var(--soft); }
.rz-day.preview.mid::after, .rz-day.preview.end::after { background: rgba(200, 162, 107, .09); }
.rz-day.preview.end::before { background: transparent; box-shadow: inset 0 0 0 1px var(--brass); clip-path: none; }
.rz-day.preview.end .n { color: var(--ink); }
.rz-day.preview.end .p { color: var(--muted); }
.rz-fallback { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Podsumowanie */
.rz-sum { display: flex; flex-direction: column; gap: 16px; padding: 22px 26px 8px; background: #22211F; border-left: 1px solid var(--line); }
.rz-photo { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); }
.rz-photo img { width: 100%; height: 100%; object-fit: cover; }
.rz-apt-meta h3 { font-size: 1.45rem; line-height: 1.15; }
.rz-note { font-size: 14px; color: var(--muted); }
.rz-score { margin-top: 6px; font-size: 13.5px; color: var(--soft); }
.rz-score b { display: inline-block; min-width: 2.3em; padding: 1px 6px; margin-right: 6px; background: var(--ink); color: var(--bg); font-weight: 500; text-align: center; }
.rz-dates { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border: 1px solid var(--line); }
.rz-dates div { padding: 10px 14px; }
.rz-dates div + div { border-left: 1px solid var(--line); }
.rz-dates dt { font-size: 12.5px; color: var(--muted); }
.rz-dates dd { margin: 2px 0 0; font-family: var(--serif); font-size: 1.05rem; }
.rz-guests { display: flex; align-items: center; justify-content: space-between; }
.rz-guests > span { font-size: 15px; color: var(--soft); }
.rz-step { display: flex; align-items: center; border: 1px solid var(--line); }
.rz-step button { width: 42px; height: 40px; border: 0; background: transparent; font-size: 20px; }
.rz-step button:hover:not(:disabled) { color: var(--brass); }
.rz-step button:disabled { opacity: .3; }
.rz-step output { min-width: 34px; text-align: center; font-family: var(--serif); font-size: 1.1rem; }
.rz-warn { min-height: 1.4em; margin-top: -8px; font-size: 13px; color: var(--muted); }
.rz-warn.on { color: var(--brass); }
.rz-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); min-height: 52px; visibility: hidden; }
.rz-price.on { visibility: visible; }
.rz-n { font-size: 13px; color: var(--muted); }
.rz-total { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1; white-space: nowrap; }
.rz-cta { height: 56px; border: 0; background: var(--brass); color: var(--bg) !important; font-weight: 500 !important; font-size: 16px; letter-spacing: .02em; transition: filter .15s; }
.rz-cta:hover:not(:disabled) { filter: brightness(1.08); }
.rz-cta:disabled { background: transparent; color: var(--muted) !important; box-shadow: inset 0 0 0 1px var(--line); font-weight: 300 !important; }
.rz-next1 { margin-top: -6px; font-size: 12.5px; color: var(--muted); text-align: center; }
.rz-promo summary { font-size: 13.5px; color: var(--soft); cursor: pointer; list-style: none; text-align: center; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--field); }
.rz-promo summary::-webkit-details-marker { display: none; }
.rz-promo input { width: 100%; height: 44px; margin-top: 10px; padding: 0 12px; background: var(--bg); color: var(--ink); border: 1px solid var(--field); font: inherit; font-size: 15px; }
.rz :focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* Wybór taryfy: elastyczna / bezzwrotna */
.rz-rates { display: none; flex-direction: column; gap: 8px; }
.rz-rates.on { display: flex; }
.rz-rate { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: transparent; border: 1px solid var(--line); text-align: left; }
.rz-rate b { display: block; font-weight: 500; font-size: 14.5px; }
.rz-rate small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.rz-rate em { font-style: normal; font-family: var(--serif); font-size: 1.05rem; white-space: nowrap; }
.rz-rate::before { content: ""; flex: none; width: 14px; height: 14px; border: 1px solid var(--field); border-radius: 50%; }
.rz-rate.on { border-color: var(--brass); }
.rz-rate.on::before { border-color: var(--brass); background: radial-gradient(circle, var(--brass) 0 4px, transparent 5px); }
.rz-rate > span { flex: 1; }

/* Kod rabatowy */
.rz-promo-row { display: flex; gap: 8px; margin-top: 10px; }
.rz-promo-row input { margin-top: 0 !important; flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .06em; }
.rz-apply { flex: none; height: 44px; padding: 0 16px; border: 1px solid var(--brass); background: transparent; color: var(--brass) !important; font-size: 14px; }
.rz-apply:hover { background: var(--brass); color: var(--bg) !important; }
.rz-promo-msg { min-height: 1.3em; margin-top: 6px; font-size: 13px; color: var(--brass); text-align: left; }
.rz-promo-msg.bad { color: #d98b7a; }
.rz-promo.ok .rz-promo-row input { border-color: var(--brass); color: var(--brass); }

/* Tryb osadzony (rezerwacja.html) */
.rz-inline .rz { border: 1px solid var(--line); background: var(--panel); }

/* Tablet / telefon */
@media (max-width: 960px) {
  .rz-body { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "sum" "cal" "bar"; }
  .rz-sum { border-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .rz-sum .rz-warn:empty { display: none; }
  .rz-bar { border-left: 0; padding-top: 16px; }
  .rz-photo, .rz-apt-meta { display: none; }
  .rz-sum { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 16px; }
  .rz-dates { grid-column: 1; }
  .rz-guests { grid-column: 2; flex-direction: column; align-items: flex-start; gap: 4px; }
  .rz-guests > span { font-size: 12.5px; color: var(--muted); }
  .rz-warn { grid-column: 1 / -1; margin-top: 0; }
}
@media (max-width: 720px) {
  .rz-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; }
  .rz-top { padding: 14px 16px; gap: 12px; }
  .rz-title { font-size: 1.35rem; }
  .rz-apts { order: 3; width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .rz-apt { padding: 8px 10px; gap: 8px; }
  .rz-apt img { display: none; }
  .rz-apt b { font-size: .98rem; }
  .rz-apt small { font-size: 12px; }
  .rz-sum { grid-template-columns: 1fr; padding: 14px 16px; }
  .rz-guests { grid-column: 1; flex-direction: row; align-items: center; justify-content: space-between; }
  .rz-cal { padding: 14px 12px 18px; }
  .rz-months { grid-template-columns: 1fr; gap: 22px; }
  .rz-day { height: 50px; }
  .rz-bar { position: sticky; bottom: 0; z-index: 2; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); gap: 10px; border-top: 1px solid var(--line); box-shadow: 0 -16px 36px rgba(0, 0, 0, .45); }
  .rz-price { min-height: 0; padding-top: 0; border-top: 0; }
  .rz-price:not(.on) { display: none; }
  .rz-rate { padding: 8px 10px; }
  .rz-price { display: none !important; }
  .rz-rate small { font-size: 11.5px; }
  .rz-total { font-size: 1.55rem; }
  .rz-cta { height: 52px; }
  .rz-next1, .rz-promo:not([open]) { display: none; }
  .rz-promo[open] summary { display: none; }
  .rz-promo input { margin-top: 0; height: 40px; }
  .rz-apply { height: 40px; }
  .rz-promo-msg { margin-top: 4px; font-size: 12px; }
}
/* Terminy bez ustalonej ceny: "na zapytanie" */
.rz-day.ask .p { color: var(--brass); opacity: .75; }
.rz-asknote { margin-top: 14px; font-size: 13px; color: var(--soft); border-left: 2px solid var(--brass); padding-left: 10px; }
.rz.asking .rz-total { font-family: var(--sans); font-size: 16px; color: var(--soft); }
