/* ============================================================
   Rezervačný systém — kalendár obsadenosti a formulár
   Farby a typografia preberajú tému Apartmánu (terakotová #aa8453)
   ============================================================ */

.booking-wrap {
  --terracotta: #aa8453;
  --terracotta-soft: #f6f1eb;
  --line: #e7e7e7;
  --ink: #222;
  --muted: #888;
  /* kalendár: voľné dni v farbách webu (svetlé s hnedým rámikom), obsadené šrafované
     sivé a prečiarknuté — na prvý pohľad odlíšiteľné */
  --free-bg: #fcfaf6;
  --free-border: #dcc5a4;
  --free-ink: #8f6d42;
  --busy-bg: repeating-linear-gradient(135deg, #ececec 0 5px, #e1e1e1 5px 10px);
  --busy-ink: #a3a3a3;
}

/* ---------- Kalendár ---------- */

.booking-calendar {
  border: 1px solid var(--line);
  background: #fff;
  padding: 25px 20px 20px;
}

.booking-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.booking-calendar-head .month-label {
  font-family: 'Gilda Display', serif;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: 1px;
  margin: 0;
  text-transform: capitalize;
}

.booking-nav {
  background: none;
  border: 1px solid var(--line);
  width: 38px;
  height: 38px;
  line-height: 1;
  color: var(--terracotta);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
}

.booking-nav:hover:not(:disabled) {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

.booking-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.booking-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 35px;
}

@media (max-width: 767px) {
  .booking-months {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
}

.booking-month-title {
  font-family: 'Gilda Display', serif;
  font-size: 17px;
  text-align: center;
  color: var(--ink);
  margin: 0 0 12px;
  text-transform: capitalize;
  letter-spacing: 1px;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.booking-weekday {
  text-align: center;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 6px;
}

.booking-day {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--free-border);
  background: var(--free-bg);
  color: var(--free-ink);
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
  padding: 0;
  font-family: 'Barlow', sans-serif;
}

.booking-day:hover:not(:disabled) {
  background: var(--terracotta);
  color: #fff;
}

.booking-day.is-empty {
  background: none;
  border-color: transparent;
  cursor: default;
  pointer-events: none;
}

.booking-day.is-occupied,
.booking-day:disabled {
  background: var(--busy-bg);
  border-color: #dcdcdc;
  color: var(--busy-ink);
  font-weight: 400;
  cursor: not-allowed;
  text-decoration: line-through;
}

.booking-day.is-past {
  background: none;
  border-color: transparent;
  color: #cfcfcf;
  font-weight: 400;
  cursor: not-allowed;
  text-decoration: none;
}

.booking-day.is-today {
  border-color: var(--terracotta);
  font-weight: 600;
}

.booking-day.is-start,
.booking-day.is-end {
  background: var(--terracotta) !important;
  border-color: var(--terracotta) !important;
  color: #fff !important;
  text-decoration: none;
}

.booking-day.is-between {
  background: #ddc9ad;
  border-color: #ddc9ad;
  color: #fff;
}

/* Výmena hostí — deň rozdelený uhlopriečkou (ako na Booking.com):
   is-turn-in  = v ten deň iný hosť prichádza: ráno voľné (odísť sa dá), poobede obsadené
   is-turn-out = v ten deň iný hosť odchádza: ráno obsadené, poobede voľné (prísť sa dá) */
.booking-day.is-turn-in,
.booking-day.is-turn-in:disabled {
  background: linear-gradient(135deg, var(--free-bg) 50%, transparent 50%), var(--busy-bg);
  border-color: var(--free-border);
  color: var(--free-ink);
  font-weight: 600;
  text-decoration: none;
}

.booking-day.is-turn-out {
  background: linear-gradient(135deg, transparent 50%, var(--free-bg) 50%), var(--busy-bg);
}

/* ako príchod sa deň is-turn-in vybrať nedá — kurzor to naznačí */
.booking-day.is-turn-in:disabled {
  cursor: not-allowed;
}

.booking-legend .swatch-turn {
  background: linear-gradient(135deg, var(--free-bg) 50%, transparent 50%), var(--busy-bg);
  border: 1px solid var(--free-border);
}

/* po výbere príchodu: dni za obsadenou nocou sa ako odchod vybrať nedajú */
.booking-day.is-out-of-range {
  opacity: 0.4;
}

.booking-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.booking-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.booking-legend i {
  width: 14px;
  height: 14px;
  display: inline-block;
}

.booking-legend .swatch-free {
  background: var(--free-bg);
  border: 1px solid var(--free-border);
}
.booking-legend .swatch-busy {
  background: var(--busy-bg);
  border: 1px solid #dcdcdc;
}
.booking-legend .swatch-sel {
  background: var(--terracotta);
}

/* ---------- Formulár ---------- */

.booking-form {
  /* pri prechode medzi krokmi nech indikátor krokov nezakryje tlačidlo menu */
  scroll-margin-top: 90px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 30px 25px;
}

.booking-form h4 {
  font-size: 20px;
  margin-bottom: 22px;
}

.booking-field {
  margin-bottom: 16px;
}

.booking-field label {
  display: block;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.booking-field input,
.booking-field select,
.booking-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fcfcfc;
  padding: 11px 13px;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.3s;
}

.booking-field input:focus,
.booking-field select:focus,
.booking-field textarea:focus {
  border-color: var(--terracotta);
  outline: none;
}

.booking-field input[readonly] {
  background: var(--terracotta-soft);
  cursor: default;
}

.booking-field textarea {
  min-height: 90px;
  resize: vertical;
}

.booking-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* PSČ je krátke — užší stĺpec, mesto širší (aj na mobile vedľa seba). */
.booking-row--zip {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

@media (max-width: 575px) {
  .booking-row:not(.booking-row--zip) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Súhrn ceny ---------- */

.booking-summary {
  background: var(--terracotta-soft);
  padding: 20px 22px;
  margin: 8px 0 22px;
}

.booking-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  padding: 5px 0;
  color: #555;
}

.booking-summary-line.is-total {
  border-top: 1px solid #e5d6c0;
  margin-top: 9px;
  padding-top: 12px;
  font-size: 18px;
  font-family: 'Gilda Display', serif;
  color: var(--ink);
}

.booking-summary-line.is-total strong {
  color: var(--terracotta);
  font-weight: 400;
}

.booking-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 18px;
}

.booking-consent {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6em;
  margin-top: 14px;
}

/* ---------- Správy ---------- */

.booking-message {
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  border-left: 3px solid;
}

.booking-message.is-error {
  background: #fdf1f1;
  border-color: #c0392b;
  color: #96271c;
}

.booking-message.is-success {
  background: #f0f7f1;
  border-color: #3b7d4a;
  color: #2c5f38;
}

.booking-submit {
  width: 100%;
}

/* hláška pri tlačidle — bližšie k nemu než ostatné správy */
.booking-submit .booking-message {
  margin-bottom: 12px;
}

/* nevyplnené povinné pole */
.booking-field .is-invalid,
.booking-field .is-invalid:focus {
  border-color: #c0392b;
  background: #fdf1f1;
}

.booking-submit button {
  width: 100%;
  border: 0;
  background: var(--terracotta);
  color: #fff;
  padding: 15px 20px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s;
  font-family: 'Barlow', sans-serif;
}

.booking-submit button:hover:not(:disabled) {
  background: #8a6a3f;
}

.booking-submit button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.booking-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Honeypot proti robotom — mimo obrazovky, nie display:none (to niektoré roboty preskočia) */
.booking-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.booking-consent a,
.booking-howto p a,
noscript .booking-message a {
  color: var(--terracotta);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Dva kroky: 1. termín, 2. kontaktné údaje ---------- */

#booking-app {
  /* pri prechode medzi krokmi nech ukazovateľ krokov nezakryje tlačidlo menu */
  scroll-margin-top: 90px;
}

.booking-steps {
  display: flex;
  gap: 8px;
  max-width: 640px;
  list-style: none;
  margin: 0 auto 26px;
  padding: 0;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.booking-steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}

.booking-steps li span {
  width: 24px;
  height: 24px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 12px;
}

.booking-steps li.is-active {
  color: var(--ink);
  border-bottom-color: var(--terracotta);
}

.booking-steps li.is-active span,
.booking-steps li.is-done span {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

[data-step-panel][hidden] {
  display: none !important;
}

/* 1. krok: tlačidlo Pokračovať pod kalendárom */
.booking-continue {
  max-width: 420px;
  margin: 28px auto 0;
}

.booking-step-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.booking-recap {
  background: var(--terracotta-soft);
  padding: 16px 22px 12px;
  margin-bottom: 22px;
}

.booking-back {
  border: 0;
  background: none;
  padding: 6px 0 0;
  color: var(--terracotta);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.booking-back:hover {
  color: #8a6a3f;
}

.booking-recap-gap {
  margin-bottom: 10px;
}

/* 2. krok: formulár v strede */
.booking-col-form {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* kontakt ako alternatíva pod rezerváciou */
.booking-contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 50px;
  margin-top: 30px;
}

.booking-contact-list .reservations {
  margin-bottom: 0 !important;
}

/* kalendár na celú šírku — na počítači nižšie políčka, nech nie sú obrovské */
@media (min-width: 992px) {
  .booking-day {
    aspect-ratio: auto;
    height: 46px;
  }
  .booking-months {
    gap: 60px;
  }
}

/* mobil: tlačidlo Pokračovať drží pri spodku obrazovky, kým zákazník listuje kalendárom */
@media (max-width: 767px) {
  .booking-continue {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-top: 20px;
    padding: 12px 0 10px;
    background: #fff;
    box-shadow: 0 -8px 16px -12px rgba(0, 0, 0, 0.25);
  }
  .booking-continue .booking-step-hint {
    margin-top: 6px;
  }
}
