/* ============================================================
   Uptick Co. - Booking Modal & Sticky Trigger (Item 127)
   Shared across every page. Uses the site's existing CSS
   custom properties (--navy, --persimmon, --green, etc.)
   already defined in each page's :root.
============================================================ */

/* ---------- Sticky trigger ---------- */
.booking-sticky-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
  background: var(--persimmon);
  color: var(--white) !important;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(232, 87, 42, 0.45);
  transition: transform 0.15s, opacity 0.25s, visibility 0.25s, background 0.2s;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}

.booking-sticky-trigger.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.booking-sticky-trigger:hover {
  background: #d44a20;
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .booking-sticky-trigger {
    bottom: 16px;
    right: 16px;
    left: 16px;
    text-align: center;
    padding: 14px 20px;
  }
}

/* ---------- Overlay ---------- */
.booking-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(5, 14, 20, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 20px;
}

.booking-overlay.open { display: flex; }

/* ---------- Modal card ---------- */
.booking-modal {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  font-family: var(--font);
  color: var(--white);
  margin: auto 0;
}

.booking-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.booking-modal-close:hover { color: var(--white); background: rgba(255,255,255,0.08); }

.booking-modal h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  padding-right: 24px;
  color: var(--white);
}

.booking-modal-sub {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* ---------- Form fields ---------- */
.booking-field { margin-bottom: 16px; }

.booking-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-body);
  margin-bottom: 6px;
}

.booking-field input,
.booking-field select {
  width: 100%;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color 0.2s;
}

.booking-field select { cursor: pointer; }

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

.booking-field-error {
  font-size: 12px;
  color: var(--persimmon);
  margin-top: 4px;
  display: none;
}

.booking-field.has-error input,
.booking-field.has-error select { border-color: var(--persimmon); }
.booking-field.has-error .booking-field-error { display: block; }

/* ---------- Day / slot pickers ---------- */
.booking-section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-body);
  margin: 20px 0 10px;
}

.booking-date-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: thin;
}

.booking-date-chip {
  flex: 0 0 auto;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-body);
  transition: border-color 0.2s, background 0.2s;
  min-width: 64px;
}

.booking-date-chip .dow { display:block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.booking-date-chip .dom { display:block; font-size: 16px; font-weight: 700; color: var(--white); margin-top: 2px; }

.booking-date-chip.selected {
  border-color: var(--green);
  background: rgba(0,196,108,0.1);
}

.booking-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.booking-slot-chip {
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.booking-slot-chip:hover { border-color: var(--green); }

.booking-slot-chip.selected {
  border-color: var(--green);
  background: var(--green);
  color: var(--navy);
}

.booking-slot-empty,
.booking-slot-loading {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 0;
  text-align: center;
}

.booking-tz-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 4px;
}

/* ---------- Submit / errors ---------- */
.booking-submit {
  width: 100%;
  background: var(--persimmon);
  color: var(--white) !important;
  border: none;
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.2s, opacity 0.2s;
}

.booking-submit:hover:not(:disabled) { background: #d44a20; }
.booking-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.booking-form-error {
  font-size: 13px;
  color: var(--persimmon);
  text-align: center;
  margin-top: 12px;
  display: none;
}

.booking-form-error.visible { display: block; }

/* ---------- Success state ---------- */
.booking-success { text-align: center; padding: 12px 0; }

.booking-success .check-icon {
  width: 56px; height: 56px;
  background: rgba(0,196,108,0.12);
  border: 1px solid rgba(0,196,108,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}

.booking-success h2 { color: var(--white); margin-bottom: 12px; }
.booking-success p { font-size: 14px; color: var(--text-body); line-height: 1.6; }

@media (max-width: 480px) {
  .booking-modal { padding: 24px 20px; }
  .booking-slot-grid { grid-template-columns: repeat(2, 1fr); }
}
