/* ============================================================
   Property Booking – Frontend Styles
   Brand: Slowness Himalayas  –  slowness.in
   Palette: warm stone / charcoal / cream
   ============================================================ */

:root {
  /* ── Brand palette (matched to slowness.in) ───────────────── */
  --pb-primary:      #1a1612;   /* near-black charcoal — nav, CTAs     */
  --pb-primary-hov:  #2d2820;   /* primary hover                        */
  --pb-accent:       #8b7355;   /* warm caramel — links, secondary      */
  --pb-accent-mid:   #a08b6e;   /* lighter caramel — hover              */
  --pb-accent-lite:  #e8ddd0;   /* warm sand — borders, range fill      */
  --pb-cream:        #f5f0e8;   /* main wizard background               */
  --pb-sand:         #ede5d8;   /* secondary backgrounds, dividers      */
  --pb-paper:        #faf7f2;   /* inputs, card surfaces                */
  --pb-amber:        #b07d35;   /* pay button, important highlight      */
  --pb-amber-hov:    #8f6020;   /* pay button hover                     */
  --pb-text:         #2d2820;   /* body copy                            */
  --pb-muted:        #7a7068;   /* secondary / caption text             */
  --pb-error:        #a03020;   /* error states (warm-tinted)           */
  --pb-white:        #ffffff;

  --pb-shadow:  0 4px 24px rgba(26,22,18,.10);
  --pb-font-head: 'Playfair Display', Georgia, serif;
  --pb-font-body: 'Lato', sans-serif;

  /* ── Calendar colours ─────────────────────────────────────── */
  --cal-available: #f0ece4;   /* warm off-white                         */
  --cal-partial:   #f5eddb;   /* amber-tinted partial                   */
  --cal-booked:    #ebebeb;   /* neutral grey unavailable               */
  --cal-range:     #e8ddd0;   /* warm sand selection range              */
  --cal-today:     #fdf4e3;   /* warm golden today                      */
  --cal-hover:     #ede5d8;   /* hover preview                          */
}

/* ── Wrapper ───────────────────────────────────────────────── */
.pb-wizard-wrap {
  font-family: var(--pb-font-body);
  color: var(--pb-text);
  max-width: 860px;
  margin: 0 auto;
  background: var(--pb-cream);
  border-radius: 16px;
  box-shadow: var(--pb-shadow);
  overflow: hidden;
}

/* ── Progress Bar ──────────────────────────────────────────── */
.pb-progress-wrap {
  background: var(--pb-primary);
  padding: 24px 40px;
}
.pb-progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.pb-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: default;
}
.pb-step-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--pb-font-head);
  font-size: 16px; font-weight: 700;
  border: 2px solid rgba(255,255,255,.25);
  transition: all .3s ease;
}
.pb-progress-step span {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.pb-progress-step.pb-step-active .pb-step-circle {
  background: var(--pb-white);
  color: var(--pb-primary);
  border-color: var(--pb-white);
}
.pb-progress-step.pb-step-active span { color: var(--pb-white); }
.pb-progress-step.pb-step-done .pb-step-circle {
  background: var(--pb-accent);
  color: var(--pb-white);
  border-color: var(--pb-accent);
}
.pb-progress-line {
  flex: 1; max-width: 80px;
  height: 2px;
  background: rgba(255,255,255,.2);
  margin: 0 8px;
  margin-bottom: 24px;
  transition: background .3s;
}
.pb-progress-line.pb-line-done { background: var(--pb-accent); }

/* ── Steps ─────────────────────────────────────────────────── */
.pb-step {
  display: none;
  padding: 36px 40px 40px;
  animation: hbFadeIn .3s ease;
}
.pb-step-visible { display: block; }
@keyframes hbFadeIn {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0); }
}
.pb-step-title {
  font-family: var(--pb-font-head);
  font-size: 26px;
  color: var(--pb-primary);
  margin: 0 0 28px;
  font-weight: 700;
}

