/**
 * Site bustrips results — card layout and stop selection.
 */
.com-bookpro-bustrips {
  --bp-accent: #c41e3a;
  --bp-accent-soft: #fff1f2;
  --bp-border: #e5e7eb;
  --bp-muted: #6b7280;
  --bp-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --bp-radius: 16px;
}

.bp-results-toolbar {
  display: flex;
  justify-content: flex-end;
}

.bp-results__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
  flex-wrap: wrap;
}

.bp-results__route {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.bp-results__arrow {
  margin: 0 .45rem;
  color: var(--bp-accent);
}

.bp-results__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  align-items: center;
}

.bp-badge {
  display: inline-flex;
  align-items: center;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: var(--bp-accent-soft);
  color: var(--bp-accent);
  font-weight: 700;
  font-size: .85rem;
}

.bp-badge--muted {
  background: #f3f4f6;
  color: var(--bp-muted);
}

.bp-meta__date,
.bp-meta__pax {
  color: var(--bp-muted);
  font-size: .95rem;
}

.bp-trip-list {
  display: grid;
  gap: 1rem;
}

.bp-trip-list__empty {
  margin: 0;
}

.bp-trip-card {
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  background: #fff;
  box-shadow: var(--bp-shadow);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.bp-trip-card:hover {
  transform: translateY(-1px);
}

.bp-trip-card.is-selected {
  border-color: var(--bp-accent);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.12), var(--bp-shadow);
}

.bp-trip-card--soldout {
  opacity: .72;
}

.bp-trip-card__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
}

.bp-trip-card__choice {
  display: flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.bp-trip-card__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bp-trip-card__choice-visual {
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  transition: border-color .2s ease;
}

.bp-trip-card__radio:checked + .bp-trip-card__choice-visual {
  border-color: var(--bp-accent);
}

.bp-trip-card__radio:checked + .bp-trip-card__choice-visual::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--bp-accent);
}

.bp-trip-card__main {
  min-width: 0;
}

.bp-trip-card__title-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  align-items: center;
  margin-bottom: .5rem;
}

.bp-trip-card__time {
  font-weight: 600;
  color: #111827;
}

.trip-code-badge {
  display: inline-flex;
  align-items: center;
  padding: .25rem .65rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
  font-size: .8rem;
}

.bp-pill {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  padding: .55rem .9rem;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 700;
}

.bp-pill__title,
.bp-pill__unit {
  font-size: .85rem;
  font-weight: 500;
  opacity: .85;
}

.bp-trip-card__aside {
  text-align: right;
}

.stock-counter {
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
}

.stock-counter.stock-green { background: #dcfce7; color: #166534; }
.stock-counter.stock-orange { background: #ffedd5; color: #c2410c; }
.stock-counter.stock-red { background: #fee2e2; color: #b91c1c; }
.stock-counter.stock-grey { background: #f3f4f6; color: #6b7280; }

.bp-trip-card__stops {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px dashed var(--bp-border);
  background: #fafafa;
}

.bp-trip-card:not(.is-selected) .bp-trip-card__stops {
  opacity: .55;
}

.bp-trip-card__stops-title {
  margin: 0 0 .35rem;
  font-size: 1rem;
  font-weight: 700;
}

.bp-trip-card__stops-hint {
  margin: 0 0 1rem;
  color: var(--bp-muted);
  font-size: .92rem;
}

.com-bookpro-bustrips .bp-results__intro,
.com-bookpro-bustrips .bp-trip-card__stops-title,
.com-bookpro-bustrips .bp-trip-card__stops-hint {
  display: none;
}

.bp-station-fields__empty {
  margin: 0;
  padding: .75rem 1rem;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: .92rem;
}

.bookpro-stop-select {
  min-height: 46px;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  font-weight: 600;
}

.bp-trip-card.is-selected .bookpro-stop-select:not(:disabled) {
  border-color: var(--bp-accent);
  background: #fff;
}

.bookpro-stop-select:disabled {
  cursor: not-allowed;
  background: #f3f4f6;
}

.bp-note {
  margin-top: .65rem;
  padding: .75rem .9rem;
  border-left: 4px solid #2563eb;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: .92rem;
  line-height: 1.45;
}

.bp-note[hidden] {
  display: none !important;
}

.bp-actions {
  position: sticky;
  bottom: 1rem;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.bp-actions .btn-primary {
  min-width: 220px;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(196, 30, 58, 0.25);
}

.bp-search-panel__hint {
  margin: 0;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

@media (max-width: 767px) {
  .bp-trip-card__header {
    grid-template-columns: auto 1fr;
  }

  .bp-trip-card__aside {
    grid-column: 1 / -1;
    text-align: left;
  }

  .bp-results__header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .bp-actions .btn-primary {
    width: 100%;
  }
}
