/* Booking page: availability calendar, price summary and guest form.
   Uses the template's colour tokens (--primary-color, --accent-color, --gray, --sand). */

.book-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.book-step-title {
  margin: 0 0 1rem;
  font-family: var(--_font-family---secondary-font);
  font-size: 28px;
  font-weight: 500;
  color: var(--primary-color);
}

.book-step-title span {
  display: inline-block;
  margin-right: .6rem;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 16px;
}

/* ---- calendar ---- */
.cal {
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  background: var(--light);
  border-radius: var(--_border-radius---radius-l);
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cal-nav {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: transparent;
  color: var(--primary-color);
  font-size: 18px;
  cursor: pointer;
}

.cal-nav:disabled { opacity: .3; cursor: default; }

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

.cal-month-name {
  margin-bottom: .6rem;
  text-align: center;
  font-weight: 500;
  color: var(--primary-color);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-dow {
  padding: .3rem 0;
  text-align: center;
  font-size: 12px;
  color: var(--accent-color);
}

.cal-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--primary-color);
  font-size: 15px;
  cursor: pointer;
}

.cal-day:hover:not(:disabled) { background: var(--sand); }
.cal-day:disabled { color: #b9b4aa; cursor: not-allowed; text-decoration: line-through; }
.cal-day.in-range { background: var(--sand); border-radius: 0; }
.cal-day.is-start,
.cal-day.is-end { background: var(--primary-color); color: #fff; text-decoration: none; }
.cal-day.is-start { border-radius: 8px 0 0 8px; }
.cal-day.is-end { border-radius: 0 8px 8px 0; }
.cal-day.is-start.is-end { border-radius: 8px; }
.cal-blank { visibility: hidden; }

.cal-legend {
  margin-top: 1rem;
  font-size: 14px;
  color: var(--accent-color);
}

/* ---- form ---- */
.book-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.book-form .contact-input { width: 100%; }
.book-form .full { grid-column: 1 / -1; }
.book-form textarea.contact-input { height: 140px; resize: vertical; }

.book-error {
  margin: 0 0 1rem;
  padding: .8rem 1rem;
  border-radius: 10px;
  background: #f6dcd8;
  color: #8a2b20;
}

.book-submit {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.book-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ---- summary card ---- */
.book-summary {
  position: sticky;
  top: 6rem;
  overflow: hidden;
  background: var(--light);
  border-radius: var(--_border-radius---radius-l);
}

.book-summary img { display: block; width: 100%; height: 220px; object-fit: cover; }
.book-summary-body { padding: 1.5rem; }
.book-summary h3 { margin: 0 0 .2rem; font-size: 26px; color: var(--primary-color); }
.book-summary .rate { margin: 0 0 1.2rem; color: var(--accent-color); }

.sum-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
  border-top: 1px solid var(--sand);
  font-size: 16px;
  color: var(--text-color);
}

.sum-row strong { color: var(--primary-color); text-align: right; }
.sum-row.total { font-size: 20px; }
.book-note { margin-top: 1rem; font-size: 14px; color: var(--accent-color); }

/* ---- confirmation ---- */
.book-done {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 2rem;
  text-align: center;
  background: var(--light);
  border-radius: var(--_border-radius---radius-l);
}

.book-done .ref {
  display: inline-block;
  margin: 1rem 0;
  padding: .6rem 1.2rem;
  border-radius: 10px;
  background: var(--gray);
  font-size: 28px;
  letter-spacing: .08em;
  color: var(--primary-color);
}

/* ---- "Book your stay" button on property pages ---- */
.book-cta {
  display: inline-block;
  padding: .8rem 1.6rem;
  border-radius: 8px;
  background: var(--primary-color);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 991px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-summary { position: static; }
}

@media (max-width: 640px) {
  .cal-months { grid-template-columns: 1fr; }
  .cal-months .cal-month:nth-child(2) { display: none; }
  .book-form-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   Desktop restyle (992px and up): big "Book" hero, then a calm two-column layout:
   numbered steps with a clean calendar and form on the left, a dark summary card on the right.
   ========================================================== */
.bk-hero { min-height: 58vh; background-position: center 62%; }
.bk-hero .ab-hero-word { font-size: clamp(120px, 22vw, 340px); }
.bk-section { background: #f5efe6; }
.bk-incl { margin: 1.3rem 0 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.bk-incl li { position: relative; padding-left: 1.7rem; font-size: 15px; line-height: 1.4; }
.bk-incl li::before { content: ""; position: absolute; left: 0; top: .15em; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: rgba(255, 255, 255, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.6L12 5.5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat; }

@media (min-width: 992px) {
  .bk-section { padding-top: 5.5rem; padding-bottom: 7rem; }
  .bk-section .book-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 4.5rem; }

  /* numbered steps */
  .book-step-title { display: flex; align-items: baseline; gap: 1.1rem; margin: 0 0 1.6rem; padding-top: 1.4rem; border-top: 1px solid rgba(28, 28, 26, .2);
    font-size: clamp(30px, 2.6vw, 40px); font-weight: 400; letter-spacing: -.025em; color: #1c1c1a; }
  .book-step-title span { width: auto; height: auto; margin: 0; background: none; border-radius: 0; color: #777b67; font-size: 15px; font-weight: 500; letter-spacing: .06em; line-height: 1; }
  .book-step-title span::before { content: "0"; }

  /* calendar */
  .cal { padding: 2.2rem 2.4rem 1.8rem; margin-bottom: 4rem; background: #fffdf9; border: 1px solid #e3dccf; border-radius: 16px; }
  .cal { position: relative; }
  .cal-head { position: absolute; top: 2.2rem; left: 2.4rem; right: 2.4rem; margin: 0; pointer-events: none; }
  .cal-nav { pointer-events: auto; }
  .cal-nav { width: 46px; height: 46px; border-color: #d9d1c1; font-size: 20px; transition: background-color .25s, color .25s, border-color .25s; }
  .cal-nav:hover:not(:disabled) { background: #2c3a2e; border-color: #2c3a2e; color: #fff; }
  .cal-months { gap: 3.2rem; }
  .cal-month-name { margin: 0 0 1.4rem; line-height: 46px; font-size: 22px; font-weight: 400; letter-spacing: -.02em; color: #1c1c1a; }
  .cal-grid { gap: 4px 0; }
  .cal-dow { padding-bottom: .6rem; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #777b67; }
  .cal-day { border-radius: 50%; font-size: 15px; transition: background-color .2s, color .2s, transform .2s; }
  .cal-day:hover:not(:disabled) { background: #ece4d4; transform: scale(1.06); }
  .cal-day.in-range { background: #e7eadf; border-radius: 0; }
  .cal-day.is-start, .cal-day.is-end { background: #2c3a2e; color: #fff; }
  .cal-day.is-start { border-radius: 50% 0 0 50%; }
  .cal-day.is-end { border-radius: 0 50% 50% 0; }
  .cal-day.is-start.is-end { border-radius: 50%; }
  .cal-day:disabled { color: #c3bdb0; }
  .cal-legend { margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid #ece4d4; color: #777b67; }

  /* form */
  .book-form-grid { gap: 1.1rem; }
  .book-form .contact-input { height: 3.6rem; padding: 0 1.2rem; background: #fffdf9; border: 1px solid #d9d1c1; border-radius: 10px; font-size: 16px; color: #1c1c1a; transition: border-color .25s, box-shadow .25s; }
  .book-form .contact-input:focus { outline: 0; border-color: #2c3a2e; box-shadow: 0 0 0 3px rgba(44, 58, 46, .12); }
  .book-form textarea.contact-input { height: 9rem; padding-top: 1rem; }
  .book-submit { height: 3.8rem; margin-top: .6rem; border-radius: 10px; background: #2c3a2e; font-size: 17px; letter-spacing: .01em; transition: background-color .3s, transform .3s; }
  .book-submit:hover:not(:disabled) { background: #777b67; transform: translateY(-2px); }
  .book-note { color: #777b67; }

  /* summary: dark card, stays in view while you scroll */
  .book-summary { top: 6.5rem; background: #2c3a2e; border-radius: 18px; color: #fff; box-shadow: 0 30px 60px rgba(28, 38, 30, .22); }
  .book-summary img { height: 260px; object-position: 50% 62%; }
  .book-summary-body { padding: 2rem 2.1rem 2.2rem; }
  .book-summary h3 { margin: 0 0 .25rem; font-size: 32px; font-weight: 400; letter-spacing: -.025em; color: #fff; }
  .book-summary .rate { margin-bottom: 1.4rem; color: #cdd6c4; }
  .sum-row { padding: .85rem 0; border-top: 1px solid rgba(255, 255, 255, .16); color: #cdd6c4; }
  .sum-row strong { color: #fff; font-weight: 500; }
  .sum-row.total { align-items: baseline; font-size: 15px; }
  .sum-row.total strong { font-size: 30px; font-weight: 400; letter-spacing: -.02em; }
  .book-summary .bk-incl li { color: #e6ebe0; }
  .book-summary .bk-incl { margin-top: 1.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .16); color: #e6ebe0; }
  .book-summary .book-note { color: #b9c2ae; }
  .book-summary .book-note a { color: #fff; }

  .book-done { padding: 4rem 3rem; background: #fffdf9; border: 1px solid #e3dccf; border-radius: 18px; }
}

/* the "hidden" attribute must win over the display set above (it was leaving the form on screen after booking) */
.book-grid[hidden], .book-done[hidden], .book-error[hidden] { display: none; }

/* ---- "Request received" pop-up (replaces the card that used to appear under the form) ---- */
html.book-lock { overflow: hidden; }
.book-done { position: fixed; inset: 0; z-index: 2000000000; display: grid; place-items: center; max-width: none; margin: 0; padding: 1.2rem; border: 0; border-radius: 0;
  background: rgba(18, 26, 20, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); text-align: center; animation: book-fade .35s ease both; }
.book-done[hidden] { display: none; }
.book-done-card { position: relative; width: 100%; max-width: 34rem; padding: 3rem 2.4rem 2.4rem; background: #fffdf9; border-radius: 18px; box-shadow: 0 40px 90px rgba(0, 0, 0, .35); animation: book-pop .55s cubic-bezier(.2, .9, .25, 1.15) both; }
.book-done-x { position: absolute; top: .8rem; right: .9rem; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%; background: transparent; color: #55584f; font-size: 26px; line-height: 1; cursor: pointer; transition: background-color .2s; }
.book-done-x:hover { background: #ece4d4; }
.book-done-tick { width: 4rem; height: 4rem; margin: 0 auto 1.2rem; border-radius: 50%; background: #2c3a2e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 55% no-repeat; animation: book-tick .6s .25s cubic-bezier(.2, .9, .25, 1.4) both; }
.book-done-card .section-title { margin-bottom: .6rem; }
.book-done-card .ref { margin: 1rem 0; }
@keyframes book-fade { from { opacity: 0; } }
@keyframes book-pop { from { opacity: 0; transform: translateY(26px) scale(.94); } }
@keyframes book-tick { from { transform: scale(0); } }
@media (prefers-reduced-motion: reduce) { .book-done, .book-done-card, .book-done-tick { animation: none; } }

/* ---- "Check your booking" ---- */
.bk-check { background: #f5efe6; padding-top: 0; }
.bk-check-card { max-width: 46rem; margin: 0 auto; padding: 2.4rem; background: #fffdf9; border: 1px solid #e3dccf; border-radius: 16px; }
.bk-check-title { margin: 0 0 .5rem; font-family: var(--_font-family---secondary-font); font-size: clamp(26px, 3vw, 36px); font-weight: 400; letter-spacing: -.02em; color: #1c1c1a; }
.bk-check-text { margin: 0 0 1.4rem; color: #55584f; }
.bk-check-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: .8rem; align-items: start; }
.bk-check-form .contact-input { width: 100%; height: 3.4rem; margin: 0; }
.bk-check-form .primary-button { height: 3.4rem; border: 0; cursor: pointer; }
.bk-check-result { margin-top: 1.4rem; padding: 1.2rem 1.4rem; border-radius: 12px; background: #ece4d4; color: #1c1c1a; }
.bk-check-result[hidden] { display: none; }
.bk-check-result strong { display: block; font-size: 22px; font-weight: 500; }
.bk-check-result p { margin: .3rem 0 1rem; }
.bk-check-result dl { margin: 0; display: grid; gap: .4rem; }
.bk-check-result dl div { display: flex; justify-content: space-between; gap: 1rem; padding-top: .4rem; border-top: 1px solid rgba(28, 28, 26, .12); }
.bk-check-result dt { color: #55584f; } .bk-check-result dd { margin: 0; font-weight: 500; text-align: right; }
.bk-check-result.is-confirmed { background: #dfe8d6; } .bk-check-result.is-confirmed strong { color: #2f6b2f; }
.bk-check-result.is-declined, .bk-check-result.is-cancelled, .bk-check-result.is-none { background: #f6dcd8; color: #8a2b20; }
.bk-check-result.is-pending { background: #f6ecd2; }
@media (max-width: 767px) { .bk-check-form { grid-template-columns: 1fr; } .bk-check-card { padding: 1.5rem; } }