/* ── Form ───────────────────────────────────────────────────── */
.pb-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.pb-field { display: flex; flex-direction: column; gap: 6px; }
.pb-field-full { grid-column: 1 / -1; }
.pb-field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--pb-primary);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.pb-req { color: var(--pb-amber); }
.pb-field input,
.pb-field select,
.pb-field textarea {
  border: 1.5px solid var(--pb-accent-lite);
  border-radius: 8px;
  padding: 11px 14px;
  font-family: var(--pb-font-body);
  font-size: 15px;
  color: var(--pb-text);
  background: var(--pb-paper);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
}
.pb-field input:focus,
.pb-field select:focus,
.pb-field textarea:focus {
  border-color: var(--pb-accent);
  box-shadow: 0 0 0 3px rgba(139,115,85,.12);
}
.pb-field input.pb-invalid,
.pb-field select.pb-invalid { border-color: var(--pb-error); }
.pb-field textarea { resize: vertical; min-height: 80px; }
.pb-hint  { font-size: 12px; color: var(--pb-muted); }
.pb-error { font-size: 12px; color: var(--pb-error); min-height: 16px; }

/* ── Buttons ────────────────────────────────────────────────── */
.pb-step-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  justify-content: flex-end;
}
.pb-btn {
  font-family: var(--pb-font-body);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 30px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all .2s ease;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: .3px;
}
.pb-btn-primary {
  background: var(--pb-primary);
  color: var(--pb-white);
}
.pb-btn-primary:hover {
  background: var(--pb-primary-hov);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,22,18,.25);
}
.pb-btn-outline {
  background: transparent;
  color: var(--pb-accent);
  border: 2px solid var(--pb-accent-lite);
}
.pb-btn-outline:hover {
  background: var(--pb-accent-lite);
  color: var(--pb-primary);
}
.pb-btn-pay {
  background: linear-gradient(135deg, var(--pb-amber), #c89040);
  color: var(--pb-white);
  font-size: 16px;
  padding: 15px 36px;
}
.pb-btn-pay:hover {
  background: linear-gradient(135deg, var(--pb-amber-hov), var(--pb-amber));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(176,125,53,.4);
}
.pb-btn-pay:disabled { opacity:.6; cursor:not-allowed; transform:none; }
.pb-btn-arrow { font-size: 18px; }
.pb-pay-icon  { font-size: 18px; }
.pb-pay-note  { font-size:12px; color:var(--pb-muted); text-align:center; margin-top:10px; }
.pb-turnstile-wrap { display:flex; justify-content:center; margin: 18px 0 4px; }

/* ── Calendar header bar ───────────────────────────────────── */
.pb-date-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--pb-primary);
  color: var(--pb-white);
  border-radius: 10px;
  padding: 14px 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.pb-date-box { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pb-date-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; opacity: .65; }
.pb-date-val   { font-family: var(--pb-font-head); font-size: 18px; font-weight: 600; }
.pb-nights-badge {
  background: rgba(255,255,255,.15);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Calendar navigation ───────────────────────────────────── */
.pb-cal-nav { display: flex; align-items: flex-start; gap: 8px; }
.pb-cal-arrow {
  background: var(--pb-primary);
  color: var(--pb-white);
  border: none;
  border-radius: 8px;
  width: 34px; height: 34px;
  font-size: 16px;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
  margin-top: 30px;
}
.pb-cal-arrow:hover { background: var(--pb-primary-hov); }
.pb-cal-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  flex: 1;
  min-width: 0;
}
.pb-cal-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--pb-muted);
  font-style: italic;
}

