.dcma-im-wrap {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 0;
  background: #fffdf7;
  border: 1px solid rgba(23,58,94,.15);
  box-shadow: 0 18px 42px rgba(23,58,94,.12);
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}
.dcma-im-sidebar {
  background: rgba(255,255,255,.95);
  border-right: 1px solid rgba(23,58,94,.14);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 640px;
  max-height: 820px;
}
.dcma-im-sidebar.hidden { display:none; }
.dcma-im-sidebar.hidden + .dcma-im-map-area { grid-column: 1 / -1; }
.dcma-im-brand span {
  color: #c99a3f;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
}
.dcma-im-brand h2 {
  margin: 6px 0;
  color: #173a5e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  line-height: .96;
}
.dcma-im-brand p {
  margin: 0;
  color: #667085;
  line-height: 1.42;
}
.dcma-im-search span {
  display: block;
  font-weight: 900;
  color: #173a5e;
  margin-bottom: 6px;
}
.dcma-im-search input {
  width: 100%;
  border: 1px solid rgba(23,58,94,.18);
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
}
.dcma-im-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dcma-im-filters button,
.dcma-im-topbar button {
  border: 1px solid rgba(23,58,94,.16);
  background: #fff;
  color: #173a5e;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 900;
  cursor: pointer;
}
.dcma-im-filters button.active,
.dcma-im-topbar button.active {
  background: #173a5e;
  color: #fff;
}
.dcma-im-list {
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 3px;
}
.dcma-im-list-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-areas: "icon title" "icon cat";
  gap: 2px 10px;
  text-align: left;
  border: 1px solid rgba(23,58,94,.12);
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  cursor: pointer;
}
.dcma-im-list-item.active {
  outline: 3px solid rgba(201,154,63,.35);
}
.dcma-im-list-item span {
  grid-area: icon;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--pin-color, #c99a3f);
  color: #fff;
}
.dcma-im-list-item svg {
  width: 20px;
  height: 20px;
}
.dcma-im-list-item strong {
  grid-area: title;
  color: #173a5e;
}
.dcma-im-list-item em {
  grid-area: cat;
  color: #667085;
  font-style: normal;
  font-size: .84rem;
}
.dcma-im-footer {
  margin-top: auto;
  border-top: 1px solid rgba(23,58,94,.12);
  padding-top: 12px;
}
.dcma-im-footer a {
  color: #173a5e;
  font-weight: 1000;
  text-decoration: none;
}
.dcma-im-map-area {
  position: relative;
  min-width: 0;
  background: #f5efe3;
}
.dcma-im-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  background: #fff;
  border-bottom: 1px solid rgba(23,58,94,.12);
}
.dcma-im-topbar span {
  color: #667085;
  font-weight: 800;
  margin-left: auto;
}
.dcma-im-map {
  width: 100%;
  background: #f5efe3;
}
.dcma-im-marker {
  background: transparent;
  border: 0;
}
.dcma-im-marker-inner {
  width: 42px;
  height: 42px;
  border-radius: 999px 999px 999px 6px;
  transform: rotate(-45deg);
  display: grid;
  place-items: center;
  background: var(--pin-color, #c99a3f);
  color: #fff;
  border: 4px solid #fff;
  box-shadow: 0 8px 20px rgba(23,58,94,.28);
}
.dcma-im-marker-inner svg {
  width: 21px;
  height: 21px;
  transform: rotate(45deg);
}
.dcma-im-popup img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 8px;
}
.dcma-im-popup h3 {
  color: #173a5e;
  margin: 0 0 6px;
}
.dcma-im-popup p {
  margin: 0 0 10px;
}
.dcma-im-popup-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dcma-im-popup-actions a {
  background: #173a5e;
  color: #fff !important;
  text-decoration: none;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 900;
}
.dcma-im-you-marker div {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #2a6fb5;
  color: #fff;
  border: 5px solid #fff;
  box-shadow: 0 0 0 8px rgba(42,111,181,.18), 0 10px 25px rgba(23,58,94,.28);
}
.dcma-im-empty {
  background: #fff0bd;
  color: #173a5e;
  padding: 24px;
  border: 1px solid rgba(23,58,94,.18);
}
@media(max-width: 900px) {
  .dcma-im-wrap {
    grid-template-columns: 1fr;
  }
  .dcma-im-sidebar {
    min-height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid rgba(23,58,94,.14);
  }
  .dcma-im-list {
    max-height: 260px;
  }
  .dcma-im-topbar span {
    width: 100%;
    margin-left: 0;
  }
}

/* DCMA Interactive Map v0.2.0 polish */
.dcma-im-drawer-toggle {
  display: none;
}
.dcma-im-filters button[data-category="food-drink"]::before { content: "🍽️ "; }
.dcma-im-filters button[data-category="shopping"]::before { content: "🛍️ "; }
.dcma-im-filters button[data-category="fashion"]::before { content: "👕 "; }
.dcma-im-filters button[data-category="specialty"]::before { content: "✨ "; }
.dcma-im-filters button[data-category="services"]::before { content: "🧰 "; }
.dcma-im-filters button[data-category="events"]::before { content: "🎟️ "; }
.dcma-im-filters button[data-category="parking"]::before { content: "🅿️ "; }
.dcma-im-filters button[data-category="community"]::before { content: "🏛️ "; }
.dcma-im-filters button[data-category="open-now"]::before { content: "🟢 "; }

