/* Tawseleh unified palette */
:root {
  --brand-primary: #2457E6;
  --brand-journey-blue: #3158E8;
  --brand-ink: #14213D;
  --brand-bg: #F7F4EE;
  --brand-soft: #EAF0FF;
  --brand-blue-soft: #EDF3FF;
  --brand-navy-soft: #1e4976;
  --brand-success: #1F9D72;
  --brand-muted: #667085;
  --brand-border: #E5E8EF;
}
.ride-seat-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ride-seat-section__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.3;
  color: #1c1917;
}

.ride-seat-section__counter {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--brand-primary);
  white-space: nowrap;
}

.seat-picker-section {
  overflow: hidden;
}

.seat-picker-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
}

.seat-picker-car {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.car-seat-shell {
  position: relative;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 300 / 560;
}

.car-seat-shell .car-top-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  user-select: none;
}

.car-seat-shell .seat-overlay {
  position: absolute;
  inset: 0;
}

.car-seat-shell .driver-seat-marker {
  position: absolute;
  top: 31.8%;
  left: 25.5%;
  z-index: 1;
  width: clamp(48px, 12vw, 56px);
  height: clamp(48px, 12vw, 56px);
  margin-left: calc(clamp(48px, 12vw, 56px) / -2);
  margin-top: calc(clamp(48px, 12vw, 56px) / -2);
  border-radius: 999px;
  border: 3px solid #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.driver-seat-marker__label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #57534e;
}

.car-seat-shell #seat-map {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.car-seat-shell .seat-btn {
  position: absolute;
  width: clamp(48px, 12vw, 58px);
  height: clamp(48px, 12vw, 58px);
  margin-left: calc(clamp(48px, 12vw, 58px) / -2);
  margin-top: calc(clamp(48px, 12vw, 58px) / -2);
  border-radius: 999px;
  border: 3px solid #fff;
  display: grid;
  place-items: center;
  color: #fff;
  padding: 0;
  transition:
    transform 0.28s cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 0.28s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.2s ease,
    background-color 0.25s ease;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
}

.car-seat-shell .seat-btn--loading {
  cursor: wait;
  transform: scale(0.92);
  pointer-events: none;
}

.car-seat-shell .seat-btn--loading-on {
  background: var(--brand-journey-blue) !important;
  box-shadow:
    0 0 0 4px rgba(26, 95, 173, 0.28),
    0 10px 28px rgba(26, 95, 173, 0.45);
  animation: seat-breathe 1.1s ease-in-out infinite;
}

.car-seat-shell .seat-btn--loading-off {
  background: #64748b !important;
  box-shadow:
    0 0 0 4px rgba(100, 116, 139, 0.22),
    0 8px 20px rgba(15, 23, 42, 0.18);
  animation: seat-breathe 1.1s ease-in-out infinite;
}

.car-seat-shell #seat-map.seat-map--busy .seat-btn:not(.seat-btn--loading) {
  opacity: 0.45;
  pointer-events: none;
  transform: scale(0.96);
  filter: saturate(0.7);
}

.seat-spinner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.seat-spinner-svg {
  width: 26px;
  height: 26px;
  animation: seat-spin 0.85s linear infinite;
}

.seat-spinner-svg circle {
  transform-origin: center;
  animation: seat-dash 1.4s ease-in-out infinite;
}

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

@keyframes seat-dash {
  0% { stroke-dashoffset: 36; opacity: 0.65; }
  50% { stroke-dashoffset: 8; opacity: 1; }
  100% { stroke-dashoffset: 36; opacity: 0.65; }
}

@keyframes seat-breathe {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(0.97); }
}

@keyframes seat-settle {
  0% { transform: scale(0.88); opacity: 0.85; }
  55% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.car-seat-shell .seat-btn--settle {
  animation: seat-settle 0.38s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
}

#ride-footer.is-seat-updating #total-price {
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

#ride-footer.is-seat-updating #footer-seat-label {
  opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
  .car-seat-shell .seat-btn--loading-on,
  .car-seat-shell .seat-btn--loading-off {
    animation: none;
  }

  .seat-spinner-svg,
  .seat-spinner-svg circle {
    animation-duration: 1.6s;
  }

  .car-seat-shell .seat-btn--settle {
    animation: none;
  }
}

