.medloc2-section {
  background:var(--bb-rl-background-color, #fff);
  border:1px solid var(--bb-rl-border-color, #e5e7ef);
  border-radius: 8px;
  padding: 20px 24px 24px;
  margin: 20px 0 28px;
  box-shadow: 0 1px 3px rgba(6,13,24,.06);
  font-family: 'Outfit', system-ui, sans-serif;
  box-sizing: border-box;
}
.medloc2-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.medloc2-title-icon { flex-shrink: 0; color: var(--bb-rl-text-color, #1E2132); }
.medloc2-section .entry-title.bb-profile-title { font-size: 18px !important; font-weight: 700; color:var(--bb-rl-text-color, #1E2132); margin: 0; padding: 0; line-height: 1.3; }
a#medloc2-edit-toggle.medloc2-edit-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: auto !important;
    height: auto !important;
    margin: 0 0 0 auto !important;
    font-size: var(--bb-rl-font-size-sm, .8125rem) !important;
    font-weight: 500 !important;
    text-align: center !important;
    cursor: pointer !important;
    border-radius: var(--bb-rl-radius-md, 8px) !important;
    padding: 6px var(--bb-rl-space-200, 12px) !important;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease !important;
    text-decoration: none !important;
    background-color: var(--bb-rl-background-tertiary-color, #f1f3f5) !important;
    color: var(--bb-rl-text-color, #1c2b33) !important;
    border: 1px solid transparent !important;
    line-height: 1.4 !important;
}
a#medloc2-edit-toggle.medloc2-edit-btn:hover {
    background-color: var(--bb-rl-background-tertiary-hover-color, #e5e7eb) !important;
    color: var(--bb-rl-text-color, #1c2b33) !important;
    text-decoration: none !important;
}
.medloc2-empty { font-size: .88rem; color: var(--bb-rl-text-color, #5e7491); font-style: italic; margin: 0; }

.medloc2-gmaps-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 6px 4px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--bb-rl-text-color, #5e7491);
  text-decoration: none;
  letter-spacing: .01em;
  transition: color .18s ease, gap .18s ease;
}
.medloc2-gmaps-link:hover {
  color: var(--bb-rl-text-brand-primary-color, #1a6cf5);
  gap: 9px;
}
.medloc2-gmaps-icon { flex-shrink: 0; opacity: .85; transition: opacity .18s ease; }
.medloc2-gmaps-link:hover .medloc2-gmaps-icon { opacity: 1; }
.medloc2-gmaps-arrow {
  flex-shrink: 0;
  opacity: .55;
  transform: translate(0, 0);
  transition: transform .18s ease, opacity .18s ease;
}
.medloc2-gmaps-link:hover .medloc2-gmaps-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.medloc2-sat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bb-rl-background-brand-primary-color, #1a6cf5);
  border:2px solid var(--bb-rl-border-color, #fff);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--bb-rl-primary-color, #1a6cf5) 35%, transparent);
  animation: medloc2-pulse 1.8s ease-in-out infinite;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 2;
}
.medloc2-sat-badge--hide {
  opacity: 0;
  transform: scale(.4);
  animation: none;
}
@keyframes medloc2-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bb-rl-primary-color, #1a6cf5) 30%, transparent), 0 1px 4px color-mix(in srgb, var(--bb-rl-primary-color, #1a6cf5) 35%, transparent); }
  50%      { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bb-rl-primary-color, #1a6cf5) 0%, transparent), 0 1px 4px color-mix(in srgb, var(--bb-rl-primary-color, #1a6cf5) 35%, transparent); }
}

.medloc2-sat-tip {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%);
  background: #0a1628;
  color:var(--bb-rl-text-color, #fff);
  font-size: .76rem;
  font-weight: 500;
  font-family: 'Outfit', system-ui, sans-serif;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(6,13,24,.18);
  pointer-events: none;
  opacity: 0;
  animation: medloc2-tip-in .4s ease .5s forwards, medloc2-tip-out .4s ease 5.5s forwards;
  z-index: 1001;
}
.medloc2-sat-tip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -5px;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--bb-rl-text-color, #0a1628);
}
.medloc2-sat-tip--hide { animation: medloc2-tip-out .25s ease forwards !important; }
@keyframes medloc2-tip-in  { from { opacity: 0; transform: translateY(-50%) translateX(4px); } to { opacity: 1; transform: translateY(-50%) translateX(0); } }
@keyframes medloc2-tip-out { to { opacity: 0; } }

.medloc2-desc { font-size: .85rem; color: var(--bb-rl-text-color, #5e7491); margin: 0 0 16px; line-height: 1.5; }

.medloc2-edit-panel[hidden] { display: none; }
.medloc2-edit-panel { margin-top: 16px; padding-top: 20px; border-top:1px solid var(--bb-rl-border-color, #e5e7ef); }

.medloc2-search-row { display: flex; gap: 8px; margin-bottom: 4px; position: relative; }
.medloc2-input {
  flex: 1; height: 42px; padding: 0 14px; border:1.5px solid var(--bb-rl-border-color, #dce6f5); border-radius: 8px;
  font-size: .9rem; color: var(--bb-rl-text-color, #0a1628); background:var(--bb-rl-background-secondary-color, #edf2fb); outline: none; font-family: inherit;
}
.medloc2-input:focus { border-color: var(--bb-rl-border-brand-secondary-color, #1a6cf5); background:var(--bb-rl-background-color, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bb-rl-primary-color, #1a6cf5) 12%, transparent); }
.medloc2-autocomplete {
  position: relative; background:var(--bb-rl-background-color, #fff); border:1.5px solid var(--bb-rl-border-color, #dce6f5); border-radius: 10px;
  box-shadow: 0 8px 32px rgba(6,13,24,.12); list-style: none; padding: 6px; margin: 4px 0 12px;
  max-height: 260px; overflow-y: auto; z-index: 9999;
}
.medloc2-autocomplete[hidden] { display: none; }
.medloc2-autocomplete li {
  padding: 9px 10px; border-radius: 7px; cursor: pointer; font-size: .85rem; color: var(--bb-rl-text-color, #0a1628); line-height: 1.4;
}
.medloc2-autocomplete li:hover, .medloc2-autocomplete li:focus { background:var(--bb-rl-background-secondary-color, #edf2fb); outline: none; }
.medloc2-autocomplete li strong { display: block; font-weight: 600; color: var(--bb-rl-text-color, #0a1628); }
.medloc2-result-sub {
  font-size: .76rem; color: var(--bb-rl-text-color, #5e7491); line-height: 1.4; margin-top: 2px;
}
.medloc2-result-empty {
  cursor: default; color: var(--bb-rl-text-color, #5e7491); font-style: italic; text-align: center;
}
.medloc2-result-empty:hover { background: transparent; }
.medloc2-result-fallback {
  cursor: default; border-top:1px solid var(--bb-rl-border-color, #e5e7ef); margin-top: 4px; padding-top: 10px;
}
.medloc2-result-fallback:hover { background: transparent; }
.medloc2-result-fallback a {
  display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600;
  color: var(--bb-rl-text-brand-primary-color, #1a6cf5); text-decoration: none;
}
.medloc2-result-fallback a:hover { text-decoration: underline; }
.medloc2-result-fallback .medloc2-result-sub { margin-top: 4px; }

.medloc2-type-row { margin: 16px 0; }
.medloc2-label { display: block; font-size: .82rem; font-weight: 600; color: var(--bb-rl-text-color, #5e7491); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.medloc2-type-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.medloc2-pill {
  display: inline-flex; align-items: center; padding: 7px 12px; border:1.5px solid var(--bb-rl-border-color, #dce6f5); border-radius: 999px;
  cursor: pointer; font-size: .82rem; font-weight: 500; color: var(--bb-rl-text-color, #5e7491); background:var(--bb-rl-background-secondary-color, #edf2fb);
  transition: all .2s; user-select: none; white-space: nowrap;
}
.medloc2-pill:hover { border-color: var(--bb-rl-border-brand-secondary-color, #1a6cf5); color: var(--bb-rl-text-brand-primary-color, #1a6cf5); }
.medloc2-pill.is-active { border-color: var(--bb-rl-border-brand-secondary-color, #1a6cf5); background: color-mix(in srgb, var(--bb-rl-primary-color, #1a6cf5) 10%, transparent); color: var(--bb-rl-text-brand-primary-color, #1a6cf5); font-weight: 600; }
.medloc2-pill-input { position: absolute; opacity: 0; width: 0; height: 0; }

.medloc2-map-wrap { position: relative; width: 100%; box-sizing: border-box; margin: 12px 0; }
.medloc2-map-wrap--edit { height: 380px; }
.medloc2-map-wrap--view { height: 320px; }

.medloc2-map-wrap {
  isolation: isolate;
  z-index: 1;
}

.medloc2-map {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border:1.5px solid var(--bb-rl-border-color, #dce6f5);
  box-shadow: 0 2px 12px rgba(6,13,24,.07);
  background:var(--bb-rl-background-secondary-color, #edf2fb);
}
.medloc2-edit-map { cursor: crosshair; }

.medloc2-map .leaflet-tile-pane { z-index: 200; }
.medloc2-map .leaflet-overlay-pane { z-index: 400; }
.medloc2-map .leaflet-marker-pane { z-index: 600; }
.medloc2-map .leaflet-tooltip-pane { z-index: 650; }
.medloc2-map .leaflet-popup-pane { z-index: 700; }

.medloc2-map .leaflet-top,
.medloc2-map .leaflet-bottom {
  z-index: 1000;
}
.medloc2-map .leaflet-control {
  z-index: 1000;
}

.medloc2-locate-control {
  position: relative;
  margin: 0 10px 10px 0 !important;
}
.medloc2-locate-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background:var(--bb-rl-background-color, #fff);
  color: var(--bb-rl-text-color, #475569);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  text-decoration: none !important;
}
.medloc2-locate-btn:hover {
  background:var(--bb-rl-background-secondary-color, #eef4ff);
  color: var(--bb-rl-text-brand-primary-color, #1a6cf5);
}
.medloc2-locate-btn.is-loading {
  color: var(--bb-rl-text-brand-primary-color, #1a6cf5);
  pointer-events: none;
}
.medloc2-locate-btn.is-loading svg {
  animation: medloc2-locate-spin .9s linear infinite;
}
@keyframes medloc2-locate-spin { to { transform: rotate(360deg); } }
.medloc2-locate-status {
  position: absolute;
  right: 0;
  bottom: 42px;
  width: max-content;
  max-width: 210px;
  background: rgba(15,23,42,.92);
  color:var(--bb-rl-text-color, #fff);
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 11px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  z-index: 1001;
}
.medloc2-locate-status--error { background: rgba(220,38,38,.94); }
.medloc2-locate-status--success { background: rgba(22,163,74,.94); }

.medloc2-drag-hint {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  background: rgba(6,13,24,.75); color: #fff; font-size: .78rem; padding: 5px 12px;
  border-radius: 999px; pointer-events: none; z-index: 1000; white-space: nowrap;
}

.medloc2-address-display {
  font-size: .85rem; color: var(--bb-rl-text-color, #0a1628); background:var(--bb-rl-background-secondary-color, #edf2fb); border:1.5px solid var(--bb-rl-border-color, #dce6f5);
  border-radius: 8px; padding: 10px 14px; line-height: 1.5; min-height: 40px; margin-bottom: 16px;
  word-break: break-word; overflow-wrap: break-word; box-sizing: border-box;
}
.medloc2-muted { color: var(--bb-rl-text-color, #5e7491); font-style: italic; }

.medloc2-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.medloc2-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 22px; border-radius: 8px;
  font-size: .9rem; font-weight: 600; cursor: pointer; border: none; transition: all .2s; font-family: inherit;
}
.medloc2-btn:disabled { opacity: .5; cursor: not-allowed; }
.medloc2-btn--primary { background: var(--bb-rl-background-brand-primary-color, #1a6cf5); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--bb-rl-primary-color, #1a6cf5) 16%, transparent); }
.medloc2-btn--primary:hover:not(:disabled) { background: var(--bb-rl-background-brand-primary-hover-color, #1558d6); }
.medloc2-btn--secondary { background:var(--bb-rl-background-secondary-color, #edf2fb); color: var(--bb-rl-text-color, #0a1628); border:1.5px solid var(--bb-rl-border-color, #dce6f5); }
.medloc2-btn--secondary:hover { background:var(--bb-rl-background-secondary-color, #dce6f5); }
.medloc2-status { font-size: .85rem; font-weight: 500; }
.medloc2-status--success { color: #16a34a; }
.medloc2-status--error { color: #dc2626; }

.medloc2-marker-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.medloc2-marker {
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  border:3px solid var(--bb-rl-primary-color, #fff); box-shadow: 0 2px 6px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box;
}
.medloc2-marker span {
  transform: rotate(45deg);
  line-height: 1;
}

.medloc2-popup { font-size: .85rem; color: #0a1628; line-height: 1.4; }

.medloc2-map .leaflet-popup-content-wrapper {
  border-radius: 8px;
}
.medloc2-map .leaflet-popup-content {
  margin: 10px 12px;
}

@media (max-width: 600px) {
  .medloc2-section { padding: 16px 14px 18px; }
  .medloc2-map-wrap--edit { height: 280px; }
  .medloc2-map-wrap--view { height: 220px; }
  .medloc2-search-row { flex-direction: column; }
  .medloc2-search-row .medloc2-btn { width: 100%; justify-content: center; }
  .medloc2-actions { flex-direction: column; align-items: stretch; }
  .medloc2-actions .medloc2-btn { width: 100%; justify-content: center; }
  .medloc2-address-display { font-size: .8rem; padding: 8px 12px; }

  .medloc2-map .leaflet-popup-content-wrapper {
    max-width: 220px;
  }
  .medloc2-map .leaflet-popup-content {
    font-size: .72rem;
    line-height: 1.35;
    margin: 7px 9px;
    max-width: 200px;
  }
  .medloc2-popup { font-size: .72rem; }}

.medlocb-overlay{
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease;
  box-sizing: border-box;
}
.medlocb-overlay.is-open{
  opacity: 1;
  visibility: visible;
}
.medlocb-modal{
  position: relative;
  width: min(880px, 100%);
  height: min(620px, 85vh);
  background:var(--bb-rl-background-color, #fff);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0,0,0,.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(.94) translateY(8px);
  transition: transform .25s cubic-bezier(.2,.9,.3,1.2);
}
.medlocb-overlay.is-open .medlocb-modal{
  transform: scale(1) translateY(0);
}
.medlocb-modal__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom:1px solid var(--bb-rl-border-color, #eef0f3);
  background:var(--bb-rl-background-color, #fff);
  flex: 0 0 auto;
}
.medlocb-modal__title{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color:var(--bb-rl-text-color, #0f172a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.medlocb-modal__title svg{
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--bb-rl-text-brand-primary-color, #1a6cf5);
  stroke-width: 2;
}
.medlocb-modal__actions{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.medlocb-modal__link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bb-rl-text-brand-primary-color, #1a6cf5);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .15s ease;
  white-space: nowrap;
}
.medlocb-modal__link:hover{
  background:var(--bb-rl-background-secondary-color, #eef4ff);
  color: var(--bb-rl-text-brand-primary-color, #1a6cf5);
  text-decoration: none;
}
.medlocb-modal__close{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background:var(--bb-rl-background-secondary-color, #f1f3f5);
  color: var(--bb-rl-text-color, #475569);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
  flex-shrink: 0;
  padding: 0;
}
.medlocb-modal__close:hover{
  background:var(--bb-rl-background-secondary-color, #fee2e2);
  color: #dc2626;
  transform: rotate(90deg);
}
.medlocb-modal__close svg{
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}
.medlocb-modal__body{
  position: relative;
  flex: 1 1 auto;
  background:var(--bb-rl-background-secondary-color, #f5f6f8);
}
.medlocb-modal__body iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.medlocb-modal__loading{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--bb-rl-text-color, #64748b);
  font-size: 13px;
  background:var(--bb-rl-background-secondary-color, #f5f6f8);
  transition: opacity .2s ease;
}
.medlocb-modal__spinner{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border:3px solid var(--bb-rl-border-color, #dbe2ea);
  border-top-color: var(--bb-rl-border-brand-secondary-color, #1a6cf5);
  animation: medlocb-spin .8s linear infinite;
}
@keyframes medlocb-spin{ to{ transform: rotate(360deg); } }
.medlocb-modal__loading.is-hidden{
  opacity: 0;
  pointer-events: none;
}
.medlocb-modal__fallback{
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  padding: 32px;
  color: var(--bb-rl-text-color, #475569);
  background:var(--bb-rl-background-secondary-color, #f5f6f8);
  box-sizing: border-box;
}
.medlocb-modal__fallback.is-visible{
  display: flex;
}
.medlocb-modal__fallback svg{
  stroke: #94a3b8;
}
.medlocb-modal__fallback p{
  margin: 0;
  font-size: 14px;
  max-width: 320px;
}
.medlocb-modal__fallback-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--bb-rl-background-brand-primary-color, #1a6cf5);
  color:var(--bb-rl-text-color, #fff);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.medlocb-modal__fallback-btn:hover{
  background: var(--bb-rl-background-brand-primary-hover-color, #135ad1);
  color:var(--bb-rl-text-color, #fff);
  text-decoration: none;
  transform: translateY(-1px);
}
.medlocb-modal__geostatus{
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15,23,42,.85);
  color:var(--bb-rl-text-color, #fff);
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
  pointer-events: none;
  white-space: nowrap;
}
.medlocb-modal__geostatus.is-visible{
  opacity: 1;
  visibility: visible;
}
.medlocb-modal__geospinner{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color:var(--bb-rl-border-color, #fff);
  animation: medlocb-spin .7s linear infinite;
  flex-shrink: 0;
}
@media (max-width: 640px){
  .medlocb-overlay{ padding: 0; }
  .medlocb-modal{
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .medlocb-modal__link span{ display: none; }}
