.ssf-gebiedenkaart {
    --ssf-blue: #181830;
    --ssf-orange: #eb5e1c;
    --ssf-green: #307520;
    --ssf-border: #d9dde3;
    --ssf-soft: #f5f7f8;
    width: 100%;
    margin: 1.5rem 0;
    color: #181830;
}

.ssf-gebieden-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 280px)) auto;
    justify-content: center;
    gap: 14px;
    align-items: end;
    padding: 18px;
    margin-bottom: 14px;
    border: 1px solid var(--ssf-border);
    border-radius: 12px;
    background: #fff;
}

.ssf-gebieden-field { display: block; margin: 0; }
.ssf-gebieden-field > span { display: block; margin-bottom: 6px; font-size: .86rem; font-weight: 700; color: var(--ssf-blue); }
.ssf-gebieden-field input,
.ssf-gebieden-field select {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #bfc6cf;
    border-radius: 8px;
    background: #fff;
    color: #181830;
    font: inherit;
}
.ssf-gebieden-field input:focus,
.ssf-gebieden-field select:focus { outline: 3px solid rgba(235,94,28,.2); border-color: var(--ssf-orange); }

.ssf-gebieden-reset,
.ssf-gebieden-card-actions button,
.ssf-gebieden-popup-actions a,
.ssf-gebied-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--ssf-orange);
    color: #fff !important;
    font: inherit;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
}
.ssf-gebieden-reset { white-space: nowrap; }
.ssf-gebieden-reset:hover,
.ssf-gebieden-card-actions button:hover,
.ssf-gebieden-popup-actions a:hover,
.ssf-gebied-button:hover { filter: brightness(.92); }

.ssf-gebieden-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 10px;
    color: #4f5966;
    font-size: .93rem;
}
.ssf-gebieden-count { color: var(--ssf-blue); }

.ssf-gebieden-map-wrap {
    position: relative;
    width: 100%;
}
.ssf-gebieden-map {
    width: 100%;
    min-height: 360px;
    overflow: hidden;
    border: 1px solid var(--ssf-border);
    border-radius: 12px;
    background: #e9ecef;
    z-index: 1;
}
.ssf-gebieden-map .leaflet-control-attribution { font-size: 10px; }
.ssf-gebieden-map .leaflet-tooltip { font-weight: 700; color: var(--ssf-blue); }
/* Voorkom dat algemene thema-opmaak de OpenStreetMap-tegels afdekt. */
.ssf-gebieden-map .leaflet-tile-pane { opacity: 1 !important; visibility: visible !important; }
.ssf-gebieden-map .leaflet-tile { max-width: none !important; max-height: none !important; opacity: 1 !important; visibility: visible !important; }
.ssf-gebieden-map .leaflet-overlay-pane svg,
.ssf-gebieden-map .leaflet-overlay-pane canvas { background: transparent !important; }

.ssf-gebieden-popup-panel {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 500;
    width: min(360px, calc(100% - 28px));
    max-height: calc(100% - 28px);
    overflow: auto;
    box-sizing: border-box;
    padding: 16px;
    border: 1px solid rgba(24,24,48,.18);
    border-radius: 10px;
    background: rgba(255,255,255,.97);
    color: var(--ssf-blue);
    box-shadow: 0 8px 24px rgba(24,24,48,.18);
}
.ssf-gebieden-popup-panel[hidden] { display: none !important; }
.ssf-gebieden-popup-close {
    position: absolute;
    top: 7px;
    right: 9px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--ssf-blue);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}
.ssf-gebieden-popup-close:hover { background: var(--ssf-soft); }

.ssf-gebieden-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 2px 0;
    color: var(--ssf-blue);
    font-size: .86rem;
}
.ssf-gebieden-legend[hidden] { display: none !important; }
.ssf-gebieden-legend strong { flex: 0 0 auto; }
.ssf-gebieden-legend-items { display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; }
.ssf-gebieden-legend span { display:flex; align-items:center; gap:7px; }
.ssf-gebieden-legend i { width:14px; height:14px; border:1px solid rgba(0,0,0,.16); border-radius:2px; flex:0 0 auto; }

