/* Container */
.brm-wrapper { position: relative; margin: 0 auto; max-width: 1100px; }
#brm-map { width: 100%; height: auto; min-height: 520px; }

/* Controls */
.brm-controls { display:flex; align-items:center; gap:10px; margin: 0 0 12px; }
.brm-toggle { display:none !important; } /* hidden */
.brm-zipsearch {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 10px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px;
}
.brm-zipsearch input {
  flex: 1; min-width: 140px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid #d1d5db; outline: none; font-size: 16px;
}
.brm-zipsearch input:focus { border-color: #64b5f6; box-shadow: 0 0 0 3px rgba(100,181,246,.25); }
.brm-zipsearch button {
  padding: 10px 14px; border-radius: 8px; border: 1px solid #64b5f6; background: #64b5f6; color: #fff; cursor: pointer; font-weight: 600;
}
.brm-zipsearch button:hover { filter: brightness(.96); }
.brm-zip-msg { margin: 4px 0 0; color: #374151; }

/* Whole-map depth */
.brm-wrapper svg {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
  overflow: visible;
}

/* States with subtle 3D pop */
.brm-state { cursor: pointer; stroke: #fff; stroke-width: 1.2px; transition: transform .18s cubic-bezier(.2,.7,.2,1), filter .18s ease, opacity .15s ease; transform-box: fill-box; transform-origin: center; }
.brm-state.is-hover { transform: translateY(-1px) scale(1.02); filter: drop-shadow(0 4px 6px rgba(0,0,0,.16)) drop-shadow(0 10px 14px rgba(0,0,0,.10)); }
.brm-state.is-active{ transform: translateY(-2px) scale(1.04); filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)) drop-shadow(0 18px 26px rgba(0,0,0,.16)); }
.brm-state:hover { opacity: 0.95; }

/* Focus */
#brm-map .brm-state:focus { outline: none !important; }
#brm-map .brm-state:focus-visible { outline: none !important; stroke: #0b69c7; stroke-width: 2.5px; }

/* Region palette */
.brm-state.region-East, .brm-state.region-North-East { fill: #e3f2fd !important; } /* East */
.brm-state.region-Southeast { fill: #64b5f6 !important; }
.brm-state.region-Central, .brm-state.region-Midwest { fill: #c5e1a5 !important; }
.brm-state.region-Great-Plains { fill: #81c784 !important; }
.brm-state.region-West { fill: #2e7d32 !important; }

/* Popout card */
#brm-popout {
  --brm-accent: #64b5f6;
  position: absolute;
  left: 50%; top: 20%;
  right: auto; bottom: auto;
  width: min(460px, calc(100% - 48px));
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(130%) blur(8px);
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(0,0,0,.18), 0 24px 60px rgba(0,0,0,.22);
  padding: 18px 18px 18px 16px;
  z-index: 9999;
  transform: translate(-50%, -8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
}
#brm-popout.brm-open { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

#brm-popout .brm-card { position: relative; }
#brm-popout .brm-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--brm-accent); border-radius: 20px 0 0 20px; }

.brm-card { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: start; text-align: left; }
.brm-photo { width: 112px; height: 112px; border-radius: 14px; object-fit: cover; background: #f4f4f4; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.brm-info { min-width: 0; font: 16px/1.5 ui-sans-serif, -apple-system, Segoe UI, Roboto, Arial, sans-serif; text-align: left; }

.brm-name  { margin: 0 0 4px; font-weight: 700; font-size: clamp(18px, 2.2vw, 22px); letter-spacing: .2px; }
.brm-title { margin: 0 0 10px; color: #4b5563; font-size: 15px; }
.brm-email, .brm-phone { display: inline-block; margin: 2px 12px 2px 0; text-decoration: none; color: #0b69c7; word-break: break-word; overflow-wrap: anywhere; }
.brm-email:hover, .brm-phone:hover { text-decoration: underline; }
.brm-region { margin-top: 10px; font-weight: 700; color: #111827; }

/* Close button */
.brm-close { position:absolute; top:4px; right:4px; width:44px; height:44px; display:flex; align-items:center; justify-content:center; padding:0; border:none; background:transparent; border-radius:9999px; font-size:24px; line-height:1; cursor:pointer; color:#111827; opacity:.8; z-index:2; transition:background .15s ease, opacity .15s ease, transform .08s ease; }
.brm-close:hover, .brm-close:focus-visible{ background:rgba(0,0,0,.06); opacity:1; outline:none; }
.brm-close:active{ transform:scale(0.96); }