.sf-route-modal {
  display: none;
  z-index: 1090;
}

.sf-route-modal.show {
  display: block;
  position: fixed;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem;
}

.sf-route-modal.show .modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 52rem);
  margin: 1.5rem auto;
}

.sf-route-modal__dialog {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
}

.sf-route-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem 0;
}

.sf-route-modal .modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.sf-route-modal .modal-body {
  padding: 0.75rem 1.25rem 1.25rem;
}

.sf-route-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
}

.sf-route-modal__close:hover,
.sf-route-modal__close:focus-visible {
  background: #e2e8f0;
  outline: none;
}

.sf-route-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1085;
  background: rgba(15, 23, 42, 0.55);
}

body.sf-route-modal-open {
  overflow: hidden;
}

.sf-route-modal__form {
  display: grid;
  gap: 0.75rem;
}

.sf-route-modal__label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0;
  color: #0f172a;
}

.sf-route-modal__origin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sf-route-modal__input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font: inherit;
  color: #0f172a;
  background: #fff;
}

.sf-route-modal__input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  border-color: #2563eb;
}

.sf-route-modal__loc-btn,
.sf-route-modal__show-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.5rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.sf-route-modal__loc-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  white-space: nowrap;
}

.sf-route-modal__loc-btn:hover,
.sf-route-modal__loc-btn:focus-visible {
  background: #f8fafc;
  outline: none;
}

.sf-route-modal__loc-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.sf-route-modal__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sf-route-modal__mode {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.sf-route-modal__mode.is-active {
  border-color: #1e3a8a;
  background: #eff6ff;
  color: #1e3a8a;
}

.sf-route-modal__mode:hover,
.sf-route-modal__mode:focus-visible {
  outline: none;
  border-color: #2563eb;
}

.sf-route-modal__show-btn {
  align-self: flex-start;
  border: 0;
  background: #1e3a8a;
  color: #fff;
}

.sf-route-modal__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 600;
}

.sf-route-modal__summary.is-hidden {
  display: none;
}

.sf-route-modal__show-btn:hover,
.sf-route-modal__show-btn:focus-visible {
  background: #1d4ed8;
  outline: none;
}

.sf-route-modal__dest {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

.sf-route-modal__dest-label {
  margin-right: 0.25rem;
}

.sf-route-modal__feedback {
  margin: 0;
  color: #dc2626;
  font-size: 0.85rem;
}

.sf-route-modal__feedback.is-hidden {
  display: none;
}

.sf-route-modal__map-wrap {
  margin-top: 1rem;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
}

.sf-route-modal__map-wrap[hidden] {
  display: none !important;
}

.sf-route-modal__map-canvas {
  width: 100%;
  min-height: 360px;
}

.lux-mkt-map__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}

.lux-mkt-map__route-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.lux-mkt-map__route-btn:hover,
.lux-mkt-map__route-btn:focus-visible {
  color: #2563eb;
  outline: none;
}