.ssf-gebieden-popup-image { display:block; width:100%; max-height:150px; object-fit:cover; margin:0 0 12px; border-radius:7px; }
.ssf-gebieden-popup h3 { margin: 0 36px 5px 0; color: var(--ssf-blue); font-size: 1.1rem; }
.ssf-gebieden-popup p { margin: 10px 0; }
.ssf-gebieden-popup-meta { color: #637080; font-size: .86rem; }
.ssf-gebieden-popup-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:12px; }
.ssf-gebieden-popup-actions a { min-height: 36px; padding: 7px 11px; }
.ssf-gebieden-popup-actions .ssf-gebieden-popup-secondary { background: transparent; color: var(--ssf-blue) !important; padding-left:0; padding-right:0; }

.ssf-gebieden-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.ssf-gebieden-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--ssf-border);
    border-top: 5px solid var(--ssf-area-color, var(--ssf-green));
    border-radius: 11px;
    background: #fff;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.ssf-gebieden-card.is-highlighted,
.ssf-gebieden-card:hover { transform: translateY(-2px); border-color: var(--ssf-area-color, var(--ssf-green)); box-shadow: 0 10px 28px rgba(24,24,48,.10); }
.ssf-gebieden-card-image { display:block; aspect-ratio:16/8; overflow:hidden; background:#e8ebef; }
.ssf-gebieden-card-image img { width:100%; height:100%; object-fit:cover; transition:transform .25s ease; }
.ssf-gebieden-card:hover .ssf-gebieden-card-image img { transform:scale(1.03); }
.ssf-gebieden-card-body { padding: 17px; }
.ssf-gebieden-card-meta { display:flex; justify-content:space-between; gap:10px; color:#687382; font-size:.83rem; }
.ssf-gebieden-card h3 { margin: 8px 0 9px; font-size:1.15rem; line-height:1.25; }
.ssf-gebieden-card h3 a { color:var(--ssf-blue); text-decoration:none; }
.ssf-gebieden-card p { margin:0 0 15px; color:#4d5865; }
.ssf-gebieden-card-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:auto; }
.ssf-gebieden-card-actions button { min-height:38px; padding:7px 11px; }
.ssf-gebieden-card-actions a { color:var(--ssf-orange); font-weight:700; text-decoration:none; }

.ssf-gebieden-error,
.ssf-gebieden-empty { padding: 18px; border: 1px solid #d6a6a6; border-radius: 8px; background: #fff3f3; color: #7a1f1f; }

.ssf-gebied-single-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 12px;
    margin: 0 0 18px;
}
.ssf-gebied-single-meta > div { padding: 14px; border-radius: 9px; background: var(--ssf-soft); }
.ssf-gebied-single-meta span { display:block; margin-bottom:4px; color:#697482; font-size:.8rem; }
.ssf-gebied-single-meta strong { color:var(--ssf-blue); }
.ssf-gebied-single-map { margin: 22px 0; }

@media (max-width: 900px) {
    .ssf-gebieden-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
    .ssf-gebieden-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ssf-gebied-single-meta { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 620px) {
    .ssf-gebieden-filters,
    .ssf-gebieden-list,
    .ssf-gebied-single-meta { grid-template-columns: 1fr; justify-content: stretch; }
    .ssf-gebieden-status { align-items:flex-start; flex-direction:column; gap:3px; }
    .ssf-gebieden-help { display:none; }
    .ssf-gebieden-map { border-radius:8px; }
    .ssf-gebieden-popup-panel { top:10px; right:10px; width:calc(100% - 20px); max-height:calc(100% - 20px); }
    .ssf-gebieden-legend { align-items:flex-start; flex-direction:column; gap:7px; }
    .ssf-gebieden-card-actions { align-items:flex-start; flex-direction:column; }
}

.ssf-gebiedenkaart.is-square-map .ssf-gebieden-map {
    height: auto !important;
    aspect-ratio: 1 / 1;
}
