.af-world-map-wrapper { width: 100%; }

.af-world-map{
  width: 100%;
  min-height: 340px;
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  position: relative;
}

.af-world-map.jvm-container{
  width: 100%;
  min-height: 340px;
  height: 420px;
}

.af-world-map svg{ display:block; }

/* Keep country tooltip above the map surface (never below). */
.af-world-map .jvm-tooltip,
.jvm-tooltip{
  position: absolute;
  z-index: 10000 !important;
  pointer-events: none;
}

.af-world-map__fallback{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#6b7280;
  font-weight:700;
  font-size:14px;
  background:transparent;
  pointer-events:none;
}

/* =========================================================
   Fereastra țară / județ / localitate / străzi — v2 (UI 26.10.2026)
   Totul e legat de .af-country-overlay, ca stilurile generale ale site-ului (inputuri, imagini) să nu o strice.
   ========================================================= */
.af-romania-overlay,
.af-country-overlay{
  --afo-ink:#0f172a; --afo-muted:#64748b; --afo-line:#e8edf5; --afo-soft:#f6f8fc;
  --afo-blue:#2563eb; --afo-blue-soft:#eef4ff; --afo-yellow:#facc15; --afo-yellow-soft:#fef9c3;
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  z-index: 2000000; /* peste headerul lipicios al site-ului */
  transition: opacity .22s ease;
  font-family: inherit;
}
.af-romania-overlay--visible,
.af-country-overlay--visible{ opacity: 1; pointer-events: auto; }

