/* ============================================================
   ELJÉ Booking · Multi-Step Modal
   Loaded on every page; activated by [data-open-booking] elements
   ============================================================ */

.book-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(10, 8, 5, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: grid;
  place-items: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  cursor: auto;
}
.book-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.book {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 4rem);
  background: linear-gradient(180deg, var(--bronze) 0%, var(--bronze-deep) 100%);
  border: 1px solid rgba(201, 169, 97, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.6s var(--ease-out);
}
.book-backdrop.open .book { transform: translateY(0) scale(1); }

.book__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.book__close:hover {
  border-color: var(--gold-bright);
  background: rgba(201, 169, 97, 0.08);
  transform: rotate(90deg);
}
.book__close::before,
.book__close::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 1px;
  background: var(--gold);
}
.book__close::before { transform: rotate(45deg); }
.book__close::after { transform: rotate(-45deg); }
body[data-lang="fa"] .book__close { right: auto; left: 1.2rem; }

/* Progress bar */
.book__progress {
  padding: 2rem 2.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(201, 169, 97, 0.12);
}
.book__progress-label {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.book__progress-bar {
  flex: 1;
  height: 1px;
  background: rgba(201, 169, 97, 0.15);
  position: relative;
  overflow: hidden;
}
.book__progress-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 100%);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.6s var(--ease-out);
}
.book__progress-count {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold-bright);
  white-space: nowrap;
}

/* Step container */
.book__body {
  padding: 2.5rem;
  overflow-y: auto;
  flex: 1;
}
@media (max-width: 600px) {
  .book__progress { padding: 1.5rem 1.5rem 1rem; }
  .book__body { padding: 1.5rem; }
}

.book__step {
  display: none;
}
.book__step.active {
  display: block;
  animation: book-step-in 0.5s var(--ease-out);
}
@keyframes book-step-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.book__eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.book__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.15;
  color: var(--warm-white);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.book__title em { font-style: italic; color: var(--gold-bright); }
.book__sub {
  color: var(--text-mute);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Selection cards (Step 1, 2) */
.book__choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (max-width: 500px) {
  .book__choices { grid-template-columns: 1fr; }
}
.book__choice {
  padding: 1.5rem;
  background: rgba(58, 39, 22, 0.3);
  border: 1px solid rgba(201, 169, 97, 0.15);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease-out);
  position: relative;
}
body[data-lang="fa"] .book__choice { text-align: right; }
.book__choice:hover {
  border-color: rgba(201, 169, 97, 0.45);
  background: rgba(58, 39, 22, 0.5);
  transform: translateY(-2px);
}
.book__choice.selected {
  border-color: var(--gold-bright);
  background: rgba(201, 169, 97, 0.1);
}
.book__choice.selected::after {
  content: '';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold-bright);
  display: grid;
  place-items: center;
}
.book__choice.selected::before {
  content: '';
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  width: 6px;
  height: 10px;
  border: solid var(--black);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  z-index: 1;
}
body[data-lang="fa"] .book__choice.selected::after,
body[data-lang="fa"] .book__choice.selected::before {
  right: auto;
  left: 1rem;
}
body[data-lang="fa"] .book__choice.selected::before { left: 1.4rem; }

.book__choice-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--gold-dark);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}
.book__choice-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--warm-white);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.book__choice-tag {
  font-size: 0.72rem;
  color: var(--text-mute);
  letter-spacing: 0.05em;
}
.book__choice-duration {
  margin-top: 0.85rem;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Form fields (Step 3) */
.book__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 600px) {
  .book__fields { grid-template-columns: 1fr; }
}
.book__field { display: flex; flex-direction: column; gap: 0.4rem; }
.book__field--full { grid-column: 1 / -1; }
.book__label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.book__input,
.book__textarea {
  background: rgba(10, 8, 5, 0.4);
  border: 1px solid rgba(201, 169, 97, 0.2);
  padding: 0.9rem 1rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--warm-white);
  width: 100%;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.book__input:focus,
.book__textarea:focus {
  outline: none;
  border-color: var(--gold-bright);
  background: rgba(10, 8, 5, 0.6);
}
.book__textarea { min-height: 90px; resize: vertical; line-height: 1.5; }

