/* Long-stay booking modal + calendar */

.book-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(12, 10, 8, 0.72);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease, ease), visibility 0.3s var(--ease, ease);
}
.book-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.book-modal__panel {
  width: min(100%, 42rem);
  max-height: min(92vh, 56rem);
  overflow: auto;
  background: #fffcf8;
  border-radius: 0.65rem;
  box-shadow: 0 24px 64px rgba(28, 22, 18, 0.28);
  position: relative;
}
.book-modal__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem 1rem;
  background: #fffcf8;
  border-bottom: 1px solid rgba(28, 22, 18, 0.1);
}
.book-modal__head h2 {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.55rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}
.book-modal__head p {
  margin: 0;
  color: #6b5e52;
  font-size: 0.9rem;
}
.book-modal__close {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(28, 22, 18, 0.12);
  background: #fff;
  color: #1c1612;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.book-modal__body { padding: 1.15rem 1.35rem 1.5rem; }

.book-cal {
  border: 1px solid rgba(28, 22, 18, 0.1);
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.75rem;
  margin: 0 0 1rem;
  max-width: none;
}
.book-cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}
.book-cal__nav strong {
  font-family: var(--font-display, Georgia, serif);
  font-size: 0.95rem;
  text-align: center;
  flex: 1;
}
.book-cal__nav button {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(28, 22, 18, 0.12);
  background: #f3efe8;
  cursor: pointer;
  color: #1c1612;
  flex-shrink: 0;
}
.book-cal__nav button:hover { background: #ebd7b2; }

.book-cal__months {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.book-cal__month-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: #1c1612;
}
.book-cal__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
  margin-bottom: 0.25rem;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b5e52;
}
.book-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
}
.book-cal__day {
  width: 100%;
  height: 2rem;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1c1612;
  cursor: pointer;
  padding: 0;
}
.book-cal__day:hover:not(:disabled):not(.is-empty) {
  background: rgba(91, 71, 47, 0.1);
}
.book-cal__day.is-empty { visibility: hidden; cursor: default; }
.book-cal__day:disabled,
.book-cal__day.is-blocked {
  color: #b7aea4;
  text-decoration: line-through;
  cursor: not-allowed;
  opacity: 0.55;
}
.book-cal__day.is-in-range {
  background: rgba(235, 215, 178, 0.55);
  border-radius: 0;
}
.book-cal__day.is-start,
.book-cal__day.is-end {
  background: #5b472f;
  color: #f3e6c8;
  border-radius: 0.3rem;
}
.book-cal__day.is-start.is-in-range { border-radius: 0.3rem 0 0 0.3rem; }
.book-cal__day.is-end.is-in-range { border-radius: 0 0.3rem 0.3rem 0; }
.book-cal__day.is-start.is-end { border-radius: 0.3rem; }

.book-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin: 0.85rem 0 1rem;
  font-size: 0.9rem;
  color: #6b5e52;
}
.book-summary strong { color: #1c1612; }

.book-alert {
  display: none;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.45rem;
  background: #f7efe4;
  border: 1px solid rgba(91, 71, 47, 0.2);
  color: #3d2f1f;
  font-size: 0.92rem;
}
.book-alert.is-visible { display: block; }
.book-alert.is-warning {
  background: #fdf2f0;
  border: 2px solid #c0392b;
  color: #6b1f18;
}
.book-alert a {
  color: #5b472f;
  font-weight: 700;
}
.book-alert.is-warning a {
  color: #8a2f1f;
}

.book-form {
  display: grid;
  gap: 0.75rem;
}
.book-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #3d2f1f;
}
.book-form input,
.book-form textarea {
  width: 100%;
  border: 1px solid rgba(28, 22, 18, 0.14);
  border-radius: 0.4rem;
  padding: 0.75rem 0.85rem;
  font: inherit;
  background: #fff;
  color: #1c1612;
}
.book-form textarea { min-height: 5.5rem; resize: vertical; }
.book-form input:focus,
.book-form textarea:focus {
  outline: 2px solid rgba(91, 71, 47, 0.35);
  outline-offset: 1px;
}
.book-form .hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}
.book-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
  min-height: 3rem;
}
.book-form__actions .is-hidden,
.book-short-link.is-hidden {
  display: none !important;
}
.book-short-link {
  margin: 0;
  font-size: 0.95rem;
  color: #6b1f18;
  line-height: 1.45;
}
.book-short-link a {
  color: #8a2f1f;
  font-weight: 700;
  text-underline-offset: 0.15em;
}
.book-short-link a:hover { color: #5b472f; }
.book-form__msg {
  min-height: 1.25rem;
  font-size: 0.9rem;
}
.book-form__msg.is-error { color: #8a2f1f; }
.book-form__msg.is-ok { color: #2f6b3a; }

.book-success {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}
.book-success.is-hidden { display: none !important; }
[data-book-flow].is-hidden { display: none !important; }
.book-success__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.book-success__icon svg {
  display: block;
}
.book-success__icon circle {
  stroke-dasharray: 240;
  stroke-dashoffset: 480;
  animation: bookCheckCircle 0.6s ease-in-out forwards;
}
.book-success__icon path {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: bookCheckMark 0.35s 0.45s ease-out forwards;
}
.book-success h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.75rem;
  color: #1c1612;
}
.book-success p {
  margin: 0 0 0.55rem;
  color: #6b5e52;
  font-size: 1rem;
}
.book-success p strong {
  color: #2f6b3a;
  font-size: 1.05rem;
}
.book-success .btn {
  margin-top: 1.25rem;
}

@keyframes bookCheckCircle {
  to { stroke-dashoffset: 0; }
}
@keyframes bookCheckMark {
  to { stroke-dashoffset: 0; }
}

@media (min-width: 720px) {
  .book-modal__panel { width: min(100%, 46rem); }
  .book-cal__months {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
  .book-cal__nav strong { font-size: 1.05rem; }
}