.dcma-im-popup-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: space-between;
}
.dcma-im-popup-head h3 {
  flex: 1;
}
.dcma-im-open-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .72rem;
  font-weight: 1000;
  line-height: 1.05;
  background: #f3f4f6;
  color: #173a5e;
}
.dcma-im-open-badge.open {
  background: #e7fff0;
  color: #075c27;
}
.dcma-im-open-badge.closed {
  background: #fff0bd;
  color: #173a5e;
}
.dcma-im-open-badge.unknown {
  background: #f3f4f6;
  color: #667085;
}
.dcma-im-list-item {
  position: relative;
}
.dcma-im-list-item.featured::after {
  content: "Featured";
  position: absolute;
  top: 7px;
  right: 8px;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: .64rem;
  font-weight: 1000;
  background: rgba(201,154,63,.18);
  color: #173a5e;
}
.dcma-im-list-item small.dcma-im-open-badge {
  grid-column: 2;
  margin-top: 3px;
}
.dcma-im-meta-line {
  display: grid;
  gap: 2px;
  color: #667085;
  font-size: .85rem;
  margin: 0 0 8px !important;
}
.dcma-im-marker-inner {
  transition: transform .18s ease, filter .18s ease;
}
.dcma-im-marker:hover .dcma-im-marker-inner {
  transform: rotate(-45deg) scale(1.08);
  filter: brightness(1.05);
}

@media(max-width: 900px) {
  .dcma-im-wrap {
    position: relative;
    overflow: hidden;
  }
  .dcma-im-drawer-toggle {
    display: block;
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 1002;
    border: 0;
    background: #173a5e;
    color: #fff;
    border-radius: 999px;
    padding: 13px 18px;
    font-weight: 1000;
    box-shadow: 0 10px 28px rgba(23,58,94,.28);
  }
  .dcma-im-sidebar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    max-height: min(78vh, 720px);
    min-height: auto;
    transform: translateY(calc(100% - 86px));
    transition: transform .22s ease;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -14px 34px rgba(23,58,94,.22);
    padding-top: 44px;
  }
  .dcma-im-sidebar.is-open {
    transform: translateY(0);
  }
  .dcma-im-sidebar::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 50%;
    width: 58px;
    height: 6px;
    border-radius: 999px;
    background: rgba(23,58,94,.18);
    transform: translateX(-50%);
  }
  .dcma-im-map {
    height: min(78vh, 720px) !important;
  }
  .dcma-im-topbar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 801;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(23,58,94,.16);
  }
}


/* DCMA Interactive Map v0.2.1 map labels */
.dcma-im-marker-wrap {
  position: relative;
  width: 42px;
  height: 42px;
}
.dcma-im-marker-label {
  position: absolute;
  z-index: -1;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255,255,255,.94);
  color: #173a5e;
  border: 1px solid rgba(23,58,94,.16);
  box-shadow: 0 6px 16px rgba(23,58,94,.14);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
  transform: rotate(45deg);
  pointer-events: none;
}
.dcma-label-right {
  left: 36px;
  top: 6px;
}
.dcma-label-left {
  right: 36px;
  top: 6px;
}
.dcma-label-top {
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%) rotate(45deg);
}
.dcma-label-bottom {
  left: 50%;
  top: 38px;
  transform: translateX(-50%) rotate(45deg);
}
.dcma-labels-hidden-by-zoom .dcma-im-marker-label {
  display: none !important;
}
@media(max-width: 700px) {
  .dcma-im-marker-label {
    max-width: 130px;
    font-size: 11px;
    padding: 5px 8px;
  }
}


/* DCMA Interactive Map v0.2.2 label crash fix / safety */
.dcma-im-marker {
  pointer-events: auto;
}
.dcma-im-marker-wrap {
  position: relative;
  width: 42px;
  height: 42px;
}
.dcma-im-marker-label {
  pointer-events: none;
}


/* DCMA Interactive Map v0.3.0 GPS / phone location */
.dcma-im-topbar button[data-dcma-map-gps] {
  background: #2a6fb5;
  color: #fff;
  border-color: #2a6fb5;
}
.dcma-im-popup-actions a[href*="google.com/maps/dir"] {
  background: #2a6fb5;
}
.dcma-im-you-marker div {
  animation: dcmaImPulse 1.8s ease-in-out infinite;
}
@keyframes dcmaImPulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(42,111,181,.18), 0 10px 25px rgba(23,58,94,.28); }
  50% { box-shadow: 0 0 0 14px rgba(42,111,181,.08), 0 10px 25px rgba(23,58,94,.28); }
}


/* DCMA Interactive Map v0.3.2 mobile map reveal + per-pin GPS */
.dcma-im-map-reveal {
  display: none;
}
@media(max-width: 900px) {
  .dcma-im-map-reveal {
    display: block;
    width: calc(100% - 24px);
    margin: 12px;
    position: relative;
    z-index: 900;
    border: 0;
    background: #173a5e;
    color: #fff;
    border-radius: 999px;
    padding: 14px 18px;
    font-weight: 1000;
    box-shadow: 0 10px 28px rgba(23,58,94,.22);
  }
  .dcma-im-map-area.dcma-map-hidden-mobile .dcma-im-topbar,
  .dcma-im-map-area.dcma-map-hidden-mobile .dcma-im-map {
    display: none !important;
  }
  .dcma-im-map-area.dcma-map-hidden-mobile {
    min-height: 74px;
    background: #fffdf7;
  }
  .dcma-im-map-area.dcma-map-hidden-mobile + * {
    margin-top: 0;
  }
  .dcma-im-wrap:has(.dcma-map-hidden-mobile) .dcma-im-sidebar {
    position: relative;
    transform: none !important;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
  .dcma-im-wrap:has(.dcma-map-hidden-mobile) .dcma-im-drawer-toggle {
    display: none;
  }
}
