/* 停車場標記／彈窗（掛在 document，非 shadow DOM） */

.park-mark {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    pointer-events: none;
}

.park-p {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #4a5568;
    color: #fff;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.park-p.park-p-ev {
    background: #16a34a;
}

.park-fee-win {
    margin-left: 8px;
    color: #94a3b8;
    font-weight: 500;
    font-size: 11px;
}

.park-mark.is-hl .park-p {
    background: #2962ff;
}

.park-badges {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.park-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 800;
    line-height: 14px;
    color: #fff;
}

.park-ico-large { background: #1d4ed8; }
.park-ico-car { background: #2563eb; }
.park-ico-moto { background: #0d9488; }
.park-ico-heavy { background: #b45309; }
.park-ico-hc { background: #7c3aed; }
.park-ico-ev { background: #16a34a; font-size: 10px; }

.park-ev-list {
    margin: 4px 0 10px;
    padding-left: 18px;
    font-size: 12px;
    color: #e2e8f0;
    line-height: 1.45;
}

.park-ev-src {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.park-popup-source {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.5;
}

.park-ico-hourly { background: #d97706; }
.park-ico-once { background: #db2777; }
.park-ico-month { background: #475569; }

.leaflet-popup.park-popup .leaflet-popup-content-wrapper {
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    max-height: min(72vh, 560px);
}

.leaflet-popup.park-popup .leaflet-popup-tip {
    background: #1e293b;
}

.leaflet-popup.park-popup .leaflet-popup-content {
    margin: 12px 14px;
    color: #f1f5f9;
    max-height: min(68vh, 528px);
    overflow: hidden;
}

.park-popup-inner {
    min-width: 220px;
    max-height: min(68vh, 528px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    font-family: Inter, "Noto Sans TC", sans-serif;
}

.park-popup-inner > .park-popup-drag-handle,
.park-popup-inner > .park-title {
    flex-shrink: 0;
}

.park-popup .park-popup-drag-handle {
    cursor: grab;
    margin: -2px -4px 10px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.2);
    user-select: none;
    touch-action: none;
}

.park-popup.park-popup-dragging .park-popup-drag-handle,
.park-popup.is-dragged .park-popup-drag-handle,
.park-popup .park-popup-drag-handle:active {
    cursor: grabbing;
    background: rgba(30, 41, 59, 0.55);
}

.park-popup .park-popup-kicker {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.park-popup .park-popup-drag-hint {
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    margin-left: 4px;
}

.park-popup.is-dragged .leaflet-popup-tip {
    opacity: 0.25;
}

.park-popup-inner .park-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-weight: 700;
    color: #f8fafc;
    font-size: 15px;
    line-height: 1.35;
    border-bottom: 2px solid #60a5fa;
    padding-bottom: 8px;
    margin-bottom: 0;
}

.park-popup-inner .park-title-text {
    color: #f8fafc;
    flex: 1 1 8rem;
}

.park-popup-inner .park-detail {
    font-size: 13px;
    line-height: 1.6;
    color: #e2e8f0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #0f172a;
}

.park-popup-inner .park-detail::-webkit-scrollbar {
    width: 8px;
}

.park-popup-inner .park-detail::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 4px;
}

.park-popup-inner .park-detail::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}

.park-popup-inner .park-fee-label {
    color: #fb923c;
    font-weight: 700;
    margin-bottom: 6px;
}

.park-popup-inner .park-fee-box {
    background: #f8fafc;
    color: #1e293b;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.park-fee-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.park-fee-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 6px;
    border-left: 4px solid #64748b;
    background: rgba(248, 250, 252, 0.08);
}

.park-fee-row-large { border-left-color: #1d4ed8; background: rgba(29, 78, 216, 0.16); }
.park-fee-row-car { border-left-color: #2563eb; background: rgba(37, 99, 235, 0.16); }
.park-fee-row-hc,
.park-fee-row-hcMoto { border-left-color: #7c3aed; background: rgba(124, 58, 237, 0.16); }
.park-fee-row-moto { border-left-color: #0d9488; background: rgba(13, 148, 136, 0.16); }
.park-fee-row-heavy { border-left-color: #b45309; background: rgba(180, 83, 9, 0.18); }
.park-fee-row-ev { border-left-color: #16a34a; background: rgba(22, 163, 74, 0.16); }

.park-fee-veh {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: #f8fafc;
    font-size: 12px;
}

.park-fee-rates {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.park-fee-rate {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #e2e8f0;
    font-size: 12px;
}

.park-fee-amt {
    color: #f8fafc;
    font-weight: 600;
}

.park-fee-ev-station {
    color: #94a3b8;
    font-size: 11px;
    margin: 2px 0 4px;
}

.park-cap-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.park-cap-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    border-left: 4px solid #64748b;
    background: rgba(248, 250, 252, 0.08);
}

.park-cap-num {
    color: #f8fafc;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.park-cap-note {
    font-size: 11px;
    color: #94a3b8;
    margin: -4px 0 10px;
}

.park-fee-empty {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.park-popup-inner .park-meta {
    color: #e2e8f0;
}

.leaflet-tooltip.parking-label-tooltip {
    background: rgba(41, 98, 255, 0.9) !important;
    border: 1px solid white !important;
    border-radius: 12px !important;
    color: white !important;
    font-size: 11px !important;
    font-weight: bold !important;
    padding: 2px 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    white-space: nowrap !important;
    opacity: 1 !important;
    pointer-events: none;
}

.leaflet-tooltip.parking-label-tooltip::before {
    display: none !important;
}

/* 充電站獨立圖層（停車柜「充電站」開關；資料接入後使用） */
.custom-ev-station {
    background: transparent !important;
    border: none !important;
}

.ev-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #15803d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.ev-mark .ev-bolt {
    font-size: 11px;
    line-height: 1;
    color: #fff;
}
