/* =============================================================================
   CW Booking Form — booking-form.css
   Aesthetic: Dark luxury / refined minimalist — matches app screenshots
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Playfair+Display:wght@500;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
  --cw-bg:           #ffffff;
  --cw-surface:      #f8f8f6;
  --cw-border:       #e4e4e0;
  --cw-border-focus: #1a1a1a;
  --cw-text:         #1a1a1a;
  --cw-text-muted:   #888880;
  --cw-accent:       #1a1a1a;
  --cw-accent-hover: #333330;
  --cw-accent-text:  #ffffff;
  --cw-error:        #c0392b;
  --cw-success:      #27ae60;
  --cw-tab-active:   #1a1a1a;
  --cw-tab-inactive: #888880;
  --cw-vehicle-sel:  #1a1a1a;
  --cw-radius:       12px;
  --cw-radius-sm:    8px;
  --cw-shadow:       0 2px 16px rgba(0,0,0,0.07);
  --cw-shadow-card:  0 1px 4px rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.04);
  --cw-font-body:    'DM Sans', sans-serif;
  --cw-font-display: 'Playfair Display', serif;
  --cw-transition:   0.2s ease;
  --cw-form-max-width: 500px;
}

/* ── Wrap ──────────────────────────────────────────────────────────────────── */
.cw-booking-wrap {
  font-family: var(--cw-font-body);
  color: var(--cw-text);
  background: var(--cw-bg);
  border-radius: var(--cw-radius);
  box-shadow: var(--cw-shadow);
  overflow: hidden;
  max-width: var(--cw-form-max-width);
  margin: 0 auto;
  max-height: 35rem;
  overflow: auto;
}

/* ── Tab nav ───────────────────────────────────────────────────────────────── */
.cw-tabs {
  display: flex;
  border-bottom: 1px solid var(--cw-border);
  background: var(--cw-bg);
}

.cw-tab {
  flex: 1;
  padding: 18px 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--cw-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--cw-tab-inactive);
  cursor: pointer;
  transition: color var(--cw-transition), border-color var(--cw-transition);
  white-space: nowrap;
  margin-bottom: -1px;
}

.cw-tab:hover {
  color: var(--cw-text);
}

.cw-tab.is-active {
  color: var(--cw-tab-active);
  border-bottom-color: var(--cw-tab-active);
  font-weight: 600;
}

/* ── Panel ─────────────────────────────────────────────────────────────────── */
.cw-panel {
  display: none;
}
.cw-panel.is-active {
  display: block;
}

/* ── Stepper container ─────────────────────────────────────────────────────── */
.cw-stepper {
  padding: 25px;
}

/* ── Progress bar ──────────────────────────────────────────────────────────── */
.cw-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  gap: 0;
}

.cw-progress__step {
  display: flex;
  align-items: center;
}

.cw-progress__bubble {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--cw-border);
  background: var(--cw-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--cw-text-muted);
  position: relative;
  transition: all var(--cw-transition);
  flex-shrink: 0;
}

.cw-progress__check {
  display: none;
  font-size: 14px;
}

.cw-progress__num {
  display: block;
}

.cw-progress__line {
  width: 80px;
  height: 1px;
  background: var(--cw-border);
  margin: 0 6px;
  transition: background var(--cw-transition);
}

/* Active step */
.cw-progress__step.is-active .cw-progress__bubble {
  border-color: var(--cw-accent);
  background: var(--cw-accent);
  color: var(--cw-accent-text);
}

/* Completed step */
.cw-progress__step.is-done .cw-progress__bubble {
  border-color: var(--cw-accent);
  background: var(--cw-accent);
  color: var(--cw-accent-text);
}
.cw-progress__step.is-done .cw-progress__num { display: none; }
.cw-progress__step.is-done .cw-progress__check { display: block; }
.cw-progress__step.is-done + .cw-progress__step .cw-progress__line,
.cw-progress__step.is-done .cw-progress__line {
  background: var(--cw-accent);
}

/* ── Steps ─────────────────────────────────────────────────────────────────── */
.cw-step {
  display: none;
  animation: cw-fadein 0.25s ease;
}
.cw-step.is-active {
  display: block;
}

