/* ==========================================================================
   booking.css — Customer booking page
   Same design system as dashboard.css, tuned for a narrow, mobile-first flow.
   ========================================================================== */

:root{
  --brand: #0f6b5c;
  --brand-dark: #0b5347;
  --brand-light: #e6f3f0;
  --brand-ring: rgba(15,107,92,.16);

  --text: #0f172a;
  --text-mid: #64748b;
  --text-faint: #94a3b8;
  --border: #e7eaef;
  --border-strong: #e2e8f0;
  --bg: #f5f6f8;
  --surface: #ffffff;

  --green: #16a34a;    --green-bg: #e8f8ee;
  --orange: #d97706;   --orange-bg: #fef3e2;
  --red: #dc2626;      --red-bg: #fdecec;
  --blue: #2563eb;     --blue-bg: #eaf1ff;

  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --shadow: 0 2px 8px rgba(15,23,42,.06);
  --shadow-md: 0 8px 24px rgba(15,23,42,.10);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*{ box-sizing: border-box; }

body{
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1{ font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 20px; }
h2{ font-size: 15px; font-weight: 700; margin: 0 0 14px; }

/* ── Step indicator ──────────────────────────────────────────────────── */

.steps{
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
}

.step-pill{
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
}

.step-pill .dot{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border-strong);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex: none;
  transition: background .2s ease, transform .2s ease;
}

.step-pill.step-active{ color: var(--text); }
.step-pill.step-active .dot{ background: var(--brand); transform: scale(1.08); }
.step-pill.step-done .dot{ background: var(--brand); }
.step-pill.step-done{ color: var(--text-mid); }

.step-line{
  flex: none;
  width: 20px;
  height: 2px;
  background: var(--border-strong);
}

/* ── Cards / sections ────────────────────────────────────────────────── */

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  animation: fadeIn .3s ease both;
}

/* ── Forms ───────────────────────────────────────────────────────────── */

label{
  display: block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
}
label:first-child{ margin-top: 0; }

input, select{
  width: 100%;
  padding: 10px 11px;
  margin-top: 6px;
  box-sizing: border-box;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus, select:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

button{
  margin-top: 18px;
  width: 100%;
  padding: 13px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
button:hover{ background: var(--brand-dark); }
button:active{ transform: translateY(1px); }

/* ── Car cards (existing JS assigns className="car"/"car selected") ───── */

.car{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 10px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
  animation: fadeIn .25s ease both;
}
.car:hover{ box-shadow: var(--shadow-md); transform: translateY(-1px); }
.car.selected{ border-color: var(--brand); background: var(--brand-light); box-shadow: 0 0 0 3px var(--brand-ring); }

.car b{ font-size: 14.5px; }

img.carimg{
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--bg);
}

/* ── GPS / fixed-location / same-as-pickup (new) ────────────────────── */

.location-row{ display: flex; gap: 8px; align-items: center; }
.location-row input{ flex: 1; margin-top: 6px; }

.btn-icon{
  margin-top: 6px;
  width: 42px;
  height: 42px;
  flex: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--brand-light);
  color: var(--brand-dark);
  border: 1px solid transparent;
}
.btn-icon:hover{ background: var(--brand); color: #fff; }

.gps-status{
  font-size: 12.5px;
  color: var(--text-mid);
  margin-top: 6px;
}
.gps-status a{ color: var(--brand); font-weight: 600; }

.fixed-note{
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.checkbox-row{ margin-top: 14px; }
.checkbox-label{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.checkbox-label input{ width: auto; margin: 0; accent-color: var(--brand); }

/* ── Feedback ────────────────────────────────────────────────────────── */

.err{ color: var(--red); margin-top: 10px; font-size: 13px; }
.ok{ color: var(--green); margin-top: 4px; font-size: 14px; font-weight: 600; }

#result:not(:empty){
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-top: 20px;
  animation: fadeIn .3s ease both;
}

#result a{
  display: inline-block;
  margin-top: 10px;
  color: #fff;
  background: var(--brand);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  transition: background .15s ease;
}
#result a:hover{ background: var(--brand-dark); }

/* ── Spinner / loading text ──────────────────────────────────────────── */

.spinner{
  width: 14px; height: 14px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--brand);
  border-radius: 50%;
  display: inline-block;
  animation: spin .6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ── Toasts (shared pattern with dashboard) ─────────────────────────── */

#toast-stack{
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
  width: min(360px, calc(100vw - 32px));
}
.toast{
  background: var(--text); color: #fff;
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toastIn .25s ease both;
}
.toast.toast-out{ animation: toastOut .2s ease forwards; }
.toast-success{ background: var(--brand-dark); }
.toast-error{ background: var(--red); }

/* ── Animations ──────────────────────────────────────────────────────── */

@keyframes fadeIn{ from{ opacity:0; transform: translateY(4px); } to{ opacity:1; transform: translateY(0); } }
@keyframes spin{ to{ transform: rotate(360deg); } }
@keyframes toastIn{ from{ opacity:0; transform: translateY(-10px); } to{ opacity:1; transform: translateY(0); } }
@keyframes toastOut{ to{ opacity:0; transform: translateY(-10px); } }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (min-width: 560px){
  body{ padding-top: 40px; }
}

@media (max-width: 375px){
  body{ padding: 18px 14px 48px; }
  .card{ padding: 16px; }
}
