/* ============================================================
   Ride Request Form — rrf-* namespace
   Brand tokens via variables.css
   ============================================================ */

/* ── Card wrapper ── */
.rrf-card {
  border-radius: 22px;
  overflow: visible;
  box-shadow:
    0 24px 64px rgba(26, 36, 64, 0.16),
    0 4px 16px rgba(0, 0, 0, 0.04);
  /* Orange gradient stripe across the top 4 px */
  background-image: var(--grad-orange);
  background-size: 100% 4px;
  background-repeat: no-repeat;
  background-position: top;
  background-color: var(--clr-white);
}

/* ── Header ── */
.rrf-header {
  background: linear-gradient(
    120deg,
    var(--clr-blue-dark) 0%,
    var(--clr-blue) 55%,
    var(--clr-blue-mid) 100%
  );
  padding: 22px 28px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 22px 22px 0 0;
}

.rrf-header-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--grad-orange);
  box-shadow: 0 4px 16px rgba(255, 108, 44, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rrf-header-title {
  color: var(--clr-white);
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.rrf-header-subtitle {
  color: rgba(255, 255, 255, 0.72);
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.4;
}

/* ── Form body ── */
.rrf-body {
  padding: 22px 26px 26px;
  background: var(--clr-white);
  border-radius: 0 0 22px 22px;
}

/* ── Field labels ── */
.rrf-field-label {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Icon color helpers ── */
.rrf-icon--pickup {
  color: var(--clr-blue);
}

.rrf-icon--dropoff {
  color: var(--clr-orange);
}

/* ── Location fields ── */
.rrf-location-field {
  margin-bottom: 12px;
}

.rrf-location-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

.rrf-location-icon--pickup {
  color: var(--clr-blue);
}

.rrf-location-icon--dropoff {
  color: var(--clr-orange);
}

.rrf-location-input {
  padding-inline-start: 44px !important;
  border-radius: 12px !important;
  height: 48px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  background: var(--clr-rrf-input-bg) !important;
  border: 1.5px solid var(--clr-rrf-input-border) !important;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    background 0.18s !important;
}

.rrf-location-input--pickup:focus {
  background: var(--clr-white) !important;
  border-color: var(--clr-blue) !important;
  box-shadow: 0 0 0 3.5px rgba(37, 99, 156, 0.12) !important;
  outline: none !important;
}

.rrf-location-input--dropoff {
  background: var(--clr-rrf-dropoff-bg) !important;
  border-color: var(--clr-rrf-dropoff-border) !important;
}

.rrf-location-input--dropoff:focus {
  background: var(--clr-white) !important;
  border-color: var(--clr-orange) !important;
  box-shadow: 0 0 0 3.5px rgba(255, 108, 44, 0.12) !important;
  outline: none !important;
}

.rrf-error-msg {
  font-size: 11.5px;
  margin-top: 4px;
  display: block;
}

/* ── Return same location toggle ── */
.rrf-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--clr-rrf-toggle-bg);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 12px;
  border: none;
  box-shadow: none;
}

.rrf-toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-blue-dark);
  display: flex;
  align-items: center;
  gap: 7px;
}

.rrf-toggle-switch {
  padding-inline-start: 0;
}

.rrf-toggle-switch .form-check-input {
  cursor: pointer;
  width: 42px;
  height: 22px;
}

/* ── Driver age box ── */
.rrf-age-box {
  background: var(--clr-rrf-age-bg);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 1.5px solid var(--clr-rrf-age-border);
  box-shadow: none;
}

.rrf-age-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rrf-age-checkbox {
  cursor: pointer;
  accent-color: var(--clr-orange);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.rrf-age-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-orange-dark);
  cursor: pointer;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rrf-age-input-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rrf-age-input-label {
  font-size: 13px;
  color: var(--clr-text-mid);
  margin: 0;
  white-space: nowrap;
}

.rrf-age-input {
  height: 36px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 14px !important;
  border: 1.5px solid rgba(255, 108, 44, 0.22) !important;
  background: var(--clr-white) !important;
}

.rrf-age-input:focus {
  border-color: var(--clr-orange) !important;
  box-shadow: 0 0 0 3px rgba(255, 108, 44, 0.1) !important;
  outline: none !important;
}

/* ── Dates row ── */
.rrf-dates-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Date card ── */
.rrf-date-card {
  flex: 1;
  min-width: 0;
}

.rrf-date-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ════════════════════════════════════
   Ride request form — floats below hero
   ════════════════════════════════════ */

.ride-request {
  box-shadow: 0 0 21px rgba(0, 0, 0, 0.07);
  position: relative;
  z-index: 1;
  background: #fff;
  /* hero is 70vh (min 460px, max 740px) — track it with clamp so
     overlap stays consistent at every browser zoom level          */
  margin-top: clamp(-595px, calc(-70vh + 145px), -315px);
  border-radius: 20px;
  margin-bottom: 50px;
  padding: 0; /* rrf-header & rrf-body carry their own padding */
}

