/* YADIM Contact Map. Everything is scoped to .yadim-cm; colours come from CSS variables set by the module. */
.yadim-cm {
  --cm-accent: #2a7de1; --cm-map-bg: #0e1a33; --cm-list-bg: #fff; --cm-list-text: #14213d; --cm-card-bg: #fff; --cm-card-text: #14213d; --cm-list-w: 34%;
  --cm-height: 560px; --cm-height-m: 420px; --cm-line: rgba(20, 33, 61, .12);
  position: relative;
  width: 100%;
  box-sizing: border-box;
  color: var(--cm-list-text);
  font: 14px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.yadim-cm *, .yadim-cm *::before, .yadim-cm *::after { box-sizing: border-box; }
.yadim-cm .cm-data { margin: 0; padding: 12px 16px; list-style: none; }
.yadim-cm .cm-data li { margin: 0 0 10px; }
.yadim-cm-ready { display: flex; border-radius: inherit; overflow: hidden; } /* the corners come from Design → Border (the module) */
.cm-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* layouts */
.cm-layout-list_left { flex-direction: row; }
.cm-layout-list_right { flex-direction: row-reverse; }
.cm-layout-list_below, .cm-layout-map { flex-direction: column; }
.cm-layout-list_below .cm-mapwrap, .cm-layout-map .cm-mapwrap { flex: none; width: 100%; }
.cm-layout-list_below .cm-mapwrap { order: 1; }
.cm-layout-list_below .cm-side { order: 2; }
.cm-layout-map .cm-side { order: 0; }
.cm-side { display: flex; flex: 0 0 var(--cm-list-w); flex-direction: column; gap: 12px; min-width: 0; max-height: var(--cm-height); padding: 16px; background: var(--cm-list-bg); color: var(--cm-list-text); }
.cm-layout-list_below .cm-side, .cm-layout-map .cm-side { flex: none; max-height: none; width: 100%; }
.cm-layout-map .cm-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
.cm-layout-list_below .cm-list { max-height: 420px; }
.cm-mapwrap { position: relative; flex: 1 1 0; min-width: 0; height: var(--cm-height); overflow: hidden; background: var(--cm-map-bg); }
.cm-map { position: absolute; inset: 0; isolation: isolate; touch-action: none; cursor: grab; }
.cm-map.is-dragging { cursor: grabbing; }
.cm-map.is-picking { cursor: crosshair; }
.cm-map.is-picking .cm-marker, .cm-map.is-picking .leaflet-marker-icon { pointer-events: none !important; }
.cm-narrow.cm-layout-list_left, .cm-narrow.cm-layout-list_right { flex-direction: column; }
@media (max-width: 980px) { .yadim-cm .cm-mapwrap { height: var(--cm-height-t, var(--cm-height)); } .yadim-cm .cm-side { max-height: var(--cm-height-t, var(--cm-height)); } }
@media (max-width: 767px) { .yadim-cm .cm-mapwrap { height: var(--cm-height-m); } }
.cm-narrow .cm-mapwrap { order: 1; height: var(--cm-height-m); flex: none; width: 100%; }
.cm-narrow .cm-side { order: 2; flex: none; width: 100%; max-height: none; }
.cm-narrow .cm-list { max-height: 360px; }

/* map layers */
.cm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cm-markers { position: absolute; inset: 0; pointer-events: none; }
.cm-markers .cm-marker { position: absolute; left: 0; top: 0; pointer-events: auto; }
.cm-leaflet, .cm-google { position: absolute; inset: 0; }
.cm-tone-grayscale .cm-leaflet { --cm-tone: grayscale(1); }
.cm-tone-dark .cm-leaflet { --cm-tone: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
.cm-leaflet .leaflet-tile-pane { filter: var(--cm-tone, brightness(1)) var(--cm-adjust, brightness(1)); }
.cm-leaflet .yadim-tint-pane { mix-blend-mode: color; pointer-events: none; }
.cm-icon { background: none; border: 0; }
.cm-marker { display: block; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .15s; transform-origin: 50% 100%; }
.cm-marker svg { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.cm-m-dot, .cm-m-number { border-radius: 50%; background: var(--cm-c); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); transform-origin: 50% 50%; }
.cm-m-number { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-family: inherit; line-height: 1; }
.cm-marker.is-selected { z-index: 2; filter: brightness(1.1); }
.cm-m-pin.is-selected { transform: scale(1.2); }
.cm-m-dot.is-selected, .cm-m-number.is-selected { transform: scale(1.3); box-shadow: 0 0 0 3px rgba(255, 255, 255, .55), 0 1px 4px rgba(0, 0, 0, .4); }
.cm-marker:focus-visible { outline: 3px solid var(--cm-accent); outline-offset: 3px; }

/* controls */
.cm-zoombar { position: absolute; right: 12px; top: 12px; z-index: 5; display: flex; flex-direction: column; gap: 4px; }
.cm-zoombtn { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .95); color: #14213d; font-size: 18px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.cm-zoombtn:hover:not(:disabled) { background: #fff; }
.cm-zoombtn:disabled { opacity: .4; cursor: default; }
.cm-zoombtn:focus-visible, .cm-chip:focus-visible, .cm-item:focus-visible, .cm-near:focus-visible, .cm-close:focus-visible, .cm-btn:focus-visible { outline: 2px solid var(--cm-accent); outline-offset: 2px; }
.cm-hint { position: absolute; left: 50%; top: 14px; z-index: 6; transform: translateX(-50%); padding: 6px 12px; border-radius: 8px; background: rgba(20, 24, 40, .85); color: #fff; font-size: 12px; pointer-events: none; }
.cm-notice { position: absolute; left: 12px; bottom: 12px; z-index: 6; max-width: calc(100% - 24px); padding: 6px 10px; border-radius: 8px; background: #fff3dd; color: #7a4a00; font-size: 12px; }

/* side panel */
.cm-intro { margin-bottom: 4px; }
.cm-intro-title { margin: 0 0 6px; font-size: 22px; line-height: 1.25; }
.cm-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-search { flex: 1 1 160px; min-width: 0; }
.cm-search input { width: 100%; padding: 9px 12px; border: 1px solid var(--cm-line); border-radius: 8px; background: rgba(20, 33, 61, .04); color: inherit; font: inherit; }
.cm-search input:focus { outline: 2px solid var(--cm-accent); outline-offset: 1px; background: transparent; }
.cm-near { padding: 8px 12px; border: 1px solid var(--cm-line); border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.cm-near[aria-pressed="true"] { background: var(--cm-accent); border-color: var(--cm-accent); color: #fff; }
.cm-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--cm-line); border-radius: 99px; background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.cm-chip[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.cm-chip-count { font-weight: 600; opacity: .7; }
.cm-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; }
.cm-status { margin: 0; font-size: 12px; opacity: .7; }
.cm-list { flex: 1; min-height: 0; margin: 0; padding: 0; overflow: auto; list-style: none; }
.cm-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--cm-line); }
.cm-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 4px; margin: -4px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cm-item:hover, .cm-item[aria-current="true"] { background: rgba(42, 125, 225, .09); }
.cm-badge { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; }
.cm-itemtext { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.cm-name { font-weight: 700; }
.cm-text { margin: 0; font-size: 13px; }
.cm-cat { display: flex; align-items: center; gap: 6px; opacity: .75; }
.cm-addr { opacity: .8; }
.cm-dist { color: var(--cm-accent); font-weight: 600; }
.cm-thumb { flex: none; width: 76px; height: 58px; border-radius: 6px; object-fit: cover; }
.cm-list-compact .cm-row { padding: 6px 0; }
.cm-group { display: flex; align-items: center; gap: 8px; padding: 14px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cm-empty { padding: 16px 0; opacity: .7; }

/* buttons */
.cm-btn { display: inline-block; padding: 8px 16px; border-radius: 99px; background: var(--cm-accent); color: #fff !important; font-size: 13px; font-weight: 600; text-decoration: none !important; }
.cm-btn:hover { filter: brightness(1.1); }
.cm-btn--ghost { background: transparent; border: 1px solid var(--cm-accent); color: var(--cm-accent) !important; }
.cm-btn--lite { padding: 5px 14px; margin-left: 38px; background: transparent; border: 1px solid var(--cm-accent); color: var(--cm-accent) !important; }

/* the card */
.cm-card { position: absolute; z-index: 4; width: min(340px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; border-radius: 12px; background: var(--cm-card-bg); color: var(--cm-card-text); box-shadow: 0 8px 30px rgba(0, 0, 0, .3); }
.cm-card:not(.is-attached) { right: 12px; bottom: 12px; }
.cm-card.is-attached { left: 0; top: 0; }
.cm-narrow .cm-card:not(.is-attached) { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 70%; }
.cm-close { position: absolute; right: 6px; top: 6px; z-index: 2; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #14213d; font-size: 18px; line-height: 1; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.cm-img { display: block; width: 100%; height: 150px; object-fit: cover; }
.cm-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.cm-card .cm-name { margin: 0; font-size: 17px; line-height: 1.25; }
.cm-contact { margin: 0; padding: 0; list-style: none; }
.cm-contact a { color: var(--cm-accent); }
.cm-hours { display: flex; flex-direction: column; gap: 2px; }
.cm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) { .cm-marker { transition: none; } }

/* numbered ring marker (outlined; fills with the category colour when selected) */
.cm-m-ring { border-radius: 50%; background: rgba(0, 0, 0, .82); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); transform-origin: 50% 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-family: inherit; line-height: 1; }
.cm-m-ring.is-selected { background: var(--cm-c); transform: scale(1.25); }

/* region buttons on the map */
.cm-regions { position: absolute; z-index: 5; top: 12px; left: 12px; right: 60px; display: flex; flex-wrap: wrap; gap: 6px; }
.cm-region { padding: 6px 14px; border: 1px solid rgba(0, 0, 0, .15); border-radius: 99px; background: rgba(255, 255, 255, .92); color: #14213d; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.cm-region:hover { background: #fff; }
.cm-region[aria-pressed="true"] { background: var(--cm-accent); border-color: var(--cm-accent); color: #fff; }
.cm-region:focus-visible { outline: 2px solid var(--cm-accent); outline-offset: 2px; }

/* names or cards next to the markers */
.cm-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.cm-label { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; gap: 1px; max-width: 220px; padding: 3px 8px; border: 0; border-left: 3px solid var(--cm-c); border-radius: 4px; background: var(--cm-card-bg); color: var(--cm-card-text); font: inherit; font-size: 12px; text-align: left; line-height: 1.3; pointer-events: auto; cursor: pointer; box-shadow: 0 1px 6px rgba(0, 0, 0, .3); visibility: hidden; }
.cm-label--card { padding: 8px 12px; font-size: 13px; }
.cm-label .cm-text { font-size: 12px; opacity: .8; }
.cm-label:focus-visible { outline: 2px solid var(--cm-accent); outline-offset: 2px; }

/* flag / icon in the list */
.cm-flag { flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }

/* list in columns, headings with a coloured dash */
.cm-list { display: grid; grid-template-columns: repeat(var(--cm-cols, 1), minmax(0, 1fr)); column-gap: 18px; align-content: start; }
.cm-list .cm-group, .cm-list .cm-empty { grid-column: 1 / -1; }
.cm-narrow .cm-list { grid-template-columns: 1fr; }
.cm-group--dash { gap: 6px; }
.cm-dash { display: inline-block; width: 12px; height: 3px; border-radius: 2px; }

/* a list floating over the map, in a corner (a narrow module puts it under the map like the other layouts) */
.cm-layout-float { flex-direction: column; }
.cm-layout-float .cm-mapwrap { flex: none; width: 100%; }
.cm-layout-float:not(.cm-narrow) .cm-side {
  position: absolute; z-index: 6; flex: none; width: min(var(--cm-float-w, 340px), calc(100% - 24px)); max-height: calc(var(--cm-height) - 24px);
  margin: 12px; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 30px rgba(0, 0, 0, .28);
}
.cm-float-top_left:not(.cm-narrow) .cm-side { top: 0; left: 0; }
.cm-float-top_right:not(.cm-narrow) .cm-side { top: 0; right: 0; }
.cm-float-bottom_left:not(.cm-narrow) .cm-side { bottom: 0; left: 0; }
.cm-float-bottom_right:not(.cm-narrow) .cm-side { bottom: 0; right: 0; }
@media (max-width: 980px) { .yadim-cm.cm-float:not(.cm-narrow) .cm-side { max-height: calc(var(--cm-height-t, var(--cm-height)) - 24px); } }
@media (max-width: 767px) { .yadim-cm.cm-float:not(.cm-narrow) .cm-side { max-height: calc(var(--cm-height-m) - 24px); } }
/* glass: the list colour, see-through, with the map blurred behind it */
.cm-float-glass:not(.cm-narrow) .cm-side {
  background: rgba(255, 255, 255, .35);
  background: color-mix(in srgb, var(--cm-list-bg) var(--cm-float-op, 55%), transparent);
  -webkit-backdrop-filter: blur(var(--cm-float-blur, 14px)) saturate(1.4); backdrop-filter: blur(var(--cm-float-blur, 14px)) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .28);
}
/* the controls of the map keep clear of the panel */
.cm-float-top_left:not(.cm-narrow) .cm-regions { left: calc(var(--cm-float-w, 340px) + 24px); }
.cm-float-top_right:not(.cm-narrow) .cm-regions { left: 60px; right: calc(var(--cm-float-w, 340px) + 24px); }
.cm-float-bottom_right:not(.cm-narrow) .cm-regions { left: 60px; }
.cm-float-top_right:not(.cm-narrow) .cm-zoombar, .cm-float-bottom_right:not(.cm-narrow) .cm-zoombar { right: auto; left: 12px; }
.cm-float-bottom_left:not(.cm-narrow) .cm-card:not(.is-attached), .cm-float-top_left:not(.cm-narrow) .cm-card:not(.is-attached) { right: 12px; }
.cm-float-top_right:not(.cm-narrow) .cm-card:not(.is-attached), .cm-float-bottom_right:not(.cm-narrow) .cm-card:not(.is-attached) { right: auto; left: 12px; }
.cm-phone, .cm-email, .cm-web, .cm-hours-line, .cm-desc { opacity: .8; }