@keyframes cw-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cw-step__title {
  font-family: var(--cw-font-body);
  font-size: 20px;
  font-weight: 600;
  color: var(--cw-text);
  margin: 0 0 24px;
  letter-spacing: -0.3px;
}

/* ── Fields ────────────────────────────────────────────────────────────────── */
.cw-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.cw-fields__row {
  display: grid;
  gap: 16px;
}

.cw-fields__row--half {
  grid-template-columns: 1fr 1fr;
}

.cw-fields__row--route {
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
}

.cw-route-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 10px;
  color: var(--cw-text-muted);
}

.cw-route-arrow svg {
  width: 18px;
  height: 18px;
}

.cw-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cw-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--cw-text-muted);
  letter-spacing: 0.01em;
}

.cw-required {
  color: var(--cw-error);
  margin-left: 2px;
}

/* ── Input wrap ────────────────────────────────────────────────────────────── */
.cw-input-wrap {
  position: relative;
}

.cw-input-wrap--icon .cw-input {
  padding-left: 42px;
}

.cw-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--cw-text-muted);
  pointer-events: none;
}

/* ── Input / Select ────────────────────────────────────────────────────────── */
.cw-input {
  width: 100%;
  padding: 9px 16px;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-sm);
  background: var(--cw-bg);
  font-family: var(--cw-font-body);
  font-size: 14px;
  color: var(--cw-text);
  outline: none;
  transition: border-color var(--cw-transition), box-shadow var(--cw-transition);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.cw-input:focus {
  border-color: var(--cw-border-focus);
}

.cw-input::placeholder {
  color: #c0c0bc;
}

.cw-input:disabled {
  background: var(--cw-surface);
  color: var(--cw-text-muted);
  cursor: not-allowed;
}

/* Select with arrow */
.cw-input-wrap--select {
  position: relative;
}

.cw-select {
  padding-right: 40px;
  cursor: pointer;
  background-image: none;
}

.cw-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--cw-text-muted);
  pointer-events: none;
}

/* ── Phone field ───────────────────────────────────────────────────────────── */
.cw-phone-wrap {
  display: flex;
  gap: 10px;
}

.cw-phone-code {
  flex: 0 0 100px;
}

.cw-phone-number {
  flex: 1;
}

/* ── Vehicle list (Step 2) ─────────────────────────────────────────────────── */
.cw-vehicles {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  min-height: 100px;
}

.cw-vehicles__loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cw-text-muted);
  font-size: 14px;
  padding: 24px 0;
}

.cw-vehicles__error {
  color: var(--cw-error);
  font-size: 14px;
  padding: 16px;
  background: #fdf2f2;
  border-radius: var(--cw-radius-sm);
  border: 1px solid #f5c6c6;
}

/* ── Vehicle card ──────────────────────────────────────────────────────────── */
.cw-vehicle-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--cw-border);
  border-radius: var(--cw-radius-sm);
  background: var(--cw-bg);
  cursor: pointer;
  transition: border-color var(--cw-transition), box-shadow var(--cw-transition);
  position: relative;
  overflow: hidden;
}

.cw-vehicle-card:hover {
  border-color: #b0b0aa;
  box-shadow: var(--cw-shadow-card);
}

.cw-vehicle-card.is-selected {
  border-color: var(--cw-vehicle-sel);
  box-shadow: 0 0 0 2px rgba(26,26,26,0.12);
}

