/* ============================================================
   SUGAM — route-planner.css
   From / To destination planner panel (overlays the map)
   ============================================================ */

.route-planner {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 900;
  width: 340px;
  max-width: calc(100% - 28px);
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.16);
  border: 0.5px solid var(--border);
  padding: 16px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.route-planner.collapsed {
  transform: translateY(-140%);
  opacity: 0;
  pointer-events: none;
}

.rp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.rp-header i { color: var(--red); font-size: 18px; }

/* From / To fields */
.rp-field {
  position: relative;
  margin-bottom: 10px;
}
.rp-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.rp-field-label .dot { width: 8px; height: 8px; border-radius: 50%; }
.rp-field-label .dot.from { background: var(--blue); }
.rp-field-label .dot.to   { background: var(--red); }

.rp-input,
.rp-select {
  width: 100%;
  border: 0.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  background: var(--white);
  transition: border-color 0.15s;
}
.rp-input:focus,
.rp-select:focus { border-color: var(--red); }
.rp-select:disabled { background: var(--gray-light); color: var(--muted); }

.rp-to-fields { display: flex; flex-direction: column; gap: 8px; }

/* Suggestion dropdown (type-to-search) */
.rp-sugg-list {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  margin-top: 4px;
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  max-height: 220px;
  overflow-y: auto;
  display: none;
  z-index: 20;
}
.rp-sugg-list.visible { display: block; }
.rp-sugg-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.rp-sugg-item:hover { background: var(--gray-light); }
.rp-sugg-item i { font-size: 16px; color: var(--red); flex-shrink: 0; }
.rp-sugg-name { font-size: 13px; color: var(--text); font-weight: 500; }
.rp-sugg-meta { font-size: 11px; color: var(--muted); }
.rp-sugg-empty { padding: 12px; font-size: 13px; color: var(--muted); text-align: center; }

/* Swap button between From and To */
.rp-swap-row {
  display: flex;
  justify-content: center;
  margin: 2px 0;
}
.rp-swap-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 0.5px solid var(--border);
  background: var(--gray-light);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.rp-swap-btn:hover { background: var(--red-light); color: var(--red); }

/* "or" divider between dropdown and search */
.rp-or {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 2px 0;
}

/* Go button */
.rp-go-btn {
  width: 100%;
  margin-top: 12px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: opacity 0.15s;
}
.rp-go-btn:hover { opacity: 0.9; }
.rp-go-btn i { font-size: 18px; }

/* Collapsed re-open handle */
.rp-reopen {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 899;
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.14);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 7px;
}
.rp-reopen i { color: var(--red); font-size: 16px; }
.route-planner.collapsed ~ .rp-reopen { display: flex; }

/* Mobile: full-width top sheet */
@media (max-width: 600px) {
  .route-planner {
    top: 8px; left: 8px; right: 8px;
    width: auto;
    max-width: none;
  }
}
