/* trip.css -- the trip search overlay ("Where are you headed?") + the
 * building-progress panel. Consumes base.css tokens; sheet idiom matches
 * detail/rating so overlays feel like one family. */

.tp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.45);
}

.tp-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 86%;
  overflow-y: auto;
  background: var(--surface, #ffffff);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: var(--shadow-2, 0 8px 30px rgba(20, 24, 29, 0.18));
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.tp-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--text-dim, #5b6470);
  background: var(--surface-2, #f0f2f5);
}

.tp-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding-right: 40px;
}

.tp-sub {
  margin-top: 4px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-dim, #5b6470);
}

.tp-field { margin-bottom: 12px; }

.tp-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint, #8a93a0);
  margin-bottom: 6px;
}
.tp-label-note {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.tp-input {
  width: 100%;
  min-height: var(--tap, 48px);
  padding: 0 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--text, #15181d);
  background: var(--surface-2, #f0f2f5);
  border: 1px solid var(--border, #e2e6ec);
  border-radius: var(--radius-sm, 10px);
}
.tp-input:focus {
  outline: 2px solid var(--brand, #2f6df0);
  outline-offset: 1px;
}

/* Fixed "From" row (Your location / chosen start). */
.tp-fixed {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap, 48px);
  padding: 0 14px;
  border-radius: var(--radius-sm, 10px);
  background: var(--surface-2, #f0f2f5);
  border: 1px dashed var(--border-strong, #cdd3dc);
  color: var(--text-dim, #5b6470);
  font-weight: 600;
}
.tp-fixed .ti { color: var(--brand, #2f6df0); }
.tp-fixed--chosen { border-style: solid; color: var(--text, #15181d); }
.tp-fixed-label {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tp-clear {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-dim, #5b6470);
  background: var(--surface, #ffffff);
}

.tp-results {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  border: 1px solid var(--border, #e2e6ec);
  border-radius: var(--radius-sm, 10px);
  overflow: hidden;
}
.tp-result {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap, 48px);
  padding: 8px 12px;
  cursor: pointer;
  background: var(--surface, #ffffff);
}
.tp-result + .tp-result { border-top: 1px solid var(--border, #e2e6ec); }
.tp-result:hover, .tp-result:focus-visible { background: var(--surface-2, #f0f2f5); }
.tp-result-ico { flex: none; color: var(--brand, #2f6df0); }
.tp-result-label {
  font-size: 0.9rem;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tp-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-dim, #5b6470);
}

.tp-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 10px);
  font-size: 0.85rem;
  color: var(--ps-tier-poor, #dc2626);
  background: var(--ps-tier-poor-bg, rgba(220, 38, 38, 0.12));
}

/* Building-progress panel */
.tp-sheet--busy { min-height: 200px; }
.tp-busy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 26px 18px;
}
.tp-busy-title { font-size: 1.05rem; font-weight: 800; }
.tp-busy-sub {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-dim, #5b6470);
  max-width: 34ch;
}
.tp-cancel-build {
  margin-top: 4px;
  min-height: var(--tap, 48px);
  padding: 0 22px;
  border-radius: var(--radius-pill, 999px);
  font-weight: 700;
  color: var(--text-dim, #5b6470);
  background: var(--surface-2, #f0f2f5);
}