.cw-vehicle-card.is-selected::after {
  content: '✓';
  position: absolute;
  top: 0.3rem;
  right: 0.5rem;
  width: 20px;
  height: 20px;
  background: var(--cw-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 20px;
  text-align: center;
}

.cw-vehicle__img {
  flex-shrink: 0;
  width: 88px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.cw-vehicle__img--placeholder {
  width: 88px;
  height: 56px;
  background: var(--cw-surface);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cw-vehicle__img--placeholder svg {
  width: 32px;
  height: 32px;
  color: var(--cw-border);
}

.cw-vehicle__info {
  flex: 1;
  min-width: 0;
}

.cw-vehicle__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--cw-text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw-vehicle__meta {
  font-size: 12px;
  color: var(--cw-text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cw-vehicle__meta-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

.cw-vehicle__meta svg {
  width: 12px;
  height: 12px;
}

.cw-vehicle__price-wrap {
  text-align: right;
  flex-shrink: 0;
}

.cw-vehicle__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--cw-text);
  letter-spacing: -0.5px;
  display: block;
}

.cw-vehicle__price-currency {
  font-size: 12px;
  font-weight: 500;
  color: var(--cw-text-muted);
}

.cw-vehicle__select-label {
  font-size: 12px;
  color: var(--cw-text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.cw-vehicle__select-label svg {
  width: 12px;
  height: 12px;
}

/* ── Payment summary (Step 3) ──────────────────────────────────────────────── */
.cw-summary {
  background: var(--cw-surface);
  border-radius: var(--cw-radius-sm);
  padding: 20px 24px;
  margin: 24px 0 28px;
}

.cw-summary__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--cw-text);
  margin: 0 0 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 12px;
}

.cw-summary__rows {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cw-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.cw-summary__row dt {
  font-size: 13px;
  color: var(--cw-text-muted);
  font-weight: 400;
  white-space: nowrap;
}

.cw-summary__row dd {
  font-size: 13px;
  color: var(--cw-text);
  font-weight: 500;
  text-align: right;
  margin: 0;
}

.cw-summary__row--total {
  border-top: 1px solid var(--cw-border);
  margin-top: 6px;
  padding-top: 14px;
}

.cw-summary__row--total dt,
.cw-summary__row--total dd {
  font-size: 15px;
  font-weight: 700;
  color: var(--cw-text);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.cw-step__actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.cw-step__actions--end {
  justify-content: flex-end;
}

.cw-step__actions--split {
  justify-content: space-between;
}

.cw-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--cw-radius-sm);
  font-family: var(--cw-font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--cw-transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.cw-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cw-btn--primary {
  background: var(--cw-accent);
  color: var(--cw-accent-text);
  flex: 1;
  justify-content: center;
}

.cw-btn--primary:hover:not(:disabled) {
  background: var(--cw-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,26,26,0.2);
}

.cw-btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cw-btn--ghost {
  background: transparent;
  color: var(--cw-text);
  border: 1px solid var(--cw-border);
  padding: 14px 20px;
}

.cw-btn--ghost:hover {
  border-color: var(--cw-text);
  background: var(--cw-surface);
  color: #1a1a1a;
}

/* ── Spinner ───────────────────────────────────────────────────────────────── */
.cw-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--cw-border);
  border-top-color: var(--cw-accent);
  border-radius: 50%;
  animation: cw-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes cw-spin {
  to { transform: rotate(360deg); }
}

/* ── Error state ───────────────────────────────────────────────────────────── */
.cw-input.is-error {
  border-color: var(--cw-error);
}

.cw-field__error {
  font-size: 12px;
  color: var(--cw-error);
  margin-top: 4px;
}
.cw-booking-wrap input[type=date], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], select, textarea{
   margin-top: 0;
}
.cw-booking-wrap [type=button]:focus, .cw-booking-wrap [type=button]:hover, .cw-booking-wrap [type=submit]:focus, .cw-booking-wrap [type=submit]:hover, button:focus, button:hover{
  background-color: #f5f5f5;
}
.cw-top-32{
  top: 32% !important;
}
.cw-booking-feedback{
  margin-bottom: 20px;
}
.cw-booking-feedback.cw-success{
  color: var(--cw-success);
}
/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .cw-stepper {
    padding: 24px 20px;
  }

  .cw-fields__row--half,
  .cw-fields__row--route {
    grid-template-columns: 1fr;
  }

  .cw-route-arrow {
    display: none;
  }

  .cw-tab {
    font-size: 12px;
    padding: 14px 8px;
  }

  .cw-vehicle-card {
    flex-wrap: wrap;
  }

  .cw-vehicle__img {
    width: 70px;
    height: 44px;
  }

  .cw-progress__line {
    width: 48px;
  }

  .cw-phone-wrap {
    flex-direction: column;
  }

  .cw-phone-code {
    flex: none;
    width: 100%;
  }
}