/* ── Calendar month ────────────────────────────────────────── */
.pb-cal-month { min-width: 0; overflow: hidden; }
.pb-cal-month-title {
  text-align: center;
  font-family: var(--pb-font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--pb-primary);
  margin-bottom: 10px;
}
.pb-cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  margin-bottom: 3px;
}
.pb-cal-dow {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--pb-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 4px 0;
}
.pb-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.pb-cal-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}
.pb-cal-cell.pb-date-available { background: var(--cal-available); color: var(--pb-text); }
.pb-cal-cell.pb-date-available:hover { background: var(--cal-hover); }
.pb-cal-cell.pb-date-partial   { background: var(--cal-partial); color: var(--pb-text); }
.pb-cal-cell.pb-date-partial:hover { background: var(--cal-hover); }
.pb-cal-cell.pb-date-booked,
.pb-cal-cell.pb-date-unavailable,
.pb-cal-cell.pb-date-blocked,
.pb-cal-cell.pb-date-disabled {
  background: var(--cal-booked);
  color: rgba(200,192,187,.9);
  cursor: not-allowed;
  text-decoration: line-through;
}
.pb-cal-cell.pb-date-today { background: var(--cal-today); font-weight: 700; }
.pb-cal-cell.pb-date-empty { background: transparent; cursor: default; }

/* ── Day-number circle ─────────────────────────────────────── */
.pb-cal-cell .pb-date-num {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  position: relative; z-index: 1;
  font-size: 12px; font-weight: 600;
  transition: background .15s, color .15s;
}

/* ── Diagonal split selection states ──────────────────────── */
.pb-cal-cell.pb-date-checkin {
  background: linear-gradient(135deg, var(--pb-cream) 50%, var(--cal-range) 50%) !important;
  text-decoration: none !important;
  border-radius: 0 !important;
}
.pb-cal-cell.pb-date-checkin .pb-date-num {
  background: var(--pb-primary);
  color: var(--pb-white);
}
.pb-cal-cell.pb-date-checkout {
  background: linear-gradient(135deg, var(--cal-range) 50%, var(--pb-cream) 50%) !important;
  text-decoration: none !important;
  border-radius: 0 !important;
}
.pb-cal-cell.pb-date-checkout .pb-date-num {
  background: var(--pb-primary);
  color: var(--pb-white);
}
.pb-cal-cell.pb-date-checkin.pb-date-checkout {
  background: var(--pb-cream) !important;
}
.pb-cal-cell.pb-date-checkin.pb-date-checkout .pb-date-num {
  background: var(--pb-primary);
  color: var(--pb-white);
}
.pb-cal-cell.pb-date-inrange {
  background: var(--cal-range) !important;
  color: var(--pb-accent) !important;
  text-decoration: none !important;
  border-radius: 0 !important;
}

/* ── Hover preview ─────────────────────────────────────────── */
.pb-cal-cell.pb-date-hover-range {
  background: rgba(200,180,150,.45) !important;
  text-decoration: none !important;
  border-radius: 0 !important;
  cursor: pointer;
}
.pb-cal-cell.pb-date-hover-checkout {
  background: linear-gradient(135deg, rgba(200,180,150,.45) 50%, var(--pb-cream) 50%) !important;
  text-decoration: none !important;
  border-radius: 0 !important;
  cursor: pointer;
}
.pb-cal-cell.pb-date-hover-checkout .pb-date-num {
  background: var(--pb-accent-mid);
  color: var(--pb-white);
}

