/**
 * PlaidCars — the one charger map (EVC-P2, 2026-09-28): pins, clusters, filters, drawer,
 * list. Brand tokens only (brand-tokens.css + uae-system.css): Tesla red, every other
 * network charcoal, green nowhere (green is deal-only). The map box has a fixed height,
 * so nothing moves when Leaflet mounts (no CLS). Mobile first; the drawer becomes a
 * bottom sheet under 720 px.
 */
.pc-chg-app { position: relative; margin: 16px 0 8px; font-family: var(--pc-font-body, system-ui, sans-serif); }
.pc-chg-app__bar { display: grid; gap: 8px; margin-bottom: 8px; }
.pc-chg-app__body { position: relative; }
.pc-chg-app__map {
    height: clamp(420px, 68vh, 640px);
    width: 100%;
    border: 1px solid var(--pc-line, #e5e5e5);
    border-radius: var(--pc-radius, 6px);
    overflow: hidden;
    background: var(--pc-surface-soft, #f2f5f7);
}
.pc-chg-app__loading, .pc-chg-app__error { padding: 16px; margin: 0; color: var(--pc-muted, #777); font-size: 14px; }
.pc-chg-app__count { font-size: 12px; color: var(--pc-muted, #777); margin: 6px 0 0; }

/* Search over our own list (no geocoder). */
.pc-chg-search { position: relative; }
.pc-chg-search__input {
    width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px;
    border: 1px solid var(--pc-line-strong, #d5d5d5); border-radius: var(--pc-radius, 6px);
    background: var(--pc-paper, #fff); color: var(--pc-charcoal, #161616);
}
.pc-chg-search__input:focus { outline: 2px solid var(--pc-charcoal, #161616); outline-offset: 1px; }
.pc-chg-search__results {
    position: absolute; z-index: 1001; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px 0; list-style: none;
    background: var(--pc-paper, #fff); border: 1px solid var(--pc-line-strong, #d5d5d5); border-radius: var(--pc-radius, 6px);
    box-shadow: 0 6px 18px rgba(22, 22, 22, .12); max-height: 320px; overflow-y: auto;
}
.pc-chg-search__results button {
    display: block; width: 100%; text-align: left; padding: 10px 12px; min-height: 44px; border: 0; background: none;
    font: inherit; font-size: 14px; color: var(--pc-charcoal, #161616); cursor: pointer;
}
.pc-chg-search__results button:hover, .pc-chg-search__results button:focus { background: var(--pc-surface-soft, #f2f5f7); }
.pc-chg-search__results button span, .pc-chg-search__none { color: var(--pc-muted, #777); font-size: 12px; }
.pc-chg-search__none { padding: 10px 12px; }

/* Filters: one row of selects that wraps; 44 px targets. */
.pc-chg-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pc-chg-filters select {
    min-height: 44px; padding: 8px 10px; font-size: 14px; border: 1px solid var(--pc-line-strong, #d5d5d5);
    border-radius: var(--pc-radius, 6px); background: var(--pc-paper, #fff); color: var(--pc-charcoal, #161616); max-width: 100%;
}
.pc-chg-check { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; color: var(--pc-charcoal, #161616); }
.pc-chg-check input { width: 18px; height: 18px; accent-color: var(--pc-charcoal, #161616); }
.pc-chg-port-note { margin: 0; font-size: 13px; color: var(--pc-charcoal, #161616); background: var(--pc-surface-soft, #f2f5f7); border-radius: var(--pc-radius, 6px); padding: 8px 10px; }
.pc-chg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pins and clusters: charcoal, Tesla red, a letter inside. */
.pc-chg-pin-wrap, .pc-chg-cluster-wrap { background: none; border: 0; }
.pc-chg-pin {
    display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
    border: 2px solid var(--pc-paper, #fff); box-shadow: 0 1px 4px rgba(22, 22, 22, .35);
    font: 700 11px/1 var(--pc-font-num, system-ui, sans-serif); color: var(--pc-paper, #fff);
}
.pc-chg-pin--net { background: var(--pc-charcoal, #161616); }
.pc-chg-pin--tesla { background: var(--pc-red, #990000); }
.pc-chg-cluster {
    display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--pc-charcoal, #161616); color: var(--pc-paper, #fff); border: 3px solid rgba(255, 255, 255, .85);
    font: 600 12px/1 var(--pc-font-num, system-ui, sans-serif); box-shadow: 0 1px 5px rgba(22, 22, 22, .35);
}
.pc-chg-popup strong { display: block; color: var(--pc-charcoal, #161616); }
.pc-chg-popup span { display: block; font-size: 12px; color: var(--pc-muted, #777); }
.pc-chg-app img.leaflet-tile, .pc-tm-charging-map img.leaflet-tile { max-width: none !important; border: 0 !important; }
.pc-chg-app .leaflet-control-attribution { font-size: 11px; }

/* The drawer: a side panel on desktop, a bottom sheet on phones. */
.pc-chg-drawer {
    position: absolute; z-index: 1000; top: 8px; right: 8px; bottom: 8px; width: min(360px, calc(100% - 16px));
    overflow-y: auto; background: var(--pc-paper, #fff); border: 1px solid var(--pc-line, #e5e5e5);
    border-radius: var(--pc-radius, 6px); box-shadow: 0 8px 24px rgba(22, 22, 22, .18); padding: 16px 16px 12px;
}
.pc-chg-drawer[hidden] { display: none; }
.pc-chg-drawer__close {
    position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
    font-size: 26px; line-height: 1; color: var(--pc-charcoal, #161616);
}
.pc-chg-drawer__title { margin: 0 40px 2px 0; font-size: 18px; line-height: 1.25; color: var(--pc-charcoal, #161616); }
.pc-chg-drawer__sub { margin: 0 0 6px; font-size: 13px; color: var(--pc-muted, #777); }
.pc-chg-drawer__checked { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 12px; color: var(--pc-charcoal, #161616); }
.pc-chg-facts { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px; }
.pc-chg-facts dt { margin: 10px 0 0; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--pc-muted, #777); }
.pc-chg-facts dd { margin: 0; font-size: 14px; line-height: 1.45; color: var(--pc-charcoal, #161616); }
.pc-chg-point { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.pc-chg-src { display: block; flex-basis: 100%; font-size: 11px; color: var(--pc-charcoal, #161616); opacity: .75; }
.pc-chg-src--grey { opacity: .5; }
.pc-chg-note { display: block; font-size: 12px; color: var(--pc-muted, #777); }
.pc-chg-unknown { color: var(--pc-muted, #777); }
.pc-chg-link { display: inline-block; margin-top: 2px; font-size: 13px; color: var(--pc-red, #990000); font-weight: 600; }
.pc-chg-drawer__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.pc-chg-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 14px; border-radius: var(--pc-radius, 6px);
    border: 1px solid var(--pc-charcoal, #161616); color: var(--pc-charcoal, #161616); background: var(--pc-paper, #fff);
    font-weight: 600; font-size: 14px; text-decoration: none;
}
.pc-chg-btn--primary { background: var(--pc-charcoal, #161616); color: var(--pc-paper, #fff); }
.pc-chg-btn:focus { outline: 2px solid var(--pc-red, #990000); outline-offset: 2px; }
.pc-chg-drawer__credit { margin: 6px 0 0; font-size: 11px; color: var(--pc-muted, #777); }
.pc-chg-drawer .pc-ic { width: 16px; height: 16px; flex: none; }

@media (max-width: 719px) {
    .pc-chg-app__map { height: 70svh; min-height: 420px; }
    /* A bottom sheet fixed to the screen, so it is never below the fold. */
    .pc-chg-drawer { position: fixed; z-index: 10000; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 58vh; border-radius: 12px 12px 0 0; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
    .pc-chg-filters select { flex: 1 1 calc(50% - 8px); min-width: 0; }
}

/* The crawlable list under the map. */
.pc-chg-list { margin: 20px 0 8px; }
.pc-chg-list__emirate details { border-top: 1px solid var(--pc-line, #e5e5e5); padding: 6px 0; }
.pc-chg-list__emirate summary { cursor: pointer; display: flex; align-items: baseline; gap: 8px; min-height: 44px; }
.pc-chg-list__emirate summary h3 { display: inline; margin: 0; font-size: 18px; color: var(--pc-charcoal, #161616); }
.pc-chg-list__emirate summary span { font-size: 13px; color: var(--pc-muted, #777); }
.pc-chg-list__table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.4; }
.pc-chg-list__table th, .pc-chg-list__table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--pc-line, #e5e5e5); vertical-align: top; }
.pc-chg-list__table thead th { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--pc-muted, #777); border-bottom-color: var(--pc-line-strong, #d5d5d5); }
.pc-chg-list__table tbody th { font-weight: 600; }
.pc-chg-list__table a { color: var(--pc-charcoal, #161616); }
.pc-chg-list__table thead a { color: inherit; }
.pc-chg-list__table caption { caption-side: top; text-align: left; font-size: 12px; color: var(--pc-muted, #777); padding: 0 0 6px; }
.pc-chg-muted { color: var(--pc-muted, #777); }
.pc-chg-tag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--pc-red, #990000); }
.pc-chg-list .pc-num { font-family: var(--pc-font-num, system-ui, sans-serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
