/* =============================================
   Kacchi House Table Booking — Frontend Styles
   ============================================= */
.kh-booking-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}
.kh-page-header { margin-bottom: 24px; }
.kh-page-title  { font-size: 26px; font-weight: 600; margin-bottom: 6px; color: #111; }
.kh-page-sub    { font-size: 14px; color: #666; }

.kh-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) { .kh-layout { grid-template-columns: 1fr; } }

/* Floor panel */
.kh-floor-panel {
  background: #f7f6f3;
  border: 1px solid #e8e6e0;
  border-radius: 14px;
  padding: 20px;
}
.kh-floor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.kh-floor-title { font-size: 14px; font-weight: 600; }
.kh-legend      { display: flex; gap: 14px; flex-wrap: wrap; }
.kh-leg-item    { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #666; }
.kh-leg-dot     { width: 12px; height: 12px; border-radius: 3px; }
.kh-dot-avail   { background: #d4edda; border: 1.5px solid #1D9E75; }
.kh-dot-booked  { background: #e8e6e0; border: 1.5px solid #aaa; }
.kh-dot-selected{ background: #d4edda; border: 2.5px solid #1D9E75; }

.kh-floor-area {
  background: #fff;
  border: 1px solid #e8e6e0;
  border-radius: 10px;
  padding: 20px;
}
.kh-zone { margin-bottom: 28px; }
.kh-zone:last-child { margin-bottom: 0; }
.kh-zone-label {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #888;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e8e6e0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kh-badge-popular {
  font-size: 9px;
  padding: 2px 7px;
  background: #fff3cd;
  color: #856404;
  border-radius: 8px;
  font-weight: 500;
}
.kh-tables-row { display: flex; flex-wrap: wrap; gap: 20px; }
.kh-tbl-wrap   { display: flex; flex-direction: column; align-items: center; }

/* ── Table widget ── */
.kh-tbl {
  border: 2px solid #d0cec8;
  border-radius: 12px;
  cursor: default;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px;
  background: #fff;
}
/* Width = chairs_per_row × 16px chair + (chairs-1) × 8px gap + 20px padding each side */
/* 2-seat : 1 chair  per row → content 16px   + padding → 72px  total */
/* 4-seat : 2 chairs per row → content 40px   + padding → 96px  total */
/* 6-seat : 3 chairs per row → content 64px   + padding → 118px total */
/* 8-seat : 4 chairs per row → content 88px   + padding → 140px total */
.kh-tbl-2 { width: 72px;  min-height: 86px;  }
.kh-tbl-4 { width: 96px;  min-height: 100px; }
.kh-tbl-6 { width: 118px; min-height: 110px; }
.kh-tbl-8 { width: 140px; min-height: 118px; }

/* Status variants */
.kh-status-available { background: #fff; border-color: #b8dfc6; cursor: pointer; }
.kh-status-available:hover { border-color: #1D9E75; background: #f0faf5; transform: translateY(-2px); }
.kh-status-booked    { background: #fafaf8; border-color: #d8d5ce; opacity: 0.65; cursor: not-allowed; }
.kh-status-blocked   { background: #fdf5f5; border-color: #f0c0c0; opacity: 0.65; cursor: not-allowed; }
.kh-tbl.kh-tbl-selected {
  border-color: #1D9E75 !important;
  border-width: 2.5px !important;
  background: #e8f8f0 !important;
  transform: translateY(-2px);
}

/* ── Chairs: top and bottom rows only ── */
.kh-chairs-top,
.kh-chairs-bottom {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
}
.kh-chair {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #c8c4bc;
  background: #ece9e3;
  flex-shrink: 0;
}
.kh-status-available .kh-chair,
.kh-tbl.kh-tbl-selected .kh-chair { border-color: #7ecfa0; background: #c8ead4; }
.kh-status-booked  .kh-chair { background: #e4e2dc; border-color: #ccc; }
.kh-status-blocked .kh-chair { background: #f0dada; border-color: #d9a8a8; }

/* ── Table label (center) ── */
.kh-tbl-info {
  text-align: center;
  padding: 6px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.kh-tbl-id  { font-size: 14px; font-weight: 700; color: #222; line-height: 1.2; }
.kh-tbl-cap { font-size: 11px; color: #888; margin-top: 2px; }
.kh-tbl-status-lbl {
  font-size: 10px;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 10px;
  display: inline-block;
  font-weight: 500;
}
.kh-status-available .kh-tbl-status-lbl { background: #d4edda; color: #155724; }
.kh-status-booked    .kh-tbl-status-lbl { background: #e8e6e0; color: #666; }
.kh-status-blocked   .kh-tbl-status-lbl { background: #fde8e8; color: #8b1a1a; }
.kh-tbl.kh-tbl-selected .kh-tbl-status-lbl { background: #9ed6b8; color: #033d1e; }

/* ── Sidebar ── */
.kh-sidebar {
  background: #fff;
  border: 1px solid #e8e6e0;
  border-radius: 14px;
  padding: 20px;
  position: sticky;
  top: 80px;
}
.kh-sidebar-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.kh-selected-info {
  background: #f7f6f3;
  border: 1px solid #e8e6e0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  min-height: 60px;
}
.kh-no-selection { font-size: 12px; color: #999; text-align: center; padding: 10px 0; }
.kh-sel-name     { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.kh-sel-meta     { font-size: 12px; color: #666; line-height: 1.8; }

/* Form */
.kh-form        { display: flex; flex-direction: column; gap: 14px; }
.kh-form-group  { display: flex; flex-direction: column; gap: 5px; }
.kh-label       { font-size: 11px; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: .5px; }
.kh-required    { color: #c0392b; }
.kh-input {
  font-size: 13px;
  padding: 9px 11px;
  border: 1px solid #d8d5ce;
  border-radius: 8px;
  background: #fff;
  color: #222;
  width: 100%;
  transition: border-color .15s;
}
.kh-input:focus  { outline: none; border-color: #1D9E75; }
.kh-textarea     { resize: vertical; min-height: 70px; }
.kh-token-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kh-token-opt {
  border: 1px solid #d8d5ce;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.kh-token-opt:hover { background: #f7f6f3; }
.kh-token-active {
  border-color: #1D9E75 !important;
  border-width: 2px !important;
  background: #e8f8f0 !important;
}
.kh-token-dur   { font-size: 12px; font-weight: 600; color: #222; }
.kh-token-price { font-size: 11px; color: #666; margin-top: 2px; }
.kh-token-active .kh-token-price { color: #0F6E56; }
.kh-summary {
  background: #f7f6f3;
  border: 1px solid #e8e6e0;
  border-radius: 8px;
  padding: 12px 14px;
}
.kh-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}
.kh-sum-row:last-child { margin-bottom: 0; }
.kh-sum-total {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid #e8e6e0;
}
.kh-submit-btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  background: #111;
  color: #fff;
  transition: background .15s, opacity .15s;
}
.kh-submit-btn:disabled          { opacity: 0.4; cursor: not-allowed; }
.kh-submit-btn:not(:disabled):hover { background: #1D9E75; }
.kh-note { font-size: 11px; color: #999; line-height: 1.6; text-align: center; }
.kh-success-msg   { text-align: center; padding: 20px 10px; }
.kh-success-icon  {
  width: 48px; height: 48px; border-radius: 50%;
  background: #1D9E75; color: #fff; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.kh-success-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: #111; }
.kh-success-body  { font-size: 13px; color: #444; line-height: 1.7; }

/* ══════════════════════════════════════════
   PHASE 2 — Payment, Confirmation, Status
   ══════════════════════════════════════════ */
.kh-page-wrap { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; max-width:820px; margin:0 auto; padding:24px 16px; color:#1a1a1a; }

/* Step bar */
.kh-payment-step-bar { display:flex; align-items:center; gap:8px; margin-bottom:28px; font-size:13px; flex-wrap:wrap; }
.kh-step             { padding:6px 14px; border-radius:20px; border:1px solid #e0ddd6; color:#888; background:#fafaf8; }
.kh-step-active      { background:#111; color:#fff; border-color:#111; font-weight:600; }
.kh-step-done        { background:#e8f8f0; color:#0F6E56; border-color:#9ed6b8; }
.kh-step-error       { background:#fde8e8; color:#8b1a1a; border-color:#f0c0c0; }
.kh-step-arrow       { color:#ccc; font-size:18px; }

/* Payment layout */
.kh-payment-layout   { display:grid; grid-template-columns:1fr 1.4fr; gap:20px; align-items:start; }
@media(max-width:680px){ .kh-payment-layout{grid-template-columns:1fr;} }

/* Cards */
.kh-payment-summary-card,
.kh-payment-form-card,
.kh-confirm-card {
  background:#fff;
  border:1px solid #e8e6e0;
  border-radius:14px;
  padding:20px;
}
.kh-card-title   { font-size:15px; font-weight:600; margin-bottom:16px; }
.kh-summary-rows,
.kh-confirm-rows { display:flex; flex-direction:column; gap:0; }
.kh-sum-r        { display:flex; justify-content:space-between; font-size:12px; padding:7px 0; border-bottom:1px solid #f0ede8; color:#555; }
.kh-sum-r:last-child { border-bottom:none; }
.kh-sum-r span:last-child { color:#222; text-align:right; }
.kh-sum-total    { font-size:14px; font-weight:600; color:#222 !important; padding-top:10px; margin-top:4px; border-top:2px solid #e8e6e0 !important; }

/* Payment method tabs */
.kh-method-tabs      { display:flex; gap:6px; margin-bottom:16px; flex-wrap:wrap; }
.kh-method-tab       { padding:8px 16px; border:1px solid #d8d5ce; border-radius:20px; background:#fff; font-size:13px; cursor:pointer; transition:all .15s; }
.kh-method-tab:hover { background:#f7f6f3; }
.kh-method-active    { background:#111 !important; color:#fff !important; border-color:#111 !important; }

/* Payment instruction */
.kh-payment-instruction { background:#f7f6f3; border:1px solid #e8e6e0; border-radius:8px; padding:14px 16px; }
.kh-inst-step           { font-size:13px; color:#444; margin-bottom:8px; line-height:1.5; }
.kh-inst-step:last-child{ margin-bottom:0; }
.kh-payment-number      { display:inline-block; font-size:16px; font-weight:700; color:#111; background:#fff; border:1.5px solid #c8dfc0; border-radius:6px; padding:3px 12px; margin-left:6px; letter-spacing:1px; }

/* Confirmation hero */
.kh-confirm-hero    { text-align:center; padding:32px 20px 24px; margin-bottom:24px; border-radius:14px; }
.kh-confirm-success { background:#e8f8f0; }
.kh-confirm-pending { background:#fff8ee; }
.kh-confirm-error   { background:#fde8e8; }
.kh-confirm-icon    { font-size:36px; margin-bottom:10px; }
.kh-confirm-title   { font-size:22px; font-weight:600; margin-bottom:6px; color:#111; }
.kh-confirm-sub     { font-size:13px; color:#666; }

/* Ref badge */
.kh-ref-badge {
  display:inline-block;
  font-size:16px; font-weight:700; letter-spacing:1.5px;
  background:#f7f6f3; border:1.5px solid #e0ddd6;
  border-radius:8px; padding:8px 18px;
  margin-bottom:16px; color:#333;
}

/* Status pills */
.kh-status-pill   { display:inline-block; padding:3px 10px; border-radius:10px; font-size:11px; font-weight:600; }
.kh-pill-pending   { background:#fff3cd; color:#856404; }
.kh-pill-confirmed { background:#d4edda; color:#155724; }
.kh-pill-cancelled { background:#fde8e8; color:#8b1a1a; }
.kh-pill-completed { background:#e8f8f0; color:#0F6E56; }
.kh-pill-noshow    { background:#f0f0f0; color:#666; }
.kh-pill-verified  { background:#d4edda; color:#155724; }
.kh-pill-rejected  { background:#fde8e8; color:#8b1a1a; }

/* Alerts */
.kh-alert         { padding:12px 16px; border-radius:8px; font-size:13px; }
.kh-alert-success { background:#d4edda; color:#155724; border:1px solid #b8dfc6; }
.kh-alert-error   { background:#fde8e8; color:#8b1a1a; border:1px solid #f0c0c0; }
.kh-alert-banner  { background:#fff3cd; border:1px solid #ffc107; border-radius:8px; padding:12px 16px; font-size:13px; color:#856404; margin-bottom:16px; }

/* Confirm actions */
.kh-confirm-actions { display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }
.kh-btn-outline {
  padding:9px 18px; font-size:13px; border:1px solid #d8d5ce;
  border-radius:20px; background:#fff; cursor:pointer; color:#222; text-decoration:none;
  transition:background .15s;
}
.kh-btn-outline:hover{ background:#f7f6f3; }

/* Status lookup */
.kh-status-lookup-form { max-width:440px; display:flex; flex-direction:column; gap:14px; }

@media print {
  .kh-confirm-actions, .kh-page-header, nav, header, footer { display:none !important; }
  .kh-confirm-card { border:none; padding:0; }
}

/* ══════════════════════════════════════════
   DAY CAROUSEL (3-day floor plan switcher)
══════════════════════════════════════════ */
.kh-day-carousel {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: var(--color-background-secondary, #f7f6f3);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #e8e6e0;
}
.kh-day-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: background .18s, color .18s;
  font-family: inherit;
}
.kh-day-tab:hover:not(.kh-day-active) { background: #fff; }
.kh-day-active {
  background: #111 !important;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.kh-day-label {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  line-height: 1;
}
.kh-day-date {
  font-size: 11px;
  color: inherit;
  opacity: .7;
  line-height: 1;
}
.kh-day-active .kh-day-label,
.kh-day-active .kh-day-date { color: #fff; opacity: 1; }

/* Date field hint */
.kh-field-hint {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   CUSTOMER WHATSAPP BUTTONS (Confirmation)
══════════════════════════════════════════ */
.kh-confirm-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; align-items: center; }

.kh-btn-wa-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 24px;
  text-decoration: none;
  transition: background .18s, transform .12s;
  white-space: nowrap;
}
.kh-btn-wa-share:hover { background: #1da851; transform: translateY(-1px); color: #fff; }

.kh-btn-wa-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #25D366;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 24px;
  border: 1.5px solid #25D366;
  text-decoration: none;
  transition: all .18s;
  white-space: nowrap;
}
.kh-btn-wa-contact:hover { background: #f0fef4; color: #1da851; }

@media print {
  .kh-confirm-actions, .kh-payment-step-bar { display: none !important; }
}
