/* Booking page — minimal modern look, brand-tinted via --brand-primary / --brand-accent. */
:root {
  --brand-primary: #556ee6;
  --brand-accent:  #34c38f;
  --text:    #1f2937;
  --muted:   #6b7280;
  --bg:      #f7f8fb;
  --card:    #ffffff;
  --border:  #e5e7eb;
  --danger:  #ef4444;
  --ok:      #16a34a;
  --warn:    #f59e0b;
  --radius:  10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
}

.container { max-width: 960px; margin: 0 auto; padding: 16px; }
.container.narrow { max-width: 640px; }
.row { display: flex; gap: 12px; align-items: stretch; }
.row.two label { flex: 1; }
.row .grow { flex: 1; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.brand-header {
  background: linear-gradient(180deg, #fff, var(--bg));
  border-bottom: 1px solid var(--border);
}
.brand-header .container { padding-top: 24px; padding-bottom: 24px; }
.brand-name { font-size: 1.25rem; margin: 0; color: var(--brand-primary); }
.brand-logo { height: 40px; }
.brand-footer { text-align: center; color: var(--muted); font-size: 0.875rem; margin: 32px 0 8px; }
.brand-footer a { color: var(--muted); margin: 0 8px; text-decoration: none; }
.brand-footer a:hover { text-decoration: underline; }

.alert { padding: 10px 12px; border-radius: var(--radius); margin: 12px 0; }
.alert-ok { background: #ecfdf5; color: var(--ok); border: 1px solid #a7f3d0; }
.alert-err{ background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin: 16px 0;
  overflow: hidden;
}
.step > header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #fafbfd, #fff);
  border-bottom: 1px solid var(--border);
}
.step > header h2 { margin: 0; font-size: 1.05rem; color: var(--text); }
.step > header .step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-primary); color: white;
  font-weight: 600; font-size: 0.875rem;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.step .body { padding: 18px; }

/* Field row groupings matching create-transfer */
.field-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.field-grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 540px) { .field-grid, .field-grid.two { grid-template-columns: 1fr; } }

/* Stepper (− / + around a number input) */
.stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: white; overflow: hidden;
  width: 100%; max-width: 160px;
}
.stepper button {
  width: 38px; height: 40px;
  background: white; border: none; font: inherit;
  font-size: 1.25rem; line-height: 1; cursor: pointer;
  color: var(--brand-primary); flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
}
.stepper button:hover { background: #f3f4f6; }
.stepper button:disabled { color: #9ca3af; cursor: not-allowed; }
.stepper input {
  flex: 1 1 auto; width: 100%; text-align: center;
  border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  font: inherit; padding: 8px 0; height: 40px;
  -moz-appearance: textfield; appearance: textfield;
  background: white;
}
.stepper input:focus { outline: none; }
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

label { display: block; margin: 8px 0; }
label > span { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 4px; }
label.check { display: flex; align-items: center; gap: 8px; }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=datetime-local], select, textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius); background: white;
  font: inherit; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-primary); outline-offset: 1px; border-color: var(--brand-primary); }

.btn {
  display: inline-block; padding: 10px 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: white; color: var(--text); font: inherit;
  cursor: pointer; text-decoration: none; transition: filter .15s;
}
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand-primary); color: white; border-color: var(--brand-primary); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger); color: white; border-color: var(--danger); }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

.msg { margin: 8px 0; font-size: 0.875rem; color: var(--muted); min-height: 1.2em; }
.msg.error { color: var(--danger); }
.msg.ok    { color: var(--ok); }

.area-fallback-note {
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  border-radius: var(--radius); padding: 8px 10px; margin-top: 6px;
  font-size: 0.8125rem;
}
.area-fallback-note strong { color: #7c2d12; }

/* Flatpickr brand polish */
.flatpickr-day.selected, .flatpickr-day.selected:hover {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: var(--text) !important;
}

/* Vehicle category cards (step 2) — tinted header + capacity badges + big price */
.categories { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cat {
  position: relative;
  border: 2px solid var(--border); border-radius: var(--radius);
  background: white; overflow: hidden; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .05s;
}
.cat:hover:not(.disabled) { border-color: var(--brand-primary); transform: translateY(-1px); }
.cat.selected {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 16%, transparent);
}
.cat.disabled { opacity: .55; cursor: not-allowed; }
.cat__head {
  background: var(--brand-primary);
  color: white;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.cat__icon {
  width: 42px; height: 42px;
  background: rgba(255,255,255,.18);
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.cat__head-text { min-width: 0; }
.cat__name { font-weight: 700; font-size: 1rem; line-height: 1.15; }
.cat__desc { font-size: 0.75rem; opacity: .85; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat__body { padding: 12px 14px; }
.cat__caps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cap {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.75rem; color: var(--muted);
  background: #f3f4f6; border-radius: 999px; padding: 3px 8px;
}
.cap-icon { font-size: 0.85rem; }
.cat__price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cat__price { font-size: 1.375rem; color: var(--brand-primary); font-weight: 700; letter-spacing: -0.01em; }
.cat__select-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-primary); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.7); transition: opacity .15s, transform .15s;
}
.cat.selected .cat__select-mark { opacity: 1; transform: scale(1); }
.cat__error { color: var(--danger); font-size: 0.8125rem; margin-top: 6px; }
.cat__unavailable { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-primary); margin-right: 4px; vertical-align: middle; }
.dot--anim { animation: dot-pulse 1.1s ease-in-out infinite; }
@keyframes dot-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

@media (max-width: 540px) {
  .categories { grid-template-columns: 1fr; }
  .row.two { flex-direction: column; }
}

/* Extras (baby seat, booster) on Trip Details */
.extras { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 540px) { .extras { grid-template-columns: 1fr; } }
.extra-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: white; padding: 8px 10px;
}
.extra-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; flex: 1; margin: 0;
}
.extra-toggle > span { display: inline-block; }
.extra-toggle input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 36px; height: 22px;
  background: #e5e7eb; border-radius: 12px; position: relative;
  cursor: pointer; transition: background .15s; flex: 0 0 auto; margin: 0;
}
.extra-toggle input[type="checkbox"]::before {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: white;
  transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.extra-toggle input[type="checkbox"]:checked { background: var(--brand-primary); }
.extra-toggle input[type="checkbox"]:checked::before { transform: translateX(14px); }
.extra-icon { font-size: 1.25rem; flex: 0 0 auto; }
.extra-label { font-size: 0.9rem; color: var(--text); }
.extra-count .stepper { max-width: 120px; height: 36px; }
.extra-count .stepper button { width: 32px; height: 36px; font-size: 1.1rem; }
.extra-count .stepper input { height: 36px; }

.summary {
  background: #f9fafb; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px;
}
.summary dt { color: var(--muted); font-size: 0.875rem; margin-top: 6px; }
.summary dd { margin: 0; }
.summary .total { font-size: 1.25rem; color: var(--brand-primary); font-weight: 700; margin-top: 10px; }

.stripe-element {
  margin-top: 12px; padding: 14px; background: white;
  border: 1px solid var(--border); border-radius: var(--radius);
}

/* Admin */
.table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-weight: 600; color: var(--muted); }
.add-form { margin: 12px 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.grid .span-2 { grid-column: 1 / -1; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
