/* FPP Neighborhood Map — Public Styles */

.fpp-nm-widget {
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(12,12,48,.15);
  position: relative;
  max-width: 100%;
}

/* ── MAP WRAP ─────────────────────────────── */
.fpp-nm-widget__map-wrap {
  position: relative;
  width: 100%;
}
.fpp-nm-widget__map {
  width: 100%;
  height: 100%;
}

/* ── LOADING ──────────────────────────────── */
.fpp-nm-widget__loading {
  position: absolute;
  inset: 0;
  background: rgba(235,235,235,.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  z-index: 20;
  transition: opacity .3s;
}
.fpp-nm-widget__loading.fpp-nm--hidden {
  opacity: 0;
  pointer-events: none;
}
.fpp-nm-widget__spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(12,12,48,.08);
  border-top-color: #B87F0D;
  border-radius: 50%;
  animation: fppSpin .75s linear infinite;
}
@keyframes fppSpin { to { transform: rotate(360deg); } }
.fpp-nm-widget__loading p {
  font-size: .75rem;
  color: rgba(12,12,48,.4);
  font-weight: 500;
}

/* ── LOCATION BADGE ───────────────────────── */
.fpp-nm-widget__badge {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(12,12,48,.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: .38rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(184,127,13,.4);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.fpp-nm-widget__badge.fpp-nm--visible { opacity: 1; }

/* ── POPUP ────────────────────────────────── */
.fpp-nm-widget__popup {
  position: absolute;
  z-index: 30;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(12,12,48,.18);
  padding: .95rem 1.1rem;
  min-width: 185px;
  max-width: 225px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(.97);
  transition: all .22s ease;
  border-left: 4px solid #0C0C30;
}
.fpp-nm-widget__popup.fpp-nm--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.fpp-nm-widget__popup-close {
  position: absolute;
  top: 7px; right: 9px;
  background: none; border: none;
  font-size: .78rem; color: #bbb;
  cursor: pointer; line-height: 1; padding: 2px;
}
.fpp-nm-widget__popup-cat {
  font-size: .58rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: #aaa; margin-bottom: .2rem;
}
.fpp-nm-widget__popup-name {
  font-size: .9rem; font-weight: 700;
  color: #0C0C30; margin-bottom: .2rem; line-height: 1.2;
}
.fpp-nm-widget__popup-stars { font-size: .72rem; font-weight: 600; margin-bottom: .2rem; }
.fpp-nm-widget__popup-addr  { font-size: .7rem; color: #777; line-height: 1.4; }

/* ── TABS BAR — overlay bottom of map ─────── */
.fpp-nm-widget__tabs {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(12,12,48,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 4px 20px rgba(0,0,0,.22);
  max-width: calc(100% - 32px);
}

/* ── SINGLE TAB ───────────────────────────── */
.fpp-nm-widget__tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border-radius: 10px;
  padding: 7px 11px 5px;
  cursor: pointer;
  transition: all .22s ease;
  min-width: 52px;
  border: 1.5px solid transparent;
  background: transparent;
}

.fpp-nm-widget__tab-icon {
  font-size: .95rem;
  line-height: 1;
  display: block;
  transition: transform .2s ease;
}

.fpp-nm-widget__tab-label {
  font-size: .52rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .2s;
  white-space: nowrap;
}

/* OFF state — dim, no background */
.fpp-nm-widget__tab--off {
  opacity: .45;
}
.fpp-nm-widget__tab--off .fpp-nm-widget__tab-label {
  color: rgba(255,255,255,.4);
}
.fpp-nm-widget__tab--off .fpp-nm-widget__tab-icon {
  filter: grayscale(0.5);
}

/* ACTIVE state — glowing with category color */
.fpp-nm-widget__tab--active {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
  opacity: 1;
}
.fpp-nm-widget__tab--active .fpp-nm-widget__tab-label {
  color: rgba(255,255,255,.9);
}
.fpp-nm-widget__tab--active .fpp-nm-widget__tab-icon {
  transform: scale(1.12);
  filter: none;
}

/* Hover on either state */
.fpp-nm-widget__tab:hover {
  opacity: 1;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.18);
}
.fpp-nm-widget__tab:hover .fpp-nm-widget__tab-label {
  color: rgba(255,255,255,.75);
}

/* Badge count */
.fpp-nm-widget__tab-count {
  position: absolute;
  top: -5px; right: -5px;
  background: #B87F0D;
  color: #0C0C30;
  font-size: .5rem;
  font-weight: 800;
  border-radius: 100px;
  padding: 1px 4px;
  min-width: 14px;
  text-align: center;
  opacity: 0;
  transition: opacity .3s;
  line-height: 1.4;
}
.fpp-nm-widget__tab-count.fpp-nm--show { opacity: 1; }

/* Ripple */
@keyframes fppRipple {
  from { transform:scale(0); opacity:.35; }
  to   { transform:scale(2.2); opacity:0; }
}
.fpp-nm-widget__tab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.2);
  transform: scale(0);
  pointer-events: none;
}
.fpp-nm-widget__tab.fpp-nm--ripple::after {
  animation: fppRipple .3s ease-out;
}

/* ── ERROR ────────────────────────────────── */
.fpp-nm-error {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .85rem;
  color: #856404;
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 480px) {
  .fpp-nm-widget__tabs { bottom: 10px; gap: 4px; padding: 6px 8px; }
  .fpp-nm-widget__tab  { min-width: 44px; padding: 6px 7px 4px; }
  .fpp-nm-widget__tab-icon  { font-size: .85rem; }
  .fpp-nm-widget__tab-label { font-size: .48rem; }
}
