/* ==========================================================
   Ambulatorien Karte Steiermark – Stylesheet
   ========================================================== */

/* Wrapper */
.amb-karte-wrapper {
    width: 100%;
    font-family: inherit;
}

/* ----------------------------------------------------------
   Filter
   ---------------------------------------------------------- */
.amb-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.amb-filter-label {
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    display: block;
}

.amb-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s ease;
    outline: none;
    text-align: left;
    line-height: 1.4;
}

/* Textfarben je Typ */
.amb-filter-btn[data-typ="alle"]     { color: #2c2c2c; }
.amb-filter-btn[data-typ="vertrags"] { color: #80AC6D; }
.amb-filter-btn[data-typ="wahl"]     { color: #C0B1D7; }

/* Aktiv-Zustand: nur Unterstrich + fett */
.amb-filter-btn.active {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.amb-filter-btn:hover {
    opacity: 0.75;
}

.amb-filter-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

/* Chevron-Icon */
.amb-filter-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}

/* Farbpunkt (Legende) */
.amb-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ----------------------------------------------------------
   Karte
   ---------------------------------------------------------- */
#ambulatorien-map {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #f7f8f9;
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
}

/* Tiles leicht entsättigen + aufhellen */
#ambulatorien-map .leaflet-tile-pane {
    filter: saturate(0.25) brightness(1.06);
}

/* Leaflet Controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 1px 8px rgba(0,0,0,.12) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: #fff !important;
    color: #444 !important;
    font-size: 16px !important;
    line-height: 28px !important;
    width: 30px !important;
    height: 30px !important;
    border: none !important;
    border-bottom: 1px solid #eee !important;
    transition: background 0.15s;
}

.leaflet-control-zoom a:last-child {
    border-bottom: none !important;
}

.leaflet-control-zoom a:hover {
    background: #f4f7fa !important;
}

/* ----------------------------------------------------------
   Marker
   ---------------------------------------------------------- */
.amb-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,.22);
    transition: transform 0.12s ease;
    cursor: pointer;
}

.amb-marker[data-typ="vertrags"] {
    background: #80AC6D;
    border: 2.5px solid rgba(128, 172, 109, 0.2);
}

.amb-marker[data-typ="wahl"] {
    background: #C0B1D7;
    border: 2.5px solid rgba(192, 177, 215, 0.2);
}

.amb-marker:hover {
    transform: scale(1.35);
}

/* ----------------------------------------------------------
   Bezirks-GeoJSON-Layer
   ---------------------------------------------------------- */

/* Sanfter Übergang bei Hover auf SVG-Pfade (Leaflet rendert als inline-SVG) */
#ambulatorien-map .leaflet-districtsPane-pane path {
    transition: fill-opacity 0.18s ease, stroke-width 0.18s ease, stroke-opacity 0.18s ease;
}

/* Cursor auf steirischen Bezirken: normaler Zeiger statt Fadenkreuz */
#ambulatorien-map .leaflet-districtsPane-pane {
    cursor: default;
}

/* ----------------------------------------------------------
   Bezirks-Tooltip
   ---------------------------------------------------------- */
.amb-bezirk-tooltip {
    background: rgba(255,255,255,0.92) !important;
    border: 1px solid #d0d8e0 !important;
    border-radius: 5px !important;
    padding: 3px 8px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #445 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.08) !important;
    white-space: nowrap;
}

.amb-bezirk-tooltip::before {
    display: none !important;
}

/* ----------------------------------------------------------
   Popup
   ---------------------------------------------------------- */
.amb-popup-wrapper .leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.14) !important;
    border: none !important;
    padding: 0 !important;
    overflow: hidden;
}

.amb-popup-wrapper .leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
}

.amb-popup-wrapper .leaflet-popup-tip {
    box-shadow: none !important;
}

.amb-popup {
    padding: 14px 16px;
    min-width: 200px;
}

.amb-popup-typ {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 4px;
    opacity: 0.9;
}

.amb-popup-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.3;
}

.amb-popup-row {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
    line-height: 1.4;
}

.amb-popup-row a {
    color: #2c3e50;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.amb-popup-row a:hover {
    color: #3da35d;
}

.amb-popup-info {
    font-size: 11.5px;
    color: #777;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #eee;
    line-height: 1.5;
}

/* ----------------------------------------------------------
   Legende
   ---------------------------------------------------------- */
.amb-legende {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    font-size: 12px;
    color: #555;
    align-items: center;
}

.amb-legende .amb-dot {
    width: 10px;
    height: 10px;
    margin-right: 5px;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 600px) {
    .amb-filter {
        gap: 6px;
    }
    .amb-filter-btn {
        font-size: 12px;
        padding: 6px 13px;
    }
    #ambulatorien-map {
        border-radius: 6px;
    }
}
