/* Side panel sections: brand, arrival & stay, search, legend, price tables, site list, footer. */

/* brand */
.brand { display: flex; gap: 12px; align-items: center; }
.brand h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; text-wrap: balance; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

.city-switch { display: flex; gap: 6px; }
.city-switch .chip { flex: 1; padding: 6px 11px 4px; font-size: 14px; }
/* first-visit city choice */
.city-dialog {
  box-sizing: border-box; width: min(440px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto;
  padding: 20px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); color: var(--fg); box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.city-dialog::backdrop { background: rgba(10, 14, 19, .5); }
.city-dialog-head { display: flex; gap: 12px; align-items: flex-start; }
.city-dialog h2 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.2; text-wrap: balance; }
.city-dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.city-choices { display: grid; gap: 10px; margin-top: 18px; }
.city-choice {
  display: grid; gap: 3px; width: 100%; padding: 14px 16px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft);
  text-align: left; cursor: pointer;
}
.city-choice:hover { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.city-choice.is-last { border-color: var(--accent); }
.city-choice-name { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; font-size: 18px; font-weight: 800; }
.city-choice-last { padding: 2px 8px 1px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.city-choice-text { color: var(--muted); font-size: 13px; line-height: 1.4; }
.city-dialog-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; }

.city-notice { display: flex; gap: 6px; align-items: flex-start; padding: 8px 6px 8px 10px; border-radius: var(--radius); background: var(--soft); border: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.45; }
.city-notice p { flex: 1; min-width: 0; margin: 0; }
.city-notice-close {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin: -3px 0 0; padding: 2px 0 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.city-notice-close:hover { background: var(--panel); color: var(--fg); }

/* arrival time and stay length */
.arrival { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius); background: var(--soft); }
.arrival-text { font-size: 17px; font-weight: 700; }
.arrival-note { font-size: 12.5px; color: var(--muted); }
.arrival-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.arrival input[type="date"], .arrival select { min-width: 0; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 5px 8px 3px; font-size: 13px; }
.arrival input[type="date"] { flex: 1 1 130px; }
.arrival-time { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.arrival select { padding-inline: 6px; font-variant-numeric: tabular-nums; }
.stay { display: flex; flex-direction: column; gap: 6px; }
.stay .section-label { margin: 4px 0 0; }
/* six equal columns: the 12 stay lengths always fit in two rows */
.stay-durations { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.stay-durations .chip { min-width: 0; padding: 5px 0 3px; font-size: 12.5px; text-align: center; white-space: nowrap; }
.stay-span { font-size: 12.5px; color: var(--muted); }

/* search */
.search input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 9px 12px 7px; font-size: 14.5px; }
.search-results { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; }
.search-results button { display: flex; gap: 10px; align-items: center; justify-content: space-between; width: 100%; border: 0; border-radius: 8px; background: transparent; padding: 7px 8px 5px; text-align: left; cursor: pointer; }
.search-results button:hover, .search-results button:focus-visible { background: var(--soft); }
.search-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.search-meta { flex: none; color: var(--muted); font-size: 12px; }
.search-empty { padding: 4px 8px; color: var(--muted); font-size: 13px; }
.swatch-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 3px; }

/* legend */
.mode-switch { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.mode-switch .chip { padding: 3px 10px 1px; font-size: 12.5px; }
.legend { display: flex; flex-direction: column; gap: 2px; }
.legend-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 0; border-radius: 8px; background: transparent; padding: 6px 8px 4px; text-align: left; cursor: pointer; }
.legend-row:hover { background: var(--soft); }
.legend-row[aria-pressed="false"] { opacity: .45; }
.legend-row[aria-pressed="false"] .swatch { background: transparent !important; box-shadow: inset 0 0 0 2px var(--muted); }
.swatch { width: 14px; height: 14px; margin-top: -2px; border-radius: 4px; }
.swatch.is-blocked { background-image: linear-gradient(135deg, transparent 40%, #fff 40%, #fff 60%, transparent 60%); }
.legend-name { font-weight: 600; }
.legend-description { display: block; font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.3; }
.legend-count { text-align: right; font-size: 12.5px; color: var(--muted); }
.legend-count b { color: var(--fg); font-weight: 600; }

/* collapsible sections */
details.collapsible summary { display: flex; justify-content: space-between; align-items: baseline; list-style: none; cursor: pointer; }
details.collapsible summary::-webkit-details-marker { display: none; }
details.collapsible summary .section-label { margin: 0; }
.summary-meta { font-size: 12.5px; font-weight: 600; color: var(--accent); }

/* street parking zones */
.zone-table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 13px; }
.zone-table td { padding: 7px 8px 5px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.zone-table td:last-child { padding-right: 0; }
.zone-badge { display: inline-grid; place-items: center; box-sizing: border-box; width: 22px; height: 22px; padding-top: 2px; border-radius: 5px; background: var(--fg); color: var(--panel); font-weight: 800; font-size: 12px; }
.zone-price { font-weight: 800; font-size: 15px; white-space: nowrap; }
.zone-price small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.zone-hours { color: var(--muted); font-size: 12px; }
.zone-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

/* garages and operator lots */
.site-sort { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.site-sort .chip { padding: 3px 9px 1px; font-size: 12px; }
.site-list { display: flex; flex-direction: column; margin: 8px 0 0; padding: 0; list-style: none; }
.site-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 8px 4px 6px; text-align: left; cursor: pointer; }
.site-list button:hover { background: var(--soft); }
.site-name { font-weight: 700; }
.site-spaces { text-align: right; font-weight: 600; }
.site-price { grid-column: 1 / -1; font-size: 12.5px; font-weight: 600; }
.site-stay-price { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.site-stay-price i { display: inline-block; width: 10px; height: 10px; margin-top: -2px; border-radius: 3px; }
.site-address { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.site-bar { grid-column: 1 / -1; height: 3px; overflow: hidden; border-radius: 2px; background: var(--soft); }
.site-bar i { display: block; height: 100%; background: var(--status-garage); }

.footer { margin-top: auto; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.footer a { color: inherit; }