/* ── Calendar legend ───────────────────────────────────────── */
.pb-cal-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.pb-leg { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--pb-muted); }
.pb-leg-dot { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.pb-leg-available { background: var(--cal-available); border: 1px solid #c4a882; }
.pb-leg-partial   { background: var(--cal-partial);   border: 1px solid #d4aa60; }
.pb-leg-booked    { background: var(--cal-booked);    border: 1px solid #d4cfc9; }

/* ── Step 3 — Preferences & Agreements ────────────────────── */
.pb-section { margin-bottom: 28px; }
.pb-section h3 {
  font-family: var(--pb-font-head);
  font-size: 18px;
  color: var(--pb-primary);
  margin: 0 0 14px;
}
.pb-sub { font-size: 13px; color: var(--pb-muted); font-style: italic; font-family: var(--pb-font-body); margin-left: 8px; }

.pb-checklist,
.pb-agreement-list { display: flex; flex-direction: column; gap: 10px; }
.pb-check-item,
.pb-agree-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--pb-accent-lite);
  background: var(--pb-paper);
  transition: all .15s;
  font-size: 14px;
}
.pb-check-item:hover,
.pb-agree-item:hover {
  border-color: var(--pb-accent);
  background: var(--cal-available);
}
.pb-check-item input,
.pb-agree-item input { display: none; }
.pb-check-box {
  width: 20px; height: 20px; flex-shrink: 0;
  border: 2px solid var(--pb-accent-lite);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  background: var(--pb-white);
}
.pb-check-item input:checked ~ .pb-check-box,
.pb-agree-item  input:checked ~ .pb-check-box {
  background: var(--pb-primary);
  border-color: var(--pb-primary);
}
.pb-check-item input:checked ~ .pb-check-box::after,
.pb-agree-item  input:checked ~ .pb-check-box::after {
  content: '✓';
  color: var(--pb-white);
  font-size: 12px;
  font-weight: 700;
}
.pb-check-item.pb-checked,
.pb-agree-item.pb-checked {
  border-color: var(--pb-accent);
  background: var(--cal-available);
}

/* ── Booking Summary Box ───────────────────────────────────── */
.pb-summary-box {
  background: var(--pb-primary);
  color: var(--pb-white);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 28px;
}
.pb-summary-box h3 {
  font-family: var(--pb-font-head);
  margin: 0 0 16px;
  font-size: 20px;
  color: var(--pb-white);
}
.pb-summary-grid { display: flex; flex-direction: column; gap: 8px; }
.pb-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.pb-summary-row span:first-child { opacity: .7; }
.pb-summary-row span:last-child  { font-weight: 600; }
.pb-summary-total {
  border-bottom: none;
  padding-top: 8px;
  font-size: 18px;
  font-weight: 700;
}
.pb-summary-total span { font-weight: 700 !important; opacity: 1 !important; }

/* ── Success Screen ─────────────────────────────────────────── */
.pb-success-wrap { text-align: center; padding: 20px 0; }
.pb-success-icon {
  width: 80px; height: 80px;
  background: var(--pb-primary);
  color: var(--pb-white);
  border-radius: 50%;
  font-size: 40px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  animation: hbPopIn .4s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes hbPopIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.pb-success-wrap h2 {
  font-family: var(--pb-font-head);
  font-size: 28px;
  color: var(--pb-primary);
  margin-bottom: 12px;
}
.pb-success-msg  { font-size: 15px; color: var(--pb-muted); margin-bottom: 20px; line-height: 1.6; }
.pb-success-note { font-size: 14px; color: var(--pb-accent); font-style: italic; margin-top: 16px; }
.pb-success-details {
  display: inline-flex;
  gap: 24px;
  background: var(--pb-accent-lite);
  border-radius: 10px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--pb-primary);
  margin-bottom: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.pb-success-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.pb-btn-receipt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pb-primary);
  color: var(--pb-white) !important;
  text-decoration: none !important;
  padding: 13px 28px;
  border-radius: 8px;
  font-family: var(--pb-font-body);
  font-size: 15px;
  font-weight: 700;
  transition: background .2s, transform .2s;
}
.pb-btn-receipt:hover {
  background: var(--pb-primary-hov);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,22,18,.25);
}

