/* =========================
   LAYOUT GENERALE
========================= */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.detail-box {
  margin-bottom: 32px;
}

.detail-box h2 {
  margin: 0 0 12px 0;
  font-size: 20px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
}

/* =========================
   HERO STAZIONE
========================= */
.station-hero {
  margin-bottom: 32px;
}

.station-hero h1 {
  margin: 0;
  font-size: 28px;
}

.station-hero p {
  margin: 4px 0 12px;
  color: #555;
}

.station-hero .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.station-hero .actions a {
  padding: 6px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 14px;
}

/* =========================
   PREZZI
========================= */
.prices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.prices-table th,
.prices-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.prices-table th {
  font-weight: 600;
  background: #f8fafc;
}

.prices-table td small {
  display: block;
  font-size: 12px;
  color: #6b7280;
}

/* =========================
   GRAFICO
========================= */
canvas {
  max-width: 100%;
}

/* =========================
   SERVIZI
========================= */
.services-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.services-list li {
  background: #f1f5f9;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
}

/* =========================
   DISTRIBUTORI VICINI
========================= */
.nearby-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nearby-item {
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.nearby-item strong {
  font-size: 15px;
}

.nearby-meta {
  font-size: 13px;
  color: #555;
  margin-top: 4px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .station-hero h1 {
    font-size: 22px;
  }

  .detail-box h2 {
    font-size: 18px;
  }

  .prices-table {
    font-size: 13px;
  }

  #map {
    height: 220px;
  }
}

/* ========================= 
   RATING SYSTEM SVG
========================= */
.rating-box {
  display: inline-block;
}

.rating-vote {
  display: flex;
  gap: 4px;
}

.rating-vote button {
  font-size: 34px;
  color: #ccc;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.rating-vote button.active {
  color: #f5b301;
}

.rating-box.voted button {
  cursor: default;
}
.rating-summary.rating-empty {
  color: #666;
  font-style: italic;
}

/* =========================
   PAGINE ELENCO PROVINCE / REGIONI
========================= */
.list-page .page-header {
  margin-bottom: 2rem;
}
.list-page .page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.5rem 0;
}
.list-page .intro {
  font-size: 1rem;
  color: #4b5563;
  margin: 0;
}
.list-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.list-grid li {
  margin: 0;
}
.list-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  min-height: 80px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.list-card:hover {
  border-color: #0d6efd;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.12);
}
.list-card-name {
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
}
.list-card-count {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* =========================
   ELENCHI REGIONI / PROVINCE (cartelle /regioni, /province)
========================= */
.geo-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.geo-list li {
  margin: 0;
}
.geo-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  color: #111827;
  font-weight: 500;
}
.geo-list a:hover {
  border-color: #0d6efd;
  box-shadow: 0 1px 6px rgba(13, 110, 253, 0.15);
}
.geo-list .count {
  font-size: 0.85rem;
  color: #6b7280;
}
@media (max-width: 640px) {
  .geo-list a {
    padding: 1rem;
    font-size: 0.98rem;
  }
}

/* =========================
   AUTH (login / registrati)
========================= */
.auth-page { max-width: 420px; margin: 2rem auto; }
.auth-page h1 { font-size: 1.5rem; margin-bottom: 1rem; }
.auth-form label { display: block; margin-bottom: 0.75rem; }
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  display: block; width: 100%; padding: 0.5rem; margin-top: 0.25rem;
  border: 1px solid #e5e7eb; border-radius: 6px; box-sizing: border-box;
}
.auth-form button { padding: 0.5rem 1rem; margin-top: 0.5rem; cursor: pointer; background: #0d6efd; color: #fff; border: none; border-radius: 6px; }
.auth-form fieldset { margin: 1rem 0; padding: 0.75rem; border: 1px solid #e5e7eb; }
.auth-form fieldset legend { font-weight: 600; }
.auth-error { color: #b91c1c; margin-bottom: 1rem; }
.auth-success { color: #15803d; margin-bottom: 1rem; }
.auth-links { margin-top: 1rem; font-size: 0.95rem; }
.auth-links a { color: #0d6efd; }
.auth-divider { margin: 1rem 0 0.5rem; font-size: 0.9rem; color: #6b7280; }
.auth-google { margin: 0.5rem 0; }
.btn-google {
  display: inline-block; padding: 0.5rem 1rem; border-radius: 6px;
  background: #fff; color: #333; border: 1px solid #dadce0; text-decoration: none;
  font-size: 0.95rem;
}
.btn-google:hover { background: #f8f9fa; border-color: #1a73e8; color: #1a73e8; }

/* =========================
   PREFERITI (scheda + area utente)
========================= */
.favorite-actions { margin: 0.5rem 0 1rem; }
.btn-favorite {
  padding: 0.4rem 0.8rem; border-radius: 6px; border: 1px solid #0d6efd;
  background: #fff; color: #0d6efd; cursor: pointer; font-size: 0.95rem;
}
.btn-favorite.is-favorite { background: #0d6efd; color: #fff; }
.favorite-login { font-size: 0.9rem; color: #4b5563; margin: 0.5rem 0; }
.favorite-login a { color: #0d6efd; }
.favorites-section h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.favorites-list { list-style: none; padding: 0; margin: 0; }
.favorite-item { padding: 0.75rem 0; border-bottom: 1px solid #e5e7eb; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.favorite-item a { font-weight: 600; flex: 1 1 auto; }
.favorite-meta { font-size: 0.875rem; color: #6b7280; width: 100%; }
.btn-remove-favorite { padding: 0.25rem 0.5rem; font-size: 0.85rem; cursor: pointer; color: #b91c1c; background: #fff; border: 1px solid #e5e7eb; border-radius: 4px; }
.btn-remove-favorite:hover { background: #fef2f2; }
.favorite-alert-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: #4b5563;
}
.favorite-alert-toggle input[type="checkbox"] {
  margin: 0;
}