/* ==========================================================================
   BOOKING CALENDAR — Day strip + slot picker (mobile-first)
   ========================================================================== */

/* --- Vehicle selector (sticky above the calendar) --- */
.booking-calendar__vehicle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.booking-calendar__vehicle-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
  color: var(--grey-500);
}
.booking-calendar__vehicle-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--grey-100);
  border-radius: 10px;
  background: var(--white);
  font-size: 14px;
  color: var(--anthracite);
  font-weight: 600;
  min-height: 44px;
}
.booking-calendar__vehicle-select:focus {
  outline: none;
  border-color: var(--sky);
}

/* --- Day strip --- */
.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 12px;
  scrollbar-width: none;
  min-height: 80px;
}
.day-strip:empty::before {
  content: 'Chargement…';
  color: var(--grey-500);
  font-size: 13px;
  padding: 24px 0;
}
.day-strip::-webkit-scrollbar { display: none; }

.day-strip__day {
  position: relative;
  min-width: 64px;
  text-align: center;
  padding: 12px 8px 16px;
  border-radius: 14px;
  cursor: pointer;
  border: 1.5px solid #e5e7eb;
  background: #ffffff;
  color: #9ca3af;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  flex-shrink: 0;
}
.day-strip__day:hover:not(:disabled) { border-color: #cbd5e1; }
.day-strip__day--available {
  background: #ecfdf5;
  border-color: #59a751;
  color: #14532d;
  cursor: pointer;
  font-weight: 600;
}
.day-strip__day--available::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #59a751;
  box-shadow: 0 0 0 2px rgba(89, 167, 81, 0.2);
}
.day-strip__day--available:hover { background: #d1fae5; transform: translateY(-1px); }
.day-strip__day--selected,
.day-strip__day--selected.day-strip__day--available {
  background: #16182c;
  border-color: #16182c;
  color: #ffffff;
  font-weight: 700;
}
.day-strip__day--selected::after,
.day-strip__day--selected.day-strip__day--available::after {
  background: #a4f696;
  box-shadow: 0 0 0 2px rgba(164, 246, 150, 0.25);
}
.day-strip__day--unavailable {
  cursor: default;
  opacity: .4;
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #9ca3af;
}
.day-strip__weekday {
  font-size: 11px;
  font-weight: 500;
}
.day-strip__num {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
.day-strip__month {
  font-size: 10px;
}

/* --- Month calendar (desktop) --- */
.day-calendar {
  display: block;
  padding: 0 0 12px;
}
.day-calendar__month { margin-bottom: 20px; }
.day-calendar__month:last-child { margin-bottom: 0; }
.day-calendar__month-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--anthracite);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.day-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.day-calendar__header {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 0;
}
.day-calendar__empty {
  aspect-ratio: 1;
}
.day-calendar__day {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: #ffffff;
  color: #9ca3af;
  font-size: 15px;
  font-weight: 600;
  cursor: default;
  padding: 0;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.day-calendar__day--available {
  background: #ecfdf5;
  border-color: #59a751;
  color: #14532d;
  cursor: pointer;
  font-weight: 700;
}
.day-calendar__day--available::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #59a751;
  box-shadow: 0 0 0 2px rgba(89, 167, 81, 0.2);
}
.day-calendar__day--available:hover { background: #d1fae5; transform: translateY(-1px); }
.day-calendar__day--selected,
.day-calendar__day--selected.day-calendar__day--available {
  background: #16182c;
  border-color: #16182c;
  color: #ffffff;
}
.day-calendar__day--selected::after,
.day-calendar__day--selected.day-calendar__day--available::after {
  background: #a4f696;
  box-shadow: 0 0 0 2px rgba(164, 246, 150, 0.25);
}
.day-calendar__day--unavailable {
  cursor: default;
  opacity: .4;
  background: #f9fafb;
}

/* --- Slot list --- */
.slot-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.slot-picker__label {
  font-weight: 600;
  font-size: 13px;
  color: var(--grey-500);
  margin-bottom: 4px;
}
.slot-picker__free {
  width: 100%;
  padding: 14px 16px;
  background: var(--white);
  border: 2px solid var(--grey-100);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--anthracite);
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color var(--transition);
}
.slot-picker__free:hover { border-color: var(--sky); }
.slot-picker__free--expanded {
  border-color: var(--sky);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.slot-picker__free-label { color: var(--green); font-size: 12px; }

.slot-picker__booked {
  width: 100%;
  padding: 10px 16px;
  background: var(--off-white);
  border: 1px dashed var(--grey-300);
  border-radius: 10px;
  font-size: 13px;
  color: var(--grey-300);
  text-align: center;
}

/* --- Inline booking form --- */
.slot-form {
  background: var(--white);
  border: 2px solid var(--sky);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 16px;
}
.slot-form__times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.slot-form__field label {
  display: block;
  font-size: 11px;
  color: var(--grey-500);
  margin-bottom: 4px;
  font-weight: 600;
}
.slot-form__field input,
.slot-form__field select {
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--grey-100);
  border-radius: 8px;
  font-size: 14px;
  color: var(--anthracite);
  min-height: 44px;
  background: var(--white);
}
.slot-form__field input:focus,
.slot-form__field select:focus {
  outline: none;
  border-color: var(--sky);
}
.slot-form__estimate {
  background: var(--green-light);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  margin-bottom: 12px;
}
.slot-form__estimate-amount {
  font-size: 13px;
  font-weight: 600;
  color: var(--anthracite);
}
.slot-form__estimate-detail {
  font-size: 11px;
  color: var(--grey-500);
}
.slot-form__submit {
  width: 100%;
  padding: 13px;
  background: var(--anthracite);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  transition: background var(--transition);
}
.slot-form__submit:hover { background: var(--anthracite-light); }
.slot-form__error {
  background: rgb(var(--color-error-container, 255 237 237));
  color: rgb(var(--color-on-error-container, 153 29 29));
  border-left: 3px solid rgb(var(--color-error, 204 51 51));
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 8px;
}

/* --- Host agenda --- */
.agenda-day {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0 8px;
}
.agenda-day:first-child { padding-top: 0; }
.agenda-day__label {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.agenda-day__label--today { color: var(--sky); }
.agenda-day__label--future { color: var(--grey-500); }
.agenda-day__date {
  font-size: 12px;
  color: var(--grey-500);
}
.agenda-day__line {
  flex: 1;
  height: 1px;
  background: var(--grey-100);
}

.agenda-card {
  background: var(--white);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: var(--anthracite);
  transition: background var(--transition);
}
.agenda-card:hover { background: var(--off-white); }
.agenda-card--confirmed { border-left: 4px solid var(--green); }
.agenda-card--pending { border-left: 4px solid var(--orange); }
.agenda-card__time {
  font-weight: 700;
  font-size: 14px;
}
.agenda-card__driver {
  font-size: 12px;
  color: var(--grey-500);
  margin-top: 2px;
}
.agenda-card__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.agenda-card__station {
  font-size: 11px;
  color: var(--grey-500);
}

/* ==========================================================================
   BOOKING CONFIRM — recap modal shown before the driver submits the booking
   ========================================================================== */

.booking-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(22, 24, 44, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: booking-confirm-fade 200ms ease;
}
@media (min-width: 640px) {
  .booking-confirm-backdrop { align-items: center; padding: 24px; }
}
@keyframes booking-confirm-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.booking-confirm {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  padding: 28px 24px 24px;
  box-shadow: 0 -16px 48px rgba(22, 24, 44, 0.18);
  animation: booking-confirm-slide 250ms cubic-bezier(0.2, 0.9, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 640px) {
  .booking-confirm {
    border-radius: 28px;
    padding: 32px 28px 28px;
  }
}
@keyframes booking-confirm-slide {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.booking-confirm__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f2f3f7;
  border: none;
  color: #46464d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
}
.booking-confirm__close:hover { background: #e7e8ec; }

.booking-confirm__header {
  margin-bottom: 20px;
  padding-right: 48px;
}
.booking-confirm__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: #16182c;
  margin: 0 0 4px;
  line-height: 1.2;
}
.booking-confirm__subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #46464d;
  margin: 0;
  line-height: 1.5;
}

.booking-confirm__station {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8f9fd;
  border-radius: 20px;
  padding: 12px;
  margin-bottom: 16px;
}
.booking-confirm__photo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e1e2e6;
}
.booking-confirm__photo--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #16182c 0%, #2b2d42 100%);
}
.booking-confirm__photo--fallback .material-symbols-outlined {
  color: rgba(255, 255, 255, 0.5);
  font-size: 28px;
  font-variation-settings: 'FILL' 1;
}
.booking-confirm__station-text { min-width: 0; }
.booking-confirm__station-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #16182c;
  line-height: 1.2;
  margin-bottom: 4px;
}
.booking-confirm__station-address {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #46464d;
}
.booking-confirm__station-address .material-symbols-outlined { font-size: 14px; }

