/* T585: the draw-locations map (app/lab/js/draw-map.js), on the blood panels page's "where" section (inside .shop-site,
   whose reset clears every margin, padding, border and background: Leaflet's own pieces get theirs back here) and on the
   draw points page. The house tokens, the 8 px grid, nothing moves on hover. */
.dm-on { align-items: start !important; }
.dm-wrap { min-width: 0; }
.dm-wrap [hidden], .dm-find [hidden] { display: none !important; }
.dm-wrap figure.bp-lab-map { margin-top: 16px !important; }
.dm-map { position: relative; width: 100%; height: 560px; border-radius: 16px; overflow: hidden; background: var(--bp-sand-soft, #EDEAE5); border: 1px solid var(--bp-sand, #DBD4CB); z-index: 0; }
.dm-map:focus-visible { outline: 3px solid var(--bp-teal, #006B62); outline-offset: 2px; }
.dm-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px !important; }
.dm-legend li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px !important; }
.dm-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff !important; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.dm-dot--on { background: var(--bp-teal, #006B62) !important; }
.dm-dot--off { background: #8A9399 !important; }
.dm-note { margin-top: 8px !important; font-size: 14px !important; color: var(--ink-3, #5B6770); }
.dm-note--fail { color: var(--ink, #1F2933); font-weight: 600 !important; }

/* the finder beside the map */
.dm-find { display: grid; gap: 16px; margin-top: 24px !important; }
.dm-field { gap: 8px; }
.dm-q__row { display: flex; gap: 8px; }
.dm-q__row .cx-input { flex: 1 1 auto; width: auto; min-width: 0; }
.dm-find .cx-input { min-height: 48px; padding: 0 16px !important; border: 1px solid var(--bp-sand, #CCC1B2) !important; border-radius: 10px; background: var(--paper, #fff) !important; font-size: 16px !important; }
.dm-find select.cx-input { padding-right: 40px !important; -webkit-appearance: none; appearance: none;
  background: var(--paper, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231F2933' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 16px center !important; }
.dm-find .cx-input:focus-visible { outline: 3px solid var(--bp-teal, #006B62); outline-offset: 1px; }
/* the buttons in the site's own button look (the .shop-site reset takes the standard's; the panels page's "where" section
   is the website's section): filled teal for the search, the outline for the location */
.dm-find .cx-btn, .dm-near .cx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px !important;
  border-radius: 10px; font-size: 16px !important; font-weight: 700 !important; line-height: 1.2 !important; cursor: pointer; white-space: nowrap; }
.dm-find .cx-btn--primary { background: var(--bp-teal, #006B62) !important; color: #fff !important; border: 2px solid var(--bp-teal, #006B62) !important; }
.dm-find .cx-btn--primary:hover { background: var(--bp-teal-600, #00524B) !important; border-color: var(--bp-teal-600, #00524B) !important; }
.dm-find .cx-btn--secondary { background: var(--paper, #fff) !important; color: var(--bp-teal, #006B62) !important; border: 2px solid var(--bp-teal, #006B62) !important; }
.dm-find .cx-btn--secondary:hover { background: var(--bp-sand-soft, #F4EFE8) !important; }
.dm-find .cx-btn--quiet { min-height: 44px; padding: 0 16px !important; background: var(--bp-sand-soft, #F4EFE8) !important; color: var(--bp-teal, #006B62) !important; border: 1px solid var(--bp-sand, #DBD4CB) !important; }
.dm-find .cx-btn:focus-visible { outline: 3px solid #1F2933; outline-offset: 2px; }
.dm-q__row .cx-btn { flex: 0 0 auto; }
.dm-me { justify-self: start; }
.dm-msg { min-height: 0; font-size: 15px !important; color: var(--ink-2, #3E4A52); }
.dm-msg:empty { display: none; }
.dm-msg--sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.dm-near__h { font-size: 17px !important; font-weight: 700 !important; margin-bottom: 8px !important; }
.dm-near__list { display: grid; gap: 8px; }
.dm-near__item { padding: 16px !important; border-radius: 12px; background: var(--paper, #fff) !important; border: 1px solid var(--bp-sand, #DBD4CB) !important; }
.dm-near__item p { font-size: 14px !important; }
.dm-near__name { display: flex; justify-content: space-between; gap: 16px; font-size: 15px !important; }
.dm-near__km { flex: 0 0 auto; color: var(--ink-3, #5B6770); }
.dm-near__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 8px !important; }
.dm-near__acts .cx-btn { min-height: 44px; }

/* the packages line, in the finder's list and the province list */
.dm-pk { display: block; font-weight: 500 !important; color: var(--bp-teal-600, #00524B); }
.dm-pk--none { font-weight: 400 !important; color: var(--ink-3, #5B6770); }
/* T626 Addendum 1: the chosen package's state on a point, and the line over the nearest list */
.dm-state { display: block; font-weight: 600 !important; color: var(--bp-teal-600, #00524B); }
.dm-row .dm-state { margin-bottom: 4px !important; }
.dm-near__note { font-size: 15px !important; color: var(--ink-2, #3E4A52); margin-bottom: 8px !important; }

/* the markers and the clusters */
.dm-wrap .dm-pin { border-radius: 50%; background: transparent !important; }
.dm-wrap .dm-pin::after { content: ""; position: absolute; left: 13px; top: 13px; width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); background: var(--dm-dot); }
.dm-wrap .dm-pin--on { --dm-dot: var(--bp-teal, #006B62); }
.dm-wrap .dm-pin--off { --dm-dot: #8A9399; }
.dm-wrap .dm-pin:focus-visible, .dm-wrap .dm-cluster:focus-visible { outline: 3px solid #1F2933; outline-offset: 2px; }
.dm-wrap .dm-cluster { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bp-teal, #006B62) !important;
  border: 3px solid rgba(255, 255, 255, 0.9) !important; box-shadow: 0 0 0 4px rgba(0, 107, 98, 0.25); color: #fff !important; }
.dm-wrap .dm-cluster span { font-size: 13px !important; font-weight: 700 !important; line-height: 1 !important; color: #fff !important; }
.dm-wrap .dm-cluster--m span { font-size: 14px !important; }
.dm-wrap .dm-cluster--l span { font-size: 15px !important; }

/* Leaflet's own pieces, given back what .shop-site's reset takes */
.dm-wrap .leaflet-container { font-family: var(--font, system-ui, sans-serif); font-size: 14px; }
.dm-wrap .leaflet-control { margin: 12px !important; }
.dm-wrap .leaflet-bottom .leaflet-control-attribution { margin: 0 !important; padding: 0 8px !important; background: rgba(255, 255, 255, 0.85) !important; font-size: 11px !important; color: #333 !important; }
.dm-wrap .leaflet-control-attribution a { color: #0F5E57 !important; text-decoration: underline !important; }
/* T626 (the Codex read, 1): each attribution link a 44 px target without changing the corner's look: an invisible area
   from the line upward over the map, at least 44 px wide */
.dm-wrap .leaflet-control-attribution a { position: relative; display: inline-block; }
.dm-wrap .leaflet-control-attribution a::after { content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: max(100%, 44px); height: 44px; }
.dm-wrap .leaflet-bar { border: 2px solid rgba(0, 0, 0, 0.2) !important; border-radius: 8px; background: #fff !important; }
.dm-wrap .leaflet-bar a { width: 44px !important; height: 44px !important; line-height: 44px !important; font-size: 22px !important; text-align: center !important;
  background: #fff !important; color: #1F2933 !important; border-bottom: 1px solid #ccc !important; display: block; }
.dm-wrap .leaflet-bar a:last-child { border-bottom: 0 !important; }
.dm-wrap .leaflet-bar a.leaflet-disabled { color: #9AA3A9 !important; background: #F4F4F4 !important; }
.dm-wrap .leaflet-popup-content-wrapper { padding: 1px !important; background: #fff !important; border-radius: 12px; }
.dm-wrap .leaflet-popup-content { margin: 16px 24px 16px 16px !important; line-height: 1.45 !important; }
.dm-wrap .leaflet-popup-tip-container { margin: 0 auto !important; }
.dm-wrap .leaflet-popup-tip { margin: -10px auto 0 !important; padding: 1px !important; background: #fff !important; }
.dm-wrap .leaflet-popup-close-button { width: 44px !important; height: 44px !important; font-size: 22px !important; line-height: 44px !important; text-align: center !important; }
.dm-pop p { font-size: 14px !important; margin: 0 0 4px !important; color: #1F2933; }
.dm-pop .dm-pop__name { font-size: 16px !important; font-weight: 700 !important; padding-right: 16px !important; }
.dm-pop .dm-pop__pk { font-weight: 500 !important; color: var(--bp-teal-600, #00524B); margin-top: 8px !important; }
.dm-pop .dm-pop__pk--none { font-weight: 400 !important; color: #5B6770; }

.dm-wrap .marker-cluster-anim .leaflet-marker-icon, .dm-wrap .marker-cluster-anim .leaflet-marker-shadow { transition: transform 0.25s ease-out, opacity 0.25s ease-in; }
@media (prefers-reduced-motion: reduce) {
  .dm-wrap .marker-cluster-anim .leaflet-marker-icon, .dm-wrap .marker-cluster-anim .leaflet-marker-shadow { transition: none; }
}


@media (max-width: 1024px) {
  .dm-map { height: 480px; }
}
@media (max-width: 767px) {
  .dm-map { height: 420px; border-radius: 12px; }
  .dm-q__row { flex-direction: column; }
  .dm-q__row .cx-btn, .dm-me { width: 100%; justify-self: stretch; }
}

/* the draw points page (app/lab/draw-points.html) */
.dm-page { max-width: 1180px; margin: 0 auto; padding: 48px 24px 64px; }
.dm-page__h { font-size: 40px; line-height: 1.15; margin-bottom: 16px; }
.dm-page__p { max-width: 760px; font-size: 17px; margin-bottom: 8px; }
.dm-page__src { font-size: 14px; color: var(--ink-3, #5B6770); margin-bottom: 32px; }
.dm-page .dm-host { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: start; }
.dm-page .dm-host h2 { font-size: 21px; margin-bottom: 8px; }
.dm-page .bp-lab-prov-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 40px; align-items: start; }
.dm-page .bp-lab-prov { border-radius: 12px; background: var(--paper, #fff); border: 2px solid var(--bp-teal, #006B62); }
.dm-page .bp-lab-prov[open] { grid-column: 1 / -1; }
.dm-page .bp-lab-prov summary { cursor: pointer; min-height: 56px; display: flex; align-items: center; padding: 12px 18px; color: var(--bp-teal, #006B62); font-weight: 600; }
.dm-page .bp-lab-point-list { list-style: none; margin: 0; padding: 4px 20px 18px; columns: 3 300px; column-gap: 32px; border-top: 1px solid var(--bp-sand, #DBD4CB); }
.dm-page .bp-lab-point-list li { break-inside: avoid; font-size: 14px; line-height: 1.45; padding: 8px 0 2px; border-bottom: 1px solid #eee9e2; }
.dm-page .bp-lab-point-list a { display: inline-flex; align-items: center; min-height: 44px; color: var(--bp-teal, #006B62); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.dm-page__back { margin-top: 40px; }
body[data-embed] .dm-page { padding: 16px; }
@media (max-width: 1024px) {
  .dm-page .dm-host { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .dm-page .bp-lab-prov-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .dm-page { padding: 32px 16px 48px; }
  .dm-page__h { font-size: 30px; }
  .dm-page .bp-lab-prov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dm-page .bp-lab-point-list { columns: 1; padding: 4px 16px 14px; }
}
body[data-embed] [data-shell-topbar], body[data-embed] [data-shell-footer] { display: none !important; }
.dm-page figure.bp-lab-map img { width: 100%; height: auto; border-radius: 16px; display: block; }

/* T585 Addendum 2: a point's row (the province list, the nearest list, the popup): the name, its lines, the packages,
   and the directions link always on its own last line, never glued to the text */
.dm-row { display: flex !important; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 0 !important; }
.dm-row__lab { white-space: nowrap; }
.dm-row__name { font-weight: 700 !important; color: var(--ink, #1F2933); }
.dm-row__line { display: block; }
a.dm-route, .bp-lab-point-list a.dm-route, .dm-pop a.dm-route { display: flex !important; width: max-content; max-width: 100%; align-items: center; min-height: 44px;
  margin: 0 !important; color: var(--bp-teal, #006B62) !important; font-weight: 600 !important; text-decoration: underline !important; text-underline-offset: 3px; }
.dm-row .dm-pk { margin-top: 8px !important; }
.dm-near__item a.dm-route { margin-top: 0 !important; }
.dm-full { margin-top: 8px !important; }

/* the filter's question mark: the standard's help control (T616 `.cx-help`), drawn here too until that sheet is on the page */
.dm-labelrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dm-find .dm-help { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -6px -8px 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 999px; background: transparent !important; color: var(--cx-ink-2, #3f5250) !important; cursor: pointer; }
.dm-find .dm-help > span { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid currentColor !important; border-radius: 999px;
  font-size: 15px !important; font-weight: 700 !important; line-height: 1 !important; }
.dm-find .dm-help:hover > span, .dm-find .dm-help:focus-visible > span { background: var(--cx-surface, #fff) !important; border-color: var(--cx-primary, #005859) !important; color: var(--cx-primary, #005859); }
.dm-find .dm-help:focus-visible { outline: 2px solid var(--cx-primary, #005859); outline-offset: 0; }
.dm-help__n { color: var(--cx-ink-2, #3f5250) !important; font-weight: 600; }

/* the draw points page at the page's full measure (the panels page's own width, shop.css's rule for its pages) */
body[data-draw-page] .app--nonav .content__inner { max-width: var(--content-max); }
.dm-page { max-width: none; padding-left: 0; padding-right: 0; }
.dm-page .dm-host { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.dm-page .dm-map { height: max(560px, 70vh); }
.dm-page__top { margin: 0 0 32px; }
.dm-page__top .cx-btn, .dm-page__back .cx-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; }
body[data-embed] .content { padding: 0 !important; }
body[data-embed] .app--nonav .content__inner { max-width: none; }
body[data-embed] .dm-page .dm-map { height: max(480px, 70vh); }
@media (max-width: 1024px) {
  .dm-page .dm-host { grid-template-columns: minmax(0, 1fr); }
  .dm-page .dm-map { height: max(480px, 60vh); }
}
@media (max-width: 767px) {
  .dm-page .dm-map { height: 420px; }
}

/* T626: the province list with a package chosen: the line that says so across the list, and a province where the package
   cannot be drawn quieter, with its one line inside */
.bp-lab-prov-grid > .dm-list-note { grid-column: 1 / -1; margin: 0 !important; font-size: 15px !important; color: var(--ink-2, #3E4A52); }
.bp-lab-prov.bp-lab-prov--none { border-color: var(--bp-sand, #DBD4CB) !important; }
.bp-lab-prov.bp-lab-prov--none summary { color: var(--ink-3, #5B6770) !important; font-weight: 500 !important; }
.dm-prov-none { margin: 0 !important; padding: 12px 18px 16px; font-size: 14px !important; line-height: 1.5; color: var(--ink-2, #3E4A52); border-top: 1px solid var(--bp-sand, #DBD4CB); }