.af-romania-panel,
.af-country-panel{
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(1180px, 100%);
  height: min(90vh, 860px);
  overflow: hidden;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 40px 90px -30px rgba(15,23,42,.55), 0 0 0 1px rgba(255,255,255,.4);
  transform: translateY(10px) scale(.985);
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.af-country-overlay--visible .af-country-panel{ transform: none; }

/* ---------- Antet ---------- */
.af-country-header{
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  grid-template-areas: "title actions" "sub actions";
  align-items: center;
  column-gap: 18px;
  row-gap: 4px;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--afo-line);
  background: linear-gradient(180deg,#ffffff 0%,#fbfcff 100%);
}
.af-country-header h3{
  grid-area: title;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  font-size: clamp(17px,1.4vw,21px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--afo-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.af-country-header h3::before{
  content: "";
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--afo-blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232563eb'%3E%3Cpath d='M12 2a7.5 7.5 0 0 0-7.5 7.5c0 5.3 6.4 11.6 6.7 11.9a1.1 1.1 0 0 0 1.6 0c.3-.3 6.7-6.6 6.7-11.9A7.5 7.5 0 0 0 12 2Zm0 10.3a2.8 2.8 0 1 1 0-5.6 2.8 2.8 0 0 1 0 5.6Z'/%3E%3C/svg%3E") center/18px no-repeat;
}
.af-country-subtitle{
  grid-area: sub;
  margin: 0 0 0 44px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--afo-muted);
}
.af-country-actions{
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 10px;
}
.af-country-overlay .af-country-all{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  max-width: 340px;
  padding: 0 18px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg,#fde047,#facc15);
  color: var(--afo-ink);
  font-size: 14.5px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  box-shadow: 0 10px 22px -12px rgba(234,179,8,.9);
  transition: transform .15s, box-shadow .15s;
}
.af-country-overlay .af-country-all:hover{ transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(234,179,8,1); }
.af-country-overlay .af-country-all:disabled{ opacity: .55; cursor: not-allowed; transform: none; }
.af-country-overlay .af-country-back,
.af-country-overlay .af-country-close{
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--afo-line);
  border-radius: 14px;
  background: #fff;
  color: var(--afo-ink);
  font-size: 0;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.af-country-overlay .af-country-back:hover{ background: var(--afo-blue-soft); border-color: #c7d7fe; color: var(--afo-blue); }
.af-country-overlay .af-country-close:hover{ background: #fff1f2; border-color: #fecdd3; color: #e11d48; transform: rotate(90deg); }
.af-country-overlay .af-country-back svg,
.af-country-overlay .af-country-close svg{ width: 20px; height: 20px; }

/* ---------- Corp: hartă + listă ---------- */
.af-country-body{
  display: grid;
  grid-template-columns: minmax(0,1.55fr) minmax(320px,1fr);
  min-height: 0;
  background: var(--afo-soft);
}
.af-romania-map-wrap,
.af-country-map-wrap{
  position: relative;
  height: 100%;
  min-height: 0;
  padding: 14px;
}
.af-romania-leaflet,
.af-country-leaflet{
  width: 100%;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
  border-radius: 20px;
  background: #e9eef7;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.06), 0 18px 40px -28px rgba(15,23,42,.5);
}
/* Bucățile hărții: fără reguli generale de imagini (altfel apar linii albe între ele) */
.af-country-overlay .leaflet-container img,
.af-country-overlay .leaflet-tile{
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  outline: none !important;
  /* stilul general al site-ului pune un filtru pe imagini, care face o linie deschisă pe marginea fiecărei bucăți de hartă */
  filter: none !important;
  -webkit-filter: none !important;
  mix-blend-mode: normal !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.af-country-overlay .leaflet-container{ font-family: inherit; }
/* Ocean + grilă fină (ca la harta lumii); județele stau deasupra ca un uscat cu umbră. */
.af-country-overlay .af-country-leaflet.leaflet-container{
  background:
    radial-gradient(70% 60% at 22% 18%, rgba(125,211,252,.35) 0%, rgba(125,211,252,0) 60%),
    radial-gradient(90% 80% at 85% 95%, rgba(2,6,23,.4) 0%, rgba(2,6,23,0) 60%),
    linear-gradient(160deg, #1a63cf 0%, #134aa6 45%, #0a2c6b 100%) !important;
}
.af-country-overlay .af-country-leaflet::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, transparent 1px 46px);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 85%);
  mask-image: radial-gradient(ellipse at center, #000 45%, transparent 85%);
  transition: opacity .3s;
}
.af-country-overlay .af-country-leaflet:not(.afwm-vector)::before{ opacity: 0; }
.af-country-overlay .af-country-leaflet.afwm-vector .leaflet-overlay-pane svg{
  filter: drop-shadow(0 3px 4px rgba(2,10,40,.4));
}
.af-country-overlay .af-country-leaflet .leaflet-tile-pane .leaflet-layer{ transition: opacity .35s ease; }
.af-country-overlay .af-country-leaflet path.leaflet-interactive{ transition: fill .15s, stroke .15s; }
.af-country-overlay .leaflet-control-zoom{
  overflow: hidden;
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 24px -12px rgba(15,23,42,.45) !important;
}
.af-country-overlay .leaflet-control-zoom a{
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--afo-line) !important;
  color: var(--afo-ink) !important;
  font-size: 20px !important;
  font-weight: 700;
}
.af-country-overlay .leaflet-control-zoom a:last-child{ border-bottom: 0 !important; }
.af-country-overlay .leaflet-control-zoom a:hover{ background: var(--afo-yellow-soft) !important; }
.af-country-overlay .leaflet-control-attribution{
  border-radius: 10px 0 0 0;
  background: rgba(255,255,255,.85) !important;
  font-size: 10.5px;
}
.af-country-overlay .leaflet-tooltip{
  padding: 7px 12px;
  border: 0;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 24px -12px rgba(15,23,42,.6);
}
.af-country-overlay .leaflet-tooltip-top::before{ border-top-color: #0f172a; }
.af-country-overlay .leaflet-tooltip-bottom::before{ border-bottom-color: #0f172a; }
.af-country-overlay .leaflet-tooltip-left::before{ border-left-color: #0f172a; }
.af-country-overlay .leaflet-tooltip-right::before{ border-right-color: #0f172a; }

.af-country-list-wrap{
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 18px 4px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.af-country-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- Căutare ---------- */
.af-country-search-wrap{
  position: sticky;
  top: -14px;
  z-index: 3;
  margin: -14px 0 2px;
  padding: 14px 0 10px;
  background: linear-gradient(180deg,var(--afo-soft) 80%,rgba(246,248,252,0));
}
.af-country-overlay input.af-country-locality-search{
  display: block;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 16px 0 46px;
  border: 1px solid var(--afo-line) !important;
  border-radius: 15px !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.3' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m20 20-4.5-4.5'/%3E%3C/svg%3E") 15px center/20px no-repeat !important;
  color: var(--afo-ink) !important;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 8px 20px -16px rgba(15,23,42,.45);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.af-country-overlay input.af-country-locality-search::placeholder{ color: #94a3b8; }
.af-country-overlay input.af-country-locality-search:focus{
  border-color: var(--afo-yellow) !important;
  box-shadow: 0 0 0 4px rgba(250,204,21,.25);
}

.af-country-list-empty{
  padding: 22px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #fff;
  color: var(--afo-muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- Județe / regiuni (nivelul țării) ---------- */
.af-country-list:has(> .af-country-list-item){
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
}
.af-country-overlay .af-country-list-item{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--afo-line);
  border-radius: 14px;
  background: #fff;
  color: var(--afo-ink);
  font-size: 14.5px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 16px -14px rgba(15,23,42,.5);
  transition: border-color .15s, background .15s, transform .15s;
}
.af-country-list-item small{
  font-size: 12px;
  font-weight: 600;
  color: var(--afo-muted);
}
.af-country-overlay .af-country-list-item:hover,
.af-country-overlay .af-country-list-item.is-hovered{
  border-color: var(--afo-yellow);
  background: var(--afo-yellow-soft);
  transform: translateY(-1px);
}

/* ---------- Localități (grupate) ---------- */
.af-country-subgroup{
  padding: 14px;
  border: 1px solid var(--afo-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px -20px rgba(15,23,42,.6);
}
.af-country-subgroup-title{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--afo-muted);
}
.af-country-subgroup-title span{
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--afo-blue-soft);
  color: var(--afo-blue);
  font-size: 11.5px;
  letter-spacing: 0;
  text-align: center;
}
.af-country-subgroup{ display: flex; flex-wrap: wrap; gap: 7px; }
.af-country-subgroup-title{ flex: 1 0 100%; }
.af-country-overlay .af-country-sublist-item{
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 8px 13px;
  border: 1px solid var(--afo-line);
  border-radius: 999px;
  background: var(--afo-soft);
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.af-country-overlay .af-country-sublist-item:hover{
  border-color: #c7d7fe;
  background: var(--afo-blue-soft);
  color: var(--afo-blue);
}
.af-country-overlay .af-country-sublist-item.is-hovered{
  border-color: var(--afo-yellow);
  background: var(--afo-yellow-soft);
  color: var(--afo-ink);
}

/* ---------- Străzi (listă pe litere) ---------- */
.af-country-street-list{
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--afo-line);
  border-radius: 18px;
  background: #fff;
}
.af-street-letter{
  position: sticky;
  top: 62px;
  z-index: 1;
  margin: 8px 4px 2px;
  padding: 3px 10px;
  align-self: flex-start;
  border-radius: 999px;
  background: var(--afo-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.af-street-letter:first-child{ margin-top: 2px; }
.af-country-overlay .af-country-street-list .af-country-sublist-item{
  display: flex;
  gap: 10px;
  width: 100%;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 6px 10px;
  line-height: 1.25;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 14px;
}
.af-country-overlay .af-country-street-list .af-country-sublist-item::before{
  content: "";
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--afo-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 19 9 5M20 19 15 5M12 6v2M12 11v2M12 16v2'/%3E%3C/svg%3E") center/16px no-repeat;
}
.af-country-overlay .af-country-street-list .af-country-sublist-item:hover{ background: var(--afo-blue-soft); }
.af-country-overlay .af-country-street-list .af-country-sublist-item.is-active{
  background: var(--afo-yellow-soft);
  color: var(--afo-ink);
  box-shadow: inset 3px 0 0 var(--afo-yellow);
}
/* Strada se încarcă (prima afișare): puls discret */
.af-country-overlay .af-country-sublist-item.is-loading{
  background: var(--afo-yellow-soft);
  animation: afStreetLoading 1s ease-in-out infinite;
}
@keyframes afStreetLoading{ 50%{ opacity: .55; } }

/* „Vezi anunțurile de pe …” */
.af-country-overlay .af-street-ads-btn{
  justify-content: center;
  width: 100%;
  max-width: none;
  height: 48px;
  background: linear-gradient(135deg,#1d4ed8,#2563eb);
  color: #fff;
  box-shadow: 0 14px 26px -14px rgba(37,99,235,.9);
}
.af-country-overlay .af-street-ads-btn:hover{ box-shadow: 0 16px 30px -14px rgba(37,99,235,1); }

/* ---------- Mesaj hartă indisponibilă ---------- */
.af-country-map-fallback{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  min-height: 280px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  color: #334155;
  text-align: center;
}
.af-country-map-fallback strong{ font-size: 15px; line-height: 1.35; }
.af-country-map-fallback span{ font-size: 13px; color: var(--afo-muted); }
.af-country-map-fallback__hint{ max-width: 520px; margin-top: 4px; font-size: 12px; color: #94a3b8; word-break: break-word; }

/* =========================================================
   Breakpoints
   ========================================================= */
@media (max-width: 1024px){
  .af-country-panel{ height: min(94vh, 900px); }
  .af-country-body{
    grid-template-columns: 1fr;
    grid-template-rows: minmax(240px,42%) minmax(0,1fr);
  }
  .af-country-list-wrap{ padding: 4px 14px 16px; }
  .af-country-search-wrap{ top: -4px; margin: -4px 0 2px; padding: 6px 0 10px; }
  .af-street-letter{ top: 64px; }
  .af-country-map-wrap{ padding: 12px 12px 6px; overflow: hidden; }
  .af-country-leaflet,
  .af-country-map-fallback{ min-height: 0; }
}
@media (max-width: 640px){
  .af-romania-overlay,
  .af-country-overlay{ padding: 0; align-items: end; }
  .af-country-panel{
    width: 100%;
    height: 94vh;
    border-radius: 24px 24px 0 0;
  }
  .af-country-header{
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-areas: "title close" "sub sub" "actions actions";
    padding: 14px 14px 12px;
  }
  .af-country-header h3::before{ width: 30px; height: 30px; border-radius: 10px; background-size: 16px; }
  .af-country-subtitle{ margin-left: 40px; font-size: 12.5px; }
  .af-country-actions{ display: contents; }
  .af-country-overlay .af-country-close{ grid-area: close; width: 40px; height: 40px; }
  .af-country-overlay .af-country-back{ grid-area: actions; justify-self: start; width: 44px; margin-top: 8px; }
  .af-country-overlay .af-country-all{ grid-area: actions; justify-self: end; max-width: calc(100% - 54px); margin-top: 8px; height: 44px; font-size: 13.5px; }
  .af-country-list:has(> .af-country-list-item){ grid-template-columns: 1fr 1fr; }
  .af-street-letter{ top: 58px; }
}
@media (max-width: 640px){
  .af-world-map{ border-radius: 10px; min-height: 240px; }
}