.booking-confirm__facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
}
.booking-confirm__fact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  background: #f2f3f7;
  border-radius: 14px;
}
.booking-confirm__fact dt {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #46464d;
  margin: 0;
  flex-shrink: 0;
}
.booking-confirm__fact dd {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #16182c;
  margin: 0;
  text-align: right;
}

.booking-confirm__estimate {
  background: #d2e4ff;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
}
.booking-confirm__estimate-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00497e;
  margin-bottom: 4px;
}
.booking-confirm__estimate-body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: #001c37;
  line-height: 1.1;
}
.booking-confirm__estimate-body > div { color: #001c37 !important; }
.booking-confirm__estimate-hint {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #00497e;
  margin: 6px 0 0;
  line-height: 1.4;
}

.booking-confirm__legal {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #77767d;
  margin: 0 0 16px;
  line-height: 1.5;
}

.booking-confirm__actions {
  display: flex;
  gap: 10px;
}
.booking-confirm__cancel,
.booking-confirm__submit {
  flex: 1;
  height: 52px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.booking-confirm__cancel {
  background: #f2f3f7;
  color: #16182c;
}
.booking-confirm__cancel:hover { background: #e7e8ec; }
.booking-confirm__submit {
  background: linear-gradient(135deg, #16182c 0%, #2b2d42 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(22, 24, 44, 0.25);
}
.booking-confirm__submit:hover { transform: translateY(-1px); }
.booking-confirm__submit:active { transform: scale(0.98); }

/* ==========================================================================
   STATION DETAIL — sticky bottom action bar (mobile only; desktop user
   already sees the booking calendar in the same viewport).
   ========================================================================== */

.station-detail-action-bar {
  position: fixed;
  bottom: 96px; /* clear the base_app mobile bottom nav (~90px) */
  left: 12px;
  right: 12px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(22, 24, 44, 0.18);
}
.station-detail-action-bar__left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.station-detail-action-bar__label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #46464d;
}
.station-detail-action-bar__price {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #16182c;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.station-detail-action-bar__unit {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: #46464d;
  margin-left: 1px;
}
.station-detail-action-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  height: 48px;
  background: linear-gradient(135deg, #16182c 0%, #2b2d42 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(22, 24, 44, 0.25);
  transition: transform 150ms ease;
  flex-shrink: 0;
}
.station-detail-action-bar__cta:hover { transform: translateY(-1px); }
.station-detail-action-bar__cta:active { transform: scale(0.98); }
.station-detail-action-bar__cta .material-symbols-outlined { font-size: 18px; }
.station-detail-action-bar--hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
.station-detail-action-bar {
  transition: transform 240ms ease, opacity 200ms ease;
}
.station-detail-action-bar__cta--disabled,
.station-detail-action-bar__cta[aria-disabled="true"] {
  background: #c7c5cd;
  box-shadow: none;
  pointer-events: none;
  opacity: 0.7;
}
.station-detail-action-bar__cta--disabled:hover,
.station-detail-action-bar__cta[aria-disabled="true"]:hover {
  transform: none;
}

/* ---- Calendar empty state (no availability in the loaded window) ---- */
.booking-calendar__empty {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: #fff7ed;
  border-radius: 16px;
  color: #7c2d12;
}
.booking-calendar__empty .material-symbols-outlined {
  font-size: 22px;
  color: #c2410c;
  flex-shrink: 0;
  margin-top: 2px;
}
.booking-calendar__empty-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #7c2d12;
  margin: 0 0 4px;
  line-height: 1.3;
}
.booking-calendar__empty-body {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #9a3412;
  margin: 0;
  line-height: 1.5;
}