/* ══════════════════════════════════════════════
   DATE BOX — kept exactly as before (do not edit)
   ══════════════════════════════════════════════ */

.rrf-date-box {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--clr-white);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  margin: 0;
  transition:
    box-shadow 0.2s,
    border-color 0.2s,
    transform 0.18s;
}

.rrf-date-box--pickup {
  border: 1.5px solid rgba(37, 99, 156, 0.18);
  box-shadow: 0 2px 8px rgba(37, 99, 156, 0.07);
}

.rrf-date-box--dropoff {
  border: 1.5px solid rgba(255, 108, 44, 0.18);
  box-shadow: 0 2px 8px rgba(255, 108, 44, 0.07);
}

.rrf-date-box--pickup:hover {
  border-color: rgba(37, 99, 156, 0.38);
  box-shadow: 0 6px 18px rgba(37, 99, 156, 0.14);
  transform: translateY(-1px);
}

.rrf-date-box--dropoff:hover {
  border-color: rgba(255, 108, 44, 0.38);
  box-shadow: 0 6px 18px rgba(255, 108, 44, 0.14);
  transform: translateY(-1px);
}

.rrf-date-badge {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rrf-date-badge--pickup {
  background: var(--grad-blue);
  box-shadow: 0 3px 10px rgba(37, 99, 156, 0.25);
}

.rrf-date-badge--dropoff {
  background: var(--grad-orange);
  box-shadow: 0 3px 10px rgba(255, 108, 44, 0.25);
}

.rrf-date-badge-day {
  color: var(--clr-white);
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
}

.rrf-date-badge-month {
  color: rgba(255, 255, 255, 0.8);
  font-size: 9px;
  font-weight: 500;
}

.rrf-date-text {
  min-width: 0;
}

.rrf-date-dow {
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-kim-label);
  white-space: nowrap;
}

.rrf-date-time {
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

.rrf-date-time--pickup {
  color: var(--clr-blue);
}

.rrf-date-time--dropoff {
  color: var(--clr-orange);
}

/* ══════════════════════════════════════════════
   END DATE BOX
   ══════════════════════════════════════════════ */

/* ── Exchange icon ── */
.rrf-exchange {
  padding-bottom: 14px;
  color: var(--clr-rrf-exchange);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ── Action row ── */
.rrf-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.rrf-search-btn {
  flex: 1;
  background: var(--grad-orange);
  border: none;
  border-radius: 14px;
  padding: 0;
  height: 52px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.4px;
  color: var(--clr-white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 6px 22px rgba(255, 108, 44, 0.38);
  white-space: nowrap;
  transition:
    transform var(--trans-fast),
    box-shadow var(--trans-fast);
}

.rrf-search-btn:hover,
.rrf-search-btn:focus {
  color: var(--clr-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 108, 44, 0.52);
  background: var(--grad-orange);
}

.rrf-clear-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 52px;
  padding: 0 20px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  background: var(--clr-white);
  font-size: 14px;
  font-weight: 600;
  color: var(--clr-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    border-color 0.18s,
    color 0.18s,
    background 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}

.rrf-clear-btn:hover {
  border-color: rgba(255, 108, 44, 0.45);
  color: var(--clr-orange);
  background: rgba(255, 108, 44, 0.05);
  box-shadow: 0 3px 10px rgba(255, 108, 44, 0.12);
  transform: translateY(-1px);
}

.rrf-clear-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ── Map pin button ── */
.rrf-map-pin-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition:
    color var(--trans-fast),
    transform var(--trans-fast);
}

.rrf-map-pin-btn:hover {
  transform: scale(1.2);
}

.rrf-location-icon--pickup.rrf-map-pin-btn:hover {
  color: var(--clr-blue-dark);
}

.rrf-location-icon--dropoff.rrf-map-pin-btn:hover {
  color: var(--clr-orange-dark);
}

/* ── Responsive ── */
@media (max-width: 1199px) {
  .rrf-dates-row {
    flex-wrap: wrap;
  }

  .rrf-date-card {
    min-width: 160px;
  }

  .rrf-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .rrf-search-btn {
    flex: none;
    width: 100%;
    height: 52px;
    justify-content: center;
  }

  .rrf-clear-btn {
    flex: none;
    width: 100%;
    justify-content: center;
    height: 46px;
  }
}

@media (max-width: 767px) {
  .rrf-header {
    padding: 14px 18px;
  }

  .rrf-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .rrf-header-title {
    font-size: 15px;
  }

  .rrf-body {
    padding: 14px 16px 24px;
  }

  /* Keep date cards side-by-side on mobile */
  .rrf-dates-row {
    flex-wrap: nowrap;
    gap: 6px;
    align-items: flex-end;
  }

  .rrf-date-card {
    min-width: 0;
    flex: 1;
  }

  .rrf-date-card-label {
    font-size: 9px;
    margin-bottom: 5px;
    letter-spacing: 0.3px;
  }

  /* Compact date box */
  .rrf-date-box {
    padding: 9px 10px;
    gap: 8px;
  }

  /* Smaller date badge */
  .rrf-date-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .rrf-date-badge-day {
    font-size: 14px;
  }

  .rrf-date-badge-month {
    font-size: 8px;
  }

  .rrf-date-dow {
    font-size: 11px;
  }

  .rrf-date-time {
    font-size: 12px;
  }

  /* Hide the exchange icon on mobile to save space */
  .rrf-exchange {
    display: none;
  }

  .rrf-action-row {
    margin-top: 12px;
  }

  .rrf-search-btn {
    flex: none;
    height: 46px;
    font-size: 14px;
    border-radius: 12px;
  }

  .rrf-clear-btn {
    height: 42px;
    border-radius: 12px;
    font-size: 13px;
  }
}

/* ============================================================
   Map Picker Modal — mpm-* styles
   ============================================================ */

.mpm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(2px);
}

.mpm-card {
  background: var(--clr-white);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
}

/* ── Modal header ── */
.mpm-header {
  background: linear-gradient(
    120deg,
    var(--clr-blue-dark) 0%,
    var(--clr-blue) 55%,
    var(--clr-blue-mid) 100%
  );
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mpm-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mpm-header-text {
  flex: 1;
  min-width: 0;
}

.mpm-title {
  color: var(--clr-white);
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.mpm-subtitle {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-size: 12px;
}

.mpm-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-white);
  cursor: pointer;
  transition: background var(--trans-fast);
  flex-shrink: 0;
}

.mpm-close-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ── Map area ── */
.mpm-map {
  flex: 1;
  min-height: 360px;
  background: var(--clr-blue-light);
}

/* ── Footer ── */
.mpm-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--clr-blue-light);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mpm-address {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--clr-kim-label);
}

