/* Scoped CSS for European Public Transit Route Finder */
.eptr-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

.eptr-main {
  padding: 1.5rem 1rem 3rem;
}

.eptr-container {
  max-width: 980px;
  margin: 0 auto;
}

.eptr-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.eptr-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.eptr-desc {
  font-size: 1.05rem;
  color: #64748b;
  max-width: 660px;
  margin: 0 auto;
}

/* Chips */
.eptr-quick-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  background: #ffffff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.eptr-chips-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
}

.eptr-chip-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eptr-chip-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Card */
.eptr-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.eptr-form {
  margin-bottom: 1.5rem;
}

.eptr-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.eptr-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.eptr-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #334155;
}

.eptr-select {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  font-size: 0.95rem;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  cursor: pointer;
}

.eptr-select:focus {
  border-color: #0284c7;
}

.eptr-actions-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.eptr-btn {
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.eptr-btn-primary {
  background: #0284c7;
  color: #ffffff;
}

.eptr-btn-primary:hover {
  background: #0369a1;
}

.eptr-btn-outline {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.eptr-btn-outline:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* Results Panel */
.eptr-results-panel {
  border-top: 1px solid #e2e8f0;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.eptr-route-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.eptr-route-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.eptr-route-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0369a1;
  margin: 0;
}

.eptr-route-tag {
  font-size: 0.85rem;
  color: #0284c7;
  font-weight: 600;
}

.eptr-badge-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.eptr-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eptr-badge-fast {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #7dd3fc;
}

.eptr-badge-direct {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

/* Metrics Grid */
.eptr-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
}

.eptr-metric-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.eptr-metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eptr-metric-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.eptr-metric-sub {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 600;
}

/* Itineraries */
.eptr-itineraries-wrap {
  margin-top: 0.5rem;
}

.eptr-itineraries-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.75rem;
}

.eptr-itinerary-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.eptr-itin-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.eptr-itin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.eptr-itin-times {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.eptr-time-big {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.eptr-arrow {
  color: #94a3b8;
  font-weight: 700;
}

.eptr-dur-pill {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.eptr-operator-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.eptr-itin-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 2px solid #cbd5e1;
  margin-left: 0.5rem;
  padding-left: 0.85rem;
}

.eptr-itin-leg {
  position: relative;
  font-size: 0.85rem;
}

.eptr-leg-dot {
  position: absolute;
  left: -1.2rem;
  top: 0.25rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0284c7;
}

.eptr-leg-dot-end {
  background: #10b981;
}

.eptr-leg-info {
  display: flex;
  flex-direction: column;
}

.eptr-leg-info strong {
  color: #0f172a;
}

.eptr-leg-info span {
  color: #64748b;
  font-size: 0.78rem;
}

/* Hub Matrix */
.eptr-hub-matrix {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.eptr-section-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1rem;
}

.eptr-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.eptr-hub-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.eptr-hub-name {
  font-size: 1rem;
  font-weight: 700;
  color: #0284c7;
  margin: 0 0 0.35rem;
}

.eptr-hub-desc {
  font-size: 0.85rem;
  color: #475569;
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.eptr-hub-specs {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: #64748b;
}

.eptr-hub-specs li {
  margin-bottom: 0.25rem;
}

/* Ad slots */
.eptr-ad-slot {
  margin: 1.75rem 0;
  min-height: 280px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
