* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, sans-serif; }
body { display: flex; height: 100vh; }

#sidebarToggle {
  position: fixed;
  top: 80px;
  left: 390px;
  z-index: 1001;
  padding: 12px 13px;
  margin-top: 16px;
  border: 1px solid #000;
  border-radius: 6px;
  background: #fff;
  color: #0d6efd;
  cursor: pointer;
  transition: left 0.25s ease, right 0.25s ease, background-color 0.2s ease;
}
#sidebarToggle img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: none;
}
#sidebarToggle:hover { background: #f1f5f9; }

#sidebar {
  transition: width 0.25s ease, padding 0.25s ease;
}
body.sidebar-collapsed #sidebar {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  border-right: 0;
}
body.sidebar-collapsed #sidebarToggle {
  left: 15px;
}

#sidebar {
  width: 380px;
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}
#map { flex: 1; height: 100%; }

.leaflet-control-zoom a {
  width: 46px !important;
  height: 38px !important;
  line-height: 36px !important;
  font-size: 24px !important;
}

.leaflet-control-zoom-out, .leaflet-control-zoom-in {
    border: 1px solid #000;
    border-radius: 6px;
}

.leaflet-marker-icon {
  width: 30px !important;
  height: 49px !important;
  margin-left: -15px !important;
  margin-top: -49px !important;
}

@media (min-width: 769px) {
  .leaflet-popup-close-button {
    width: 37px !important;
    height: 37px !important;
    font-size: 30px !important;
    line-height: 37px !important;
    text-align: center;
  }
}
.leaflet-popup.popup-direction-above .leaflet-popup-close-button,
.leaflet-popup.popup-direction-right .leaflet-popup-close-button {
  top: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;
}
.leaflet-popup.popup-direction-below .leaflet-popup-close-button {
  top: auto !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
}
.leaflet-popup.popup-direction-left .leaflet-popup-close-button {
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  left: 0 !important;
}

@media (min-width: 769px) {
  .clinician-popup { width: 1000px; min-height: 150px; padding: 0 4px 4px; font-size: 39px; line-height: 1.2; }
  .clinician-popup-header { display: flex; align-items: flex-start; gap: 35px; }
  .clinician-avatar {
    width: 156px;
    height: 156px;
    flex: 0 0 156px;
    object-fit: cover;
    border-radius: 6px;
    background: #e2e8f0;
  }
  .clinician-avatar-empty { display: block; }
  .clinician-popup-summary {
    min-width: 0;
    min-height: 156px;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }
  .clinician-popup-name { display: block; padding-bottom: 2px; }
  .clinician-popup-summary .popup-badges { margin-top: auto; }
  .clinician-popup-details { min-width: 0; line-height: 1.4; overflow-wrap: anywhere; text-align: center; }
  .clinician-popup-gender { display: block; font-size: 28px; }
  .clinician-popup-specialty { font-size: 28px; }
  .clinician-office-address { font-style: italic; }
  .clinician-popup-notes { text-align: left; }
  .clinician-popup .badge { font-size: 28px; }
}

.filter-group { margin-bottom: 15px; }
.filter-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.filter-group select, .filter-group input {
  width: 100%; padding: 8px; border: 1px solid #cbd5e1; border-radius: 6px;
}

.card {
  background: #fff;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.card:hover { border-color: #3b82f6; }
.card h3 { font-size: 15px; margin-bottom: 4px; color: #1e293b; }
.card p { font-size: 13px; color: #64748b; }
#clinicianList .badge {
  display: inline-block;
  font-size: 14px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 10px;
  margin-right: 8px;
  line-height: 1.3;
}
.leaflet-popup-content .badge {
  display: inline-block;
  font-size: 11px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 8px;
  margin-right: 4px;
  line-height: 1.5;
}
.leaflet-popup-content .popup-badges {
  margin-top: 6px;
  text-align: left;
}
@media (min-width: 769px) {
  .leaflet-popup-content .popup-badges .badge {
    font-size: 14px;
    padding: 8px 12px;
    margin-top: 10px;
    margin-right: 8px;
    line-height: 1.3;
  }
}

/* mobile */
@media (max-width: 500px) {
  #sidebarToggle { left: auto; right: 15px; }
  body.sidebar-collapsed #sidebarToggle { left: auto; right: 15px; }
  #sidebar { width: 85vw; }

  .leaflet-popup-content-wrapper {
    max-width: 500px;
  }
  .leaflet-popup-content {
    width: auto !important;
    margin: 13px 16px;
  }
  .clinician-popup {
    width: auto;
    min-height: 0;
    padding: 0 2px 2px;
    font-size: 16px;
    line-height: 1.35;
  }
  .clinician-popup-header {
    gap: 12px;
  }
  .clinician-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
  }
  .clinician-popup-summary {
    min-height: 64px;
    line-height: 1.2;
  }
  .clinician-popup-details {
    line-height: 1.35;
    font-size: 25px;

  }
  .clinician-popup-gender,
  .clinician-popup-specialty {
    font-size: 14px;
  }
  .clinician-popup .badge,
  .leaflet-popup-content .popup-badges .badge {
    font-size: 11px;
    padding: 4px 6px;
    margin-top: 5px;
    margin-right: 4px;
    line-height: 1.3;
  }
  .leaflet-popup-content .popup-badges {
    margin-top: 4px;
  }
}