.ds-zone { width: 100%; }
.ds-zone-top { display:flex; gap:16px; align-items:center; justify-content:space-between; margin: 10px 0; flex-wrap: wrap; }
.ds-zone-title { font-size: 20px; font-weight: 700; }
.ds-zone-sub { font-size: 13px; opacity: .85; margin-top: 2px; }

.ds-zone-actions { display:flex; gap:10px; align-items:center; flex-wrap: wrap; }
.ds-zone-btn {
  padding: 10px 12px; border: 1px solid #ddd; background: #fff; cursor: pointer;
  border-radius: 6px; font-size: 14px;
}
.ds-zone-btn[disabled] { opacity: .5; cursor: not-allowed; }
.ds-zone-btn:hover { border-color: #bbb; }

.ds-zone-body { display:flex; gap:12px; }
#ds-zone-map { width: 100%; border-radius: 10px; overflow: hidden; }

.ds-zone-list { width: 360px; border: 1px solid #eee; border-radius: 10px; padding: 10px; overflow:auto; max-height: 650px; }
.ds-zone-list-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 8px; }
.ds-zone-item { padding: 10px; border-bottom: 1px solid #f0f0f0; }
.ds-zone-item-title a { text-decoration:none; font-weight:600; }
.ds-zone-item-title a:hover { text-decoration:underline; }

.ds-zone-status { margin-top: 10px; font-size: 13px; opacity: .9; }

/* evidenzia item lista quando il marker Ã¨ hover */
.ds-zone-item-active {
  background: rgba(0,0,0,0.04);
  border-radius: 6px;
}

/* evidenzia marker quando hover su lista */
.ds-marker-active {
  filter: drop-shadow(0 0 6px rgba(0,0,0,0.35));
  transform: scale(1.05);
}

.ds-zone-card {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 14px;
  margin: 10px 0;
  background: #fff;
}

.ds-zone-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ds-zone-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.05);
}

.ds-zone-card-title a {
  font-weight: 700;
  text-decoration: none;
}

.ds-zone-card-row {
  margin-top: 8px;
  font-size: 13px;
  opacity: 0.9;
}

.ds-zone-card-cta {
  margin-top: 12px;
  font-weight: 600;
}

.ds-zone-card-cta a { text-decoration: none; }

.ds-zone-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

@media (max-width: 980px) {
  .ds-zone-body { flex-direction: column; }
  .ds-zone-list { width: 100%; max-height: 320px; }
}
/* ==============================================
   Radius / Address Search Bar
   ============================================== */

.ds-zone-radius-bar {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fff;
}

.ds-zone-radius-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

/* Input indirizzo + bottone geo */
.ds-zone-radius-input-wrap {
  display: flex;
  align-items: center;
  flex: 1 1 260px;
  min-width: 180px;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #fafafa;
}

.ds-zone-address-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 11px;
  font-size: 14px;
  outline: none;
  min-width: 0;
}

.ds-zone-address-input::placeholder { color: #bbb; }

.ds-zone-btn-geo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  height: 38px;
  border: none;
  border-left: 1px solid #eee;
  background: transparent;
  cursor: pointer;
  color: #555;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.ds-zone-btn-geo:hover  { background: #f0f0f0; color: #111; }
.ds-zone-btn-geo:disabled { opacity: 0.4; cursor: not-allowed; }

/* Spin animation per geolocalizzazione in corso */
.ds-btn-geo-loading svg { animation: ds-geo-spin 0.9s linear infinite; }
@keyframes ds-geo-spin { to { transform: rotate(360deg); } }

/* Slider raggio */
.ds-zone-radius-range-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 1 190px;
  min-width: 140px;
}

.ds-zone-radius-label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.ds-zone-radius-slider {
  width: 100%;
  accent-color: #333;
  cursor: pointer;
}

/* Bottone Cerca */
.ds-zone-btn-radius-search {
  flex-shrink: 0;
  padding: 9px 18px;
  border: 1px solid #ddd;
  background: #111;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.ds-zone-btn-radius-search:hover    { background: #333; }
.ds-zone-btn-radius-search:disabled { opacity: 0.5; cursor: not-allowed; }

/* Messaggio stato geocoding */
.ds-zone-radius-status {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  word-break: break-word;
}

/* Responsive */
@media (max-width: 600px) {
  .ds-zone-radius-fields        { flex-direction: column; }
  .ds-zone-radius-input-wrap,
  .ds-zone-radius-range-wrap    { flex: 1 1 100%; min-width: 0; }
  .ds-zone-btn-radius-search    { width: 100%; }
}

/* ==============================================
   Mode Tabs (indirizzo / territorio / disegna)
   ============================================== */

.ds-zone-mode-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ds-zone-tab {
  padding: 8px 14px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: #555;
}

.ds-zone-tab:hover { background: #ebebeb; border-color: #bbb; color: #111; }

.ds-zone-tab.ds-zone-tab-active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ==============================================
   Filter Bar — Ricerca per territorio
   ============================================== */

.ds-zone-filter-bar {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fff;
}

.ds-zone-filter-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.ds-zone-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 160px;
  min-width: 140px;
}

.ds-zone-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #444;
  white-space: nowrap;
}

.ds-required { color: #c00; margin-left: 2px; }
.ds-optional { color: #999; font-weight: 400; }

.ds-zone-filter-select {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #fafafa;
  cursor: pointer;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}

.ds-zone-filter-select:focus    { border-color: #999; background: #fff; }
.ds-zone-filter-select:disabled { opacity: 0.5; cursor: not-allowed; }

/* Bottone Cerca scuole */
.ds-zone-btn-filter-search {
  flex-shrink: 0;
  align-self: flex-end;
  padding: 9px 18px;
  border: 1px solid #ddd;
  background: #111;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.ds-zone-btn-filter-search:hover    { background: #333; }
.ds-zone-btn-filter-search:disabled { opacity: 0.5; cursor: not-allowed; }

/* Tipologia — appare solo per sec2 */
.ds-filter-tipologia-wrap { transition: opacity 0.2s; }

/* Status messaggio */
.ds-zone-filter-status {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 600px) {
  .ds-zone-mode-tabs      { gap: 6px; }
  .ds-zone-tab            { flex: 1 1 auto; text-align: center; font-size: 12px; padding: 8px 8px; }
  .ds-zone-filter-group   { flex: 1 1 100%; }
  .ds-zone-btn-filter-search { width: 100%; }
}
/* ── Marker plesso secondario ─────────────────────────────────────────────── */
.ds-marker-plesso svg { display: block; }

/* Popup plesso secondario */
.ds-popup-plesso { font-size: 13px; line-height: 1.5; }
.ds-popup-plesso-badge {
  display: inline-block;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  padding: 1px 6px;
  margin-bottom: 4px;
}
.ds-popup-plesso-parent { color: #666; font-size: 12px; }

/* ── Card: riga sedi secondarie ───────────────────────────────────────────── */
.ds-zone-card-plessi {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #f97316;
  font-weight: 500;
  margin-top: 4px;
}
.ds-zone-plessi-icon { font-size: 13px; }