.mode-pill {
    display: inline-block;
    font-size: 11px;
    padding: 3px 7px;
    background: #e9f3f4;
    border-radius: 5px;
    color: #14677a;
    text-transform: capitalize;
}

/* Keep square brand artwork inside the marker, including Leaflet's image rules. */
.reference-page .leaflet-container .marker-logo--logo {
    border-radius: 8px;
}
.reference-page .leaflet-container .marker-logo--logo .marker-logo__inner {
    width: 32px;
    height: 32px;
}
.reference-page .leaflet-container .leaflet-marker-pane .marker-logo--logo img {
    width: 100% !important;
    height: 100% !important;
    max-width: 32px !important;
    max-height: 32px !important;
    object-fit: contain;
}
.directory-fuels .local-price-line {
    display: flex;
    gap: 7px;
    align-items: baseline;
    flex-wrap: wrap;
    margin: 7px 0;
}
.directory-fuels strong {
    margin-left: auto;
}
#placeResults {
    max-height: 220px;
    overflow: auto;
}
.market-table {
    overflow: auto;
}
.station-popup-prices dt {
    font-size: 11px;
}
.station-popup-prices dd {
    white-space: nowrap;
}
.history-controls {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.history-controls .field {
    flex: 1;
    min-width: 160px;
}
.directory-wrap {
    min-height: 45vh;
}
#map {
    min-height: 500px;
}
#municipality-map {
    height: 420px;
}
#station-mini-map {
    height: 280px;
}
.geo-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin: 16px 0;
}
.place-results button {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: left;
    background: white;
    border: 0;
    border-bottom: 1px solid #dde5e7;
    color: #174a57;
    cursor: pointer;
}
#saved-results:empty:after {
    content: "Caricamento…";
}
.market-page .history-chart {
    width: 100%;
    height: auto;
}
.source-card a {
    color: var(--accent-dark);
}
.station-services-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.station-services-list li { padding: 8px 12px; border: 1px solid #dce6ed; border-radius: 10px; background: #f5f9fb; }
.station-hours-list { max-width: 640px; }
.station-hours-list > div { display: grid; grid-template-columns: minmax(95px, 1fr) 2fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid #e5ebef; }
.station-hours-list dt { font-weight: 600; }
.station-hours-list dd { margin: 0; }

/* Nearby search shares the price-list layout; mobile rows become readable cards. */
.nearby-page .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nearby-filters summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
.nearby-page .meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.nearby-brand { display: flex; align-items: center; gap: 10px; }
.nearby-brand img { object-fit: contain; flex-shrink: 0; }
.nearby-offer { display: grid; gap: 3px; margin-bottom: 8px; }
.nearby-offer span { font-size: 12px; color: #516477; }
.nearby-offer strong { white-space: nowrap; }
#nearby-more { margin-top: 16px; }
#nearby-more[hidden] { display: none; }
@media (max-width: 700px) {
    .nearby-page .filters { grid-template-columns: 1fr; }
    .nearby-page .table-wrap { overflow: visible; background: transparent; border: 0; box-shadow: none; }
    .nearby-table, .nearby-table tbody { display: block; width: 100%; min-width: 0; }
    .nearby-table thead { display: none; }
    .nearby-table tr { display: block; background: #fff; border: 1px solid #dde5e7; border-radius: 16px; padding: 12px; margin-bottom: 14px; }
    .nearby-table td { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; white-space: normal; padding: 10px 4px; overflow-wrap: anywhere; }
    .nearby-table td::before { content: attr(data-label); font-size: 12px; color: #516477; font-weight: 600; }
    .nearby-table td[colspan] { display: block; }
    .nearby-table td[colspan]::before { display: none; }
    .nearby-table td:first-child > .nearby-offer { grid-column: 2; }
    .nearby-table td:first-child > .nearby-offer:first-of-type { grid-row: 1; }
}
