/**
 * Pleacă la drum — premium route planner layout
 */
body.page-route-planner .pub-screen {
  max-width: min(100% - 32px, 1180px);
  padding: 20px 16px 72px;
}

.route-planner {
  display: grid;
  gap: 20px;
}

@media (min-width: 960px) {
  .route-planner {
    grid-template-columns: minmax(300px, 380px) 1fr;
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 24px;
  }

  .route-planner__header {
    grid-column: 1 / -1;
  }

  .route-planner__form-card {
    grid-column: 1;
    grid-row: 2;
  }

  .route-planner__map-col {
    grid-column: 2;
    grid-row: 2;
    min-height: 520px;
  }
}

.route-planner__header {
  margin-bottom: 4px;
}

.route-planner__header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--mp-ink, #1a1f26);
}

.route-planner__header p {
  margin: 0;
  color: var(--mp-muted, #6b7280);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 52ch;
}

.route-planner__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mp-accent, #0d7377);
  text-decoration: none;
}

.route-planner__back:hover {
  text-decoration: underline;
}

.route-planner__form-card,
.route-planner__results-card {
  background: #fff;
  border: 1px solid var(--mp-border, #e4e7eb);
  border-radius: var(--mp-radius-lg, 12px);
  box-shadow: var(--mp-shadow-md, 0 4px 16px rgba(26, 31, 38, 0.08));
  padding: 22px 20px;
}

.route-planner__form-card legend,
.route-planner__form-card label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mp-ink-soft, #3d4654);
}

.route-planner__form-card select,
.route-planner__form-card input[type='text'] {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 0 14px;
  border: 1px solid var(--mp-border-strong, #d0d5dc);
  border-radius: var(--mp-radius, 8px);
  font: inherit;
  font-size: 1rem;
  background: #fff;
}

.route-planner__row {
  display: grid;
  gap: 14px;
}

@media (min-width: 480px) {
  .route-planner__row {
    grid-template-columns: 1fr 1fr;
  }
}

.route-planner__fieldset {
  border: none;
  margin: 0 0 18px;
  padding: 0;
}

.route-planner__fieldset legend {
  display: block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mp-muted, #6b7280);
}

.route-planner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.route-planner__actions .btn {
  min-height: 48px;
  flex: 1 1 140px;
  font-weight: 700;
  border-radius: var(--mp-radius-lg, 12px);
}

.route-planner__map-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 360px;
}

.route-planner__map-slot {
  flex: 1;
  min-height: 320px;
  border-radius: var(--mp-radius-lg, 12px);
  overflow: hidden;
  border: 1px solid var(--mp-border, #e4e7eb);
  box-shadow: var(--mp-shadow-md);
  background: var(--mp-surface, #f7f8f9);
}

.route-planner__map-slot .vanzy-map-shell,
.route-planner__map-slot .vanzy-map-shell__frame {
  min-height: 100%;
  height: 100%;
}

@media (min-width: 960px) {
  .route-planner__map-slot {
    min-height: 480px;
  }

  .route-planner__map-slot .vanzy-map-shell__frame {
    min-height: 480px;
  }
}

.route-planner__map-placeholder {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 32px 24px;
  text-align: center;
  color: var(--mp-muted, #6b7280);
  font-size: 0.95rem;
  line-height: 1.5;
}

.route-planner__map-placeholder strong {
  display: block;
  margin-bottom: 6px;
  color: var(--mp-ink-soft, #3d4654);
  font-size: 1.05rem;
}

.route-planner__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 520px) {
  .route-planner__stats {
    grid-template-columns: 1fr;
  }
}

.route-planner__stat {
  padding: 16px 14px;
  background: #fff;
  border: 1px solid var(--mp-border, #e4e7eb);
  border-radius: var(--mp-radius-lg, 12px);
  text-align: center;
}

.route-planner__stat-value {
  display: block;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--mp-accent, #0d7377);
  line-height: 1.1;
}

.route-planner__stat-label {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mp-muted, #6b7280);
}

.route-planner__stat--cost .route-planner__stat-value {
  color: var(--mp-green, #16a34a);
}

.route-planner__route-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mp-ink, #1a1f26);
}

.route-planner__route-title span {
  color: var(--mp-muted, #6b7280);
  font-weight: 500;
}

.route-planner__status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--mp-radius, 8px);
  font-size: 0.92rem;
  font-weight: 600;
}

.route-planner__status[hidden] {
  display: none;
}

.route-planner__status--info {
  background: rgba(13, 115, 119, 0.08);
  color: var(--mp-accent-hover, #095456);
}

.route-planner__status--ok {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.route-planner__status--error {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}

.route-planner__muted {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--mp-muted, #6b7280);
}

.route-planner__nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-stops__list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.route-stops__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--mp-surface, #f7f8f9);
  border: 1px solid var(--mp-border, #e4e7eb);
  border-radius: var(--mp-radius, 8px);
}

.route-stops__badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mp-accent-soft, rgba(13, 115, 119, 0.12));
  color: var(--mp-accent, #0d7377);
  font-size: 0.78rem;
  font-weight: 800;
}

.route-stops__label {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-stops__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.route-stops__btn {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--mp-border, #e4e7eb);
  border-radius: 8px;
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
}

.route-stops__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.route-stops__btn--remove {
  color: #b91c1c;
  font-size: 1.2rem;
  line-height: 1;
}

.route-stops__empty {
  padding: 12px;
  font-size: 0.88rem;
  color: var(--mp-muted, #6b7280);
  background: var(--mp-surface, #f7f8f9);
  border-radius: var(--mp-radius, 8px);
  border: 1px dashed var(--mp-border, #e4e7eb);
}

.route-stops__add {
  display: grid;
  gap: 8px;
}

@media (min-width: 480px) {
  .route-stops__add {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

@media (max-width: 959px) {
  .route-planner__map-slot {
    min-height: 50vh;
  }

  .route-planner__map-slot .vanzy-map-shell__frame {
    min-height: 50vh;
  }
}