.car-seat-shell .seat-btn--available {
  background: var(--brand-journey-blue);
  box-shadow: 0 10px 28px rgba(49, 88, 232, 0.45);
}

.car-seat-shell .seat-btn--available:active:not(:disabled) {
  transform: scale(0.93);
}

.car-seat-shell .seat-btn--selected {
  background: #22c55e;
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.45);
}

.car-seat-shell .seat-btn--booked {
  background: #64748b;
  cursor: not-allowed;
  opacity: 0.85;
}

.car-seat-shell .seat-btn--unavailable {
  background: #cbd5e1;
  cursor: not-allowed;
  opacity: 0.75;
}

.car-seat-shell .seat-front-passenger { top: 31.8%; left: 74.5%; }
.car-seat-shell .seat-back-left { top: 59.2%; left: 21%; }
.car-seat-shell .seat-back-middle { top: 59.2%; left: 50%; }
.car-seat-shell .seat-back-right { top: 59.2%; left: 79%; }

/* Side panel */
.seat-picker-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.seat-picker-panel {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e7e5e4;
  background: #fafaf9;
}

.seat-picker-panel__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  color: #1c1917;
}

.seat-picker-legend {
  list-style: none;
  margin: 0;
  padding: 0;
}

.seat-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #e7e5e4;
}

.seat-legend-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.seat-legend-row:first-child {
  padding-top: 0;
}

.seat-legend-row__label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.seat-legend-row__text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #44403c;
}

.seat-legend-row__price {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--brand-primary);
  white-space: nowrap;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.legend-dot--selected { background: #22c55e; }
.legend-dot--available { background: var(--brand-journey-blue); }
.legend-dot--booked { background: #64748b; }
.legend-dot--unavailable { background: #cbd5e1; }

.seat-picker-seats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.seat-picker-seats__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e7e5e4;
  background: #fff;
}

.seat-picker-seats__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1c1917;
}

.seat-picker-seats__status {
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.seat-picker-seats__status--selected {
  background: #dcfce7;
  color: #15803d;
}

.seat-picker-seats__status--available {
  background: #dbeafe;
  color: #1d4ed8;
}

.seat-picker-seats__status--booked {
  background: #f1f5f9;
  color: #475569;
}

.seat-picker-seats__status--unavailable {
  background: #f5f5f4;
  color: #78716c;
}

.seat-picker-trust {
  border-radius: 14px;
  background: var(--brand-blue-soft);
  padding: 14px 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--brand-navy-soft);
}

.seat-picker-trust strong {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.seat-picker-trust__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.seat-picker-trust p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e4976;
}

@media (min-width: 768px) {
  .ride-seat-section__title {
    font-size: 1.25rem;
  }

  .ride-seat-section__counter {
    font-size: 1rem;
  }

  .seat-picker-body {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }

  .seat-picker-car {
    grid-row: 1 / span 2;
  }

  .car-seat-shell {
    max-width: 280px;
    margin-inline: auto;
  }

  .driver-seat-marker__label {
    font-size: 0.875rem;
  }

  .seat-picker-panel__title {
    font-size: 1.0625rem;
  }

  .seat-legend-row__text,
  .seat-legend-row__price {
    font-size: 1rem;
  }

  .seat-picker-seats__name {
    font-size: 1rem;
  }

  .seat-picker-seats__status {
    font-size: 0.875rem;
  }

  .seat-picker-trust {
    font-size: 0.9375rem;
  }

  .seat-picker-trust strong {
    font-size: 1rem;
  }

  .seat-picker-trust p {
    font-size: 0.9375rem;
  }
}

@media (min-width: 1024px) {
  .ride-seat-section__title {
    font-size: 1.375rem;
  }

  .seat-picker-body {
    grid-template-columns: minmax(260px, 340px) minmax(300px, 1fr);
    gap: 36px;
  }

  .car-seat-shell {
    max-width: 300px;
  }

  .car-seat-shell .seat-btn {
    width: 58px;
    height: 58px;
    margin-left: -29px;
    margin-top: -29px;
  }

  .car-seat-shell .driver-seat-marker {
    width: 56px;
    height: 56px;
    margin-left: -28px;
    margin-top: -28px;
  }

  .seat-picker-panel {
    padding: 18px;
  }
}
