/**
 * Stop Detail CSS - Estilos do painel de pr\u00f3ximas chegadas
 */

/* ========================================
   NextArrivals Panel
   ======================================== */

.next-arrivals {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 40vh;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.next-arrivals.visible {
  transform: translateY(0);
}

.next-arrivals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 24px 24px 0 0;
}

.next-arrivals-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.next-arrivals-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.next-arrivals-title-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.next-arrivals-title-text h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.2;
}

.arrivals-stop-code {
  font-size: 12px;
  color: #666;
  margin: 0;
  line-height: 1;
}

.next-arrivals-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background-color: #f5f7fa;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.next-arrivals-close:hover {
  background-color: #e8ecf0;
  color: #0072c6;
  transform: rotate(90deg);
}

/* ========================================
   ⭐ Barra de filtros por linha
   ======================================== */

.arrivals-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.filter-label {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.arrivals-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip {
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.filter-chip:hover {
  opacity: 0.8;
}

.filter-chip.active {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* ========================================
   Conte\u00fado + lista de chegadas
   ======================================== */

.next-arrivals-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.95);
}

.arrivals-list-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.loading-message,
.no-arrivals {
  text-align: center;
  padding: 12px;
  color: #666;
  line-height: 1.4;
  font-size: 14px;
}

.no-arrivals a {
  color: #0072c6;
  text-decoration: none;
  font-weight: 500;
}

.no-arrivals a:hover { text-decoration: underline; }

.arrival-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.arrival-item:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.arrival-line {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  min-width: 56px;
  text-align: center;
  margin-right: 16px;
  font-size: 16px;
  flex-shrink: 0;
}

.arrival-info {
  flex: 1;
  min-width: 0;
}

.arrival-destination {
  font-weight: 600;
  font-size: 15px;
  color: #1a1a1a;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrival-status {
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.status-ontime { background-color: #d4edda; color: #155724; }
.status-delayed { background-color: #f8d7da; color: #721c24; }

.arrival-time-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.arrival-location-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.arrival-time {
  font-weight: 700;
  font-size: 18px;
  min-width: 70px;
  text-align: right;
  flex-shrink: 0;
}

.arrival-time-realtime  { color: #22C55E; }
.arrival-time-scheduled { color: #3B82F6; }

/* ========================================
   Footer
   ======================================== */

.next-arrivals-footer {
  padding: 12px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.next-arrivals-footer p {
  font-size: 13px;
  color: #666;
  margin: 0;
  flex: 1;
}

.next-arrivals-footer strong { color: #1a1a1a; font-weight: 600; }

.next-arrivals-refresh {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background-color: #0072c6;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.next-arrivals-refresh:hover { background-color: #005a9e; transform: scale(1.05); }
.next-arrivals-refresh:active { transform: scale(0.95); }
.next-arrivals-refresh.refreshing { animation: spin 1s linear; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Scrollbar */
.next-arrivals-content::-webkit-scrollbar { width: 8px; }
.next-arrivals-content::-webkit-scrollbar-track { background: rgba(0,0,0,.05); border-radius: 4px; }
.next-arrivals-content::-webkit-scrollbar-thumb { background: rgba(0,114,198,.3); border-radius: 4px; }
.next-arrivals-content::-webkit-scrollbar-thumb:hover { background: rgba(0,114,198,.5); }

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  .next-arrivals-header { padding: 12px 16px; }
  .next-arrivals-icon { width: 28px; height: 28px; }
  .next-arrivals-title-text h2 { font-size: 16px; }
  .arrivals-stop-code { font-size: 11px; }
  .arrival-item { padding: 10px 12px; }
  .arrival-line { min-width: 48px; padding: 6px 10px; font-size: 14px; margin-right: 12px; }
  .arrival-destination { font-size: 14px; }
  .arrival-time { font-size: 16px; min-width: 60px; }
  .next-arrivals-footer { padding: 10px 16px; }
  .next-arrivals-refresh { width: 32px; height: 32px; }
  .next-arrivals-refresh svg { width: 16px; height: 16px; }
  .arrivals-filter-bar { padding: 6px 16px; }
  .filter-chip { font-size: 11px; padding: 3px 10px; }
}

@media (max-width: 480px) {
  .next-arrivals { max-height: 45dvh; }
  .next-arrivals-header { padding: 6px 12px; }
  .next-arrivals-title { gap: 8px; }
  .next-arrivals-icon { width: 30px; height: 30px; }
  .next-arrivals-title-text h2 { font-size: 15px; }
  .arrivals-stop-code { font-size: 10px; }
  .next-arrivals-close { width: 32px; height: 32px; }
  .next-arrivals-close svg { width: 20px; height: 20px; }
  .next-arrivals-content { padding: 0 8px; }
  .arrival-item { padding: 8px 10px; }
  .arrival-line { min-width: 44px; padding: 4px 8px; font-size: 13px; margin-right: 10px; }
  .arrival-destination { font-size: 13px; }
  .arrival-status { font-size: 12px; }
  .arrival-location-icon { width: 30px; height: 30px; }
  .arrival-time { font-size: 15px; min-width: 55px; }
  .next-arrivals-footer { padding: 6px 12px; }
  .next-arrivals-footer p { font-size: 12px; }
  .next-arrivals-refresh { width: 30px; height: 30px; }
  .next-arrivals-refresh svg { width: 14px; height: 14px; }
  .arrivals-filter-bar { padding: 6px 12px; }
  .filter-chip { font-size: 11px; padding: 3px 8px; }
}