/* Calendar (Step 4) */
.book__calendar {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 600px) {
  .book__calendar { grid-template-columns: 1fr; }
}
.book__cal {
  background: rgba(10, 8, 5, 0.4);
  border: 1px solid rgba(201, 169, 97, 0.18);
  padding: 1.25rem;
}
.book__cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.book__cal-month {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--warm-white);
}
.book__cal-nav {
  display: flex; gap: 0.5rem;
}
.book__cal-nav button {
  width: 32px; height: 32px;
  border: 1px solid rgba(201, 169, 97, 0.25);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--gold);
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
  font-size: 0.75rem;
}
.book__cal-nav button:hover { border-color: var(--gold-bright); color: var(--gold-bright); }
.book__cal-nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.book__cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 0.4rem;
}
.book__cal-weekdays span {
  text-align: center;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.3rem 0;
}
.book__cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.book__cal-day {
  aspect-ratio: 1/1;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.book__cal-day.muted { color: var(--text-dim); cursor: default; pointer-events: none; }
.book__cal-day.past { color: var(--text-dim); opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.book__cal-day.weekend { color: var(--text-dim); opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.book__cal-day:not(.muted):not(.past):not(.weekend):hover {
  border-color: rgba(201, 169, 97, 0.5);
  color: var(--gold-bright);
}
.book__cal-day.selected {
  background: var(--gold);
  color: var(--black);
  font-weight: 500;
  border-color: var(--gold);
}
.book__cal-day.today {
  border-color: rgba(201, 169, 97, 0.4);
}

.book__slots {
  background: rgba(10, 8, 5, 0.4);
  border: 1px solid rgba(201, 169, 97, 0.18);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}
.book__slots-head {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--warm-white);
  margin-bottom: 1rem;
}
.book__slots-empty {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: auto;
  margin-bottom: auto;
  text-align: center;
}
.book__slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.book__slot {
  padding: 0.7rem 0.5rem;
  border: 1px solid rgba(201, 169, 97, 0.2);
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.book__slot:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}
.book__slot.selected {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
  font-weight: 500;
}

/* Review (Step 5) */
.book__review {
  background: rgba(10, 8, 5, 0.4);
  border: 1px solid rgba(201, 169, 97, 0.18);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.book__review-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(201, 169, 97, 0.08);
}
.book__review-row:last-child { border-bottom: none; }
.book__review-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 0.15rem;
}
.book__review-value {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--warm-white);
  line-height: 1.4;
}
.book__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-mute);
  line-height: 1.5;
  cursor: pointer;
}
.book__consent input {
  appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--gold-dark);
  background: rgba(10, 8, 5, 0.4);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.book__consent input:checked {
  background: var(--gold);
  border-color: var(--gold);
}
.book__consent input:checked::after {
  content: '';
  position: absolute;
  top: 2px; left: 6px;
  width: 4px; height: 9px;
  border: solid var(--black);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* Success step */
.book__success {
  text-align: center;
  padding: 1rem 0;
}
.book__success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  animation: success-pulse 2s ease-in-out infinite;
}
.book__success-icon::after {
  content: '';
  width: 18px;
  height: 30px;
  border: solid var(--gold-bright);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-3px, -3px);
}
@keyframes success-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 97, 0.4); }
  50% { box-shadow: 0 0 0 14px rgba(201, 169, 97, 0); }
}

/* Footer with nav buttons */
.book__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 2.5rem;
  border-top: 1px solid rgba(201, 169, 97, 0.12);
  background: rgba(10, 8, 5, 0.3);
}
@media (max-width: 600px) { .book__footer { padding: 1.25rem 1.5rem; } }

.book__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  border: none;
  font-family: var(--sans);
}
.book__btn--ghost {
  background: transparent;
  color: var(--text-mute);
  padding-left: 0;
}
.book__btn--ghost:hover { color: var(--gold-bright); }
.book__btn--ghost:disabled { opacity: 0; pointer-events: none; }
.book__btn--primary {
  background: var(--gold);
  color: var(--black);
  font-weight: 500;
  padding: 0.95rem 1.8rem;
}
.book__btn--primary:hover { background: var(--gold-bright); }
.book__btn--primary:disabled {
  background: rgba(201, 169, 97, 0.2);
  color: var(--text-dim);
  cursor: not-allowed;
}
.book__btn .arrow {
  width: 16px; height: 1px;
  background: currentColor;
  position: relative;
  transition: transform 0.3s ease;
}
.book__btn .arrow::after {
  content: '';
  position: absolute; right: 0; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.book__btn:hover:not(:disabled) .arrow { transform: translateX(4px); }

body[data-lang="fa"] .book__btn .arrow { transform: scaleX(-1); }
body[data-lang="fa"] .book__btn:hover:not(:disabled) .arrow { transform: scaleX(-1) translateX(4px); }