.mpm-address-pin {
  color: var(--clr-blue);
  flex-shrink: 0;
}

.mpm-address-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mpm-address-loading {
  color: var(--clr-text-muted);
  font-style: italic;
  font-size: 13px;
}

.mpm-address-empty {
  color: var(--clr-text-faint);
  font-size: 13px;
}

.mpm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mpm-cancel-btn {
  background: var(--clr-fsb-footer-clear-bg);
  border: 1px solid var(--clr-fsb-footer-clear-border);
  border-radius: 10px;
  padding: 0 18px;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
  color: var(--clr-text-mid);
  cursor: pointer;
  transition: background var(--trans-fast);
}

.mpm-cancel-btn:hover {
  background: var(--clr-fsb-footer-clear-hover);
}

.mpm-confirm-btn {
  background: var(--grad-orange);
  border: none;
  border-radius: 10px;
  padding: 0 20px;
  height: 40px;
  font-size: 14px;
  font-weight: 700;
  color: var(--clr-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 3px 10px rgba(255, 108, 44, 0.3);
  transition:
    transform var(--trans-fast),
    box-shadow var(--trans-fast);
}

.mpm-confirm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(255, 108, 44, 0.45);
}

.mpm-confirm-btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Responsive modal ── */
@media (max-width: 767px) {
  .mpm-card {
    max-height: 95vh;
    border-radius: 14px;
  }

  .mpm-map {
    min-height: 280px;
  }

  .mpm-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .mpm-actions {
    justify-content: stretch;
  }

  .mpm-cancel-btn,
  .mpm-confirm-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ============================================================
   .ride-request container — responsive overrides
   (consolidated from responsive.css)
   ============================================================ */

/* ── 992px – 1199px ── */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .ride-request {
    margin-top: -180px;
    border-radius: 20px;
    margin-bottom: 0;
    padding: 42px 35px 17px;
    box-shadow: 0 0 21px rgba(0, 0, 0, 0.07);
  }

  .serach-ride-request.ride-request {
    margin-top: -140px;
    margin-bottom: 50px;
  }
}

/* ── 768px – 991px ── */
@media (min-width: 768px) and (max-width: 991.98px) {
  .ride-request {
    margin-top: -180px;
    border-radius: 20px;
    margin-bottom: 0;
    padding: 52px 20px 28px;
  }

  .serach-ride-request.ride-request {
    margin-bottom: 40px;
  }
}

/* ── ≤ 767px ── */
@media (max-width: 767.98px) {
  .ride-request {
    margin-top: 50px;
    border-radius: 20px;
    margin-bottom: 0;
    padding: 52px 20px 28px;
  }

  .serach-ride-request.ride-request {
    margin-top: 30px;
  }
}

/* ── ≤ 575px ── */
@media (max-width: 575.98px) {
  .ride-request {
    padding: 37px 16px 28px;
  }
}
