/*
 * reservations.css — Phase 4A v2: 4-Screen Reservation Modal
 * Dish Dash Plugin — Fri Soft Ltd
 */

/* ── Reserve teaser section ──────────────────────────────── */
.dd-reserve__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.dd-reserve__text .dd-reserve__title {
  color: #fff;
  margin: 12px 0 16px;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.25;
}

.dd-reserve__text .dd-reserve__copy {
  color: rgba(255,255,255,0.72);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  max-width: 520px;
}

.dd-reserve__cta {
  background: #fff;
  color: var(--brand, #65040d);
  border: none;
  border-radius: 14px;
  padding: 16px 36px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}

.dd-reserve__cta:hover { opacity: 0.9; }
.dd-reserve__cta:active { transform: scale(0.97); }

@media (min-width: 768px) {
  .dd-reserve__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .dd-reserve__text { flex: 1; }
}

/* ── Overlay ─────────────────────────────────────────────── */
.dd-res-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.dd-res-overlay--open {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal ───────────────────────────────────────────────── */
.dd-res-modal {
  background: var(--dd-surface, #FBF7F1);
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.32);
  transform: translateY(24px);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.dd-res-overlay--open .dd-res-modal {
  transform: translateY(0);
}

/* ── Modal header ────────────────────────────────────────── */
.dd-res-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  flex-shrink: 0;
}

.dd-res-modal__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dd-text, #221B19);
}

.dd-res-modal__close {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--dd-muted, #6E5B4C);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.dd-res-modal__close:hover {
  background: rgba(0,0,0,0.06);
}

/* ── Progress bar ────────────────────────────────────────── */
.dd-res-progress {
  padding: 16px 24px 0;
  flex-shrink: 0;
}

.dd-res-progress__track {
  height: 4px;
  background: var(--dd-line, #EADfCE);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
}

.dd-res-progress__fill {
  height: 100%;
  background: var(--brand, #65040d);
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 25%;
}

.dd-res-progress__steps {
  display: flex;
  justify-content: space-between;
}

.dd-res-step {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--dd-muted-2, #8A6E53);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.dd-res-step--active {
  color: var(--brand, #65040d);
}

.dd-res-step--done {
  color: var(--dd-muted, #6E5B4C);
}

/* ── Modal body ──────────────────────────────────────────── */
.dd-res-modal__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px;
  scrollbar-width: thin;
}

/* ── Screens ─────────────────────────────────────────────── */
.dd-res-screen { display: block; }
.dd-res-screen--hidden { display: none; }

.dd-res-screen__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dd-text, #221B19);
  margin-bottom: 20px;
}

/* ── Field blocks ────────────────────────────────────────── */
.dd-res-field-block { margin-bottom: 20px; }

.dd-res-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dd-muted, #6E5B4C);
  margin-bottom: 10px;
}

.dd-res-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--dd-muted-2, #8A6E53);
}

/* ── Date pills ──────────────────────────────────────────── */
.dd-res-date-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.dd-res-date-scroll::-webkit-scrollbar { display: none; }

/* Date scroll fade indicator — applied via direct class to avoid :has() compat issues */
.dd-res-date-wrap {
  position: relative;
  padding: 0 36px;
}

.dd-res-date-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--dd-line, #EADfCE);
  background: #fff;
  color: var(--brand, #65040d);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
  padding: 0;
  line-height: 1;
}

.dd-res-date-arrow:hover {
  border-color: var(--brand, #65040d);
  background: var(--brand, #65040d);
  color: #fff;
}

.dd-res-date-arrow--left { left: 0; }
.dd-res-date-arrow--right { right: 0; }

.dd-res-date-wrap::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 6px;
  width: 32px;
  background: linear-gradient(to right, transparent, var(--dd-surface, #FBF7F1));
  pointer-events: none;
}

.dd-res-date-pill {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--dd-line, #EADfCE);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-width: 52px;
}

.dd-res-date-pill:hover { border-color: var(--brand, #65040d); }

.dd-res-date-pill.dd-res-date-pill--selected {
  background: var(--brand, #65040d);
  border-color: var(--brand, #65040d);
  color: #fff !important;
}

.dd-res-date-pill__day {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.65;
  line-height: 1;
  margin-bottom: 4px;
}

.dd-res-date-pill--selected .dd-res-date-pill__day { opacity: 0.8; }

.dd-res-date-pill__num {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.dd-res-date-pill__mon {
  font-size: 0.6rem;
  font-weight: 500;
  opacity: 0.6;
  margin-top: 3px;
  line-height: 1;
}

.dd-res-date-pill--selected .dd-res-date-pill__mon { opacity: 0.75; }

/* ── Session toggle ──────────────────────────────────────── */
.dd-res-toggle {
  display: flex;
  border: 1.5px solid var(--dd-line, #EADfCE);
  border-radius: 12px;
  overflow: hidden;
  width: fit-content;
}

.dd-res-toggle__btn {
  background: none;
  border: none;
  padding: 10px 32px;
  font-size: 16px;
  font-weight: 700;
  color: var(--dd-muted, #6E5B4C);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  touch-action: manipulation;
}

.dd-res-toggle__btn:first-child {
  border-right: 1.5px solid var(--dd-line, #EADfCE);
}

.dd-res-toggle__btn.dd-res-toggle__btn--active {
  background: var(--brand, #65040d);
  color: #fff !important;
}

/* ── Time slots ──────────────────────────────────────────── */
.dd-res-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dd-res-slot {
  padding: 10px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--dd-line, #EADfCE);
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  color: var(--dd-text, #221B19);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-family: inherit;
  touch-action: manipulation;
}

.dd-res-slot:hover { border-color: var(--brand, #65040d); color: var(--brand, #65040d); }

.dd-res-slot.dd-res-slot--selected {
  background: var(--brand, #65040d);
  border-color: var(--brand, #65040d);
  color: #fff !important;
}

/* ── Stepper ─────────────────────────────────────────────── */
.dd-res-stepper {
  display: flex;
  align-items: center;
  width: fit-content;
  border: 1.5px solid var(--dd-line, #EADfCE);
  border-radius: 12px;
  overflow: hidden;
  touch-action: manipulation;
}

.dd-res-stepper__btn {
  background: none;
  border: none;
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
  color: var(--brand, #65040d);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  font-family: inherit;
  touch-action: manipulation;
}

.dd-res-stepper__btn:hover { background: rgba(101,4,13,0.06); }

.dd-res-stepper__val {
  min-width: 52px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dd-text, #221B19);
  border-left: 1.5px solid var(--dd-line, #EADfCE);
  border-right: 1.5px solid var(--dd-line, #EADfCE);
  padding: 0 8px;
  height: 52px;
  line-height: 52px;
}

/* ── Select ──────────────────────────────────────────────── */
.dd-res-select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--dd-line, #EADfCE);
  background: #fff;
  font-size: 16px;
  color: var(--dd-text, #221B19);
  font-family: inherit;
  appearance: none;
  touch-action: manipulation;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236E5B4C' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.dd-res-select:focus { outline: none; border-color: var(--brand, #65040d); }

/* ── Text inputs ─────────────────────────────────────────── */
.dd-res-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--dd-line, #EADfCE);
  background: #fff;
  font-size: 16px;
  color: var(--dd-text, #221B19);
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s;
  touch-action: manipulation;
}

.dd-res-input:focus { outline: none; border-color: var(--brand, #65040d); }
.dd-res-input::placeholder { color: var(--dd-muted-2, #8A6E53); }
.dd-res-textarea { resize: vertical; min-height: 80px; }

/* ── Confirm card (screen 4) ─────────────────────────────── */
.dd-res-confirm-card {
  background: linear-gradient(135deg, #65040d 0%, #3d0208 100%);
  border-radius: 16px;
  padding: 24px;
  color: #fff;
}

.dd-res-confirm-ref {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.55;
  font-family: 'Courier New', monospace;
  margin-bottom: 16px;
}

.dd-res-confirm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dd-res-confirm-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.95rem;
}

.dd-res-confirm-icon { flex: 0 0 auto; }

.dd-res-confirm-divider {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 4px 0;
}

/* ── Modal footer ────────────────────────────────────────── */
.dd-res-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--dd-line, #EADfCE);
  flex-shrink: 0;
  gap: 12px;
}

.dd-res-next-btn {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: var(--brand, #65040d);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
}

.dd-res-next-btn:hover { opacity: 0.88; }
.dd-res-next-btn:active { transform: scale(0.98); }

.dd-res-back-btn {
  background: none;
  border: 1.5px solid var(--dd-line, #EADfCE);
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--dd-muted, #6E5B4C);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: border-color 0.15s;
  touch-action: manipulation;
}

.dd-res-back-btn:hover { border-color: var(--dd-muted, #6E5B4C); }

/* ── Deposit badge — Screen 1 ────────────────────────────── */
.dd-res-deposit-notice {
  display: none;
  align-items: center;
  gap: 8px;
  background: #FBF7F1;
  border: 1px solid #EADFCE;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #6E5B4C;
  margin-top: 8px;
}

/* ── Deposit panel — Screen 4 ────────────────────────────── */
.dd-res-deposit-panel {
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dd-res-deposit-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #FBF7F1;
  border: 1px solid #EADFCE;
  border-radius: 12px;
  padding: 16px 20px;
}

.dd-res-deposit-icon {
  font-size: 28px;
  line-height: 1;
}

.dd-res-deposit-label {
  font-size: 12px;
  color: #6E5B4C;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dd-res-deposit-amount {
  font-size: 22px;
  font-weight: 700;
  color: #65040d;
}

.dd-res-deposit-description {
  font-size: 14px;
  color: #6E5B4C;
  line-height: 1.5;
  margin: 0;
}

.dd-res-refund-policy {
  font-size: 12px;
  color: #6E5B4C;
  background: #F5EFE6;
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.5;
}
.dd-res-refund-policy:empty { display: none; }