/* ── Spinner ────────────────────────────────────────────────── */
.pb-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: var(--pb-white);
  border-radius: 50%;
  animation: hbSpin .6s linear infinite;
}
@keyframes hbSpin { to { transform: rotate(360deg); } }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .pb-wizard-wrap { border-radius: 0; }
  .pb-progress-wrap { padding: 16px 20px; }
  .pb-progress-line { max-width: 30px; }
  .pb-step { padding: 24px 20px 28px; }
  .pb-step-title { font-size: 22px; }
  .pb-form-grid { grid-template-columns: 1fr; }
  .pb-field-full { grid-column: 1; }
  .pb-cal-months { grid-template-columns: 1fr; }
  .pb-cal-months .pb-cal-month:last-child { display: none; }
  .pb-step-actions { flex-direction: column-reverse; }
  .pb-btn { justify-content: center; }
  .pb-date-summary { gap: 10px; }
  .pb-summary-box { padding: 18px 16px; }
}

/* ── Custom alert modal ──────────────────────────────────────── */
.pb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,22,18,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  backdrop-filter: blur(2px);
}
.pb-modal-overlay.pb-modal-open {
  opacity: 1;
  pointer-events: all;
}
.pb-modal {
  background: var(--pb-paper);
  border-radius: 20px;
  padding: 40px 36px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(26,22,18,.22);
  transform: scale(.9) translateY(12px);
  transition: transform .28s cubic-bezier(.175,.885,.32,1.275);
}
.pb-modal-overlay.pb-modal-open .pb-modal {
  transform: scale(1) translateY(0);
}
.pb-modal-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 14px;
  display: block;
}
.pb-modal-title {
  font-family: var(--pb-font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--pb-text);
  margin: 0 0 10px;
}
.pb-modal-message {
  font-family: var(--pb-font-body);
  font-size: 15px;
  color: var(--pb-muted);
  line-height: 1.65;
  margin: 0 0 28px;
  white-space: pre-line;
}
.pb-modal-btn {
  background: var(--pb-primary);
  color: var(--pb-white);
  border: none;
  border-radius: 8px;
  padding: 12px 44px;
  font-family: var(--pb-font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
  letter-spacing: .3px;
}
.pb-modal-btn:hover  { background: var(--pb-primary-hov); transform: translateY(-1px); }
.pb-modal-btn:active { transform: translateY(0); }
.pb-modal.pb-modal-error   .pb-modal-title { color: var(--pb-error); }
.pb-modal.pb-modal-warning .pb-modal-title { color: #7a4a10; }
.pb-modal.pb-modal-warning .pb-modal-btn   { background: #b07d35; }
.pb-modal.pb-modal-warning .pb-modal-btn:hover { background: #8f6020; }
.pb-modal.pb-modal-info    .pb-modal-title { color: #2d3a50; }
.pb-modal.pb-modal-info    .pb-modal-btn   { background: #2d3a50; }
.pb-modal.pb-modal-info    .pb-modal-btn:hover { background: #1e2836; }

@media (max-width: 480px) {
  .pb-modal { padding: 32px 24px 28px; }
}

/* ── Mobile fixes ───────────────────────────────────────────── */

/* Fix 1: Larger calendar cells and touch targets on small screens */
@media (max-width: 480px) {
  .pb-cal-cell { font-size: 13px; }
  .pb-cal-cell .pb-date-num {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .pb-cal-dow { font-size: 9px; letter-spacing: 0; }
  .pb-cal-grid { gap: 1px; }
}

/* Fix 2: Date summary bar stacks cleanly on mobile */
@media (max-width: 480px) {
  .pb-date-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 16px;
  }
  .pb-nights-badge {
    grid-column: 1 / -1;
    text-align: center;
  }
  .pb-date-val { font-size: 15px; }
}

/* Fix 3: Hide step labels on very small screens — keep circles only */
@media (max-width: 380px) {
  .pb-progress-step span { display: none; }
  .pb-progress-wrap { padding: 14px 16px; }
  .pb-progress-line { max-width: 20px; margin: 0 4px; margin-bottom: 0; }
  .pb-step-circle { width: 32px; height: 32px; font-size: 14px; }
}
