/* RobertBlok.com — Fullstack development */

/* =====================================================================
   Atlasmuseum — interactive map (artworkMap)
   Modern 2026 styling. Author: Robert Blok
   Uses the AtlasNova design tokens (defined globally on :root), with plain
   fallbacks so the map also looks right outside the AtlasNova skin.
   Class / id names are unchanged so the existing map.js keeps working.
   ===================================================================== */

.mapCtnr {
  position: relative;
  margin: 8px 0 16px;
}

/* =====================================================================
   Toolbar (search + recentre + counter)
   ===================================================================== */
.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 4px 0 12px;
}
.map-search-wrap {
  position: relative;
  flex: 1 1 320px;
  min-width: 220px;
  max-width: 520px;
}
.map-search {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 15px;
  color: var(--an-ink, #1b1c1e);
  background: #fff;
  border: 1px solid var(--an-line, #e7e7e2);
  border-radius: 999px;
  padding: 11px 18px;
  transition: border-color .15s, box-shadow .15s;
}
.map-search::placeholder { color: var(--an-ink-soft, #9a9ea3); }
.map-search:focus {
  outline: none;
  border-color: var(--an-yellow-dp, #e6c500);
  box-shadow: 0 0 0 3px rgba(251, 224, 35, .25);
}
/* RobertBlok.com — Fullstack development
   Secondary button from the site-wide button system (skin.css). */
.map-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--an-btn-h, 40px);
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--an-ink, #1b1c1e);
  background: #fff;
  border: 1px solid #dcdcd5;
  border-radius: var(--an-btn-r, 10px);
  box-shadow: 0 1px 2px rgba(20, 20, 20, .06);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .06s;
}
.map-reset::before {
  content: "";
  width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.map-reset:hover { background: #fafaf7; border-color: #c9c9c1; box-shadow: 0 4px 14px rgba(20, 20, 20, .12); }
.map-reset:active { transform: translateY(1px); }
.map-reset:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(251, 224, 35, .55); }
.map-count {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--an-ink-soft, #5c6268);
  margin-left: auto;
  white-space: nowrap;
}

/* OpenLayers fullscreen / scale-line theming */
#map .ol-full-screen {
  top: 12px;
  right: 12px;
  left: auto;
}
#map .ol-scale-line {
  background: rgba(255, 255, 255, .75);
  border-radius: 6px;
  padding: 1px 4px;
  left: 12px;
  bottom: 12px;
}

/* ---- Map canvas: a clean rounded card ---- */
#map {
  position: relative;
  width: 100%;
  height: 560px;
  background-color: #eceae2;
  border: 1px solid var(--an-line, #e7e7e2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(20, 20, 20, .08);
}

/* OpenLayers controls (zoom, attribution) rounded to match */
/* RobertBlok.com — Fullstack development
   Map controls: white, rounded, floating — same as every other map. */
#map .ol-control { background: transparent !important; padding: 0 !important; }
#map .ol-control button {
  width: 36px !important;
  height: 36px !important;
  margin: 0 0 6px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  background-color: rgba(255, 255, 255, .96) !important;
  color: var(--an-ink, #1b1c1e) !important;
  border: 1px solid rgba(0, 0, 0, .08) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(20, 20, 20, .15) !important;
}
#map .ol-control button:hover,
#map .ol-control button:focus {
  background-color: #fff !important;
  box-shadow: 0 4px 14px rgba(20, 20, 20, .2), 0 0 0 3px rgba(251, 224, 35, .55) !important;
  outline: none !important;
}
#map .ol-attribution {
  border-radius: 8px 0 0 0;
  font-size: 11px;
}

/* =====================================================================
   Legend — modern chips instead of a plain table
   ===================================================================== */
.mapLgd {
  margin: 14px 0 4px;
}
.mapLgd > table {
  width: 100%;
  border-collapse: collapse;
  display: block;
}
.mapLgd tbody,
.mapLgd tr {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  width: 100%;
}
.mapLgd td {
  width: auto;
  padding: 0;
  border: 0;
}
.mapLgdInput {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background: #faf9f4;
  border: 1px solid var(--an-line, #e7e7e2);
  border-radius: 999px;
  font-size: 13.5px;
  line-height: 1.2;
  color: var(--an-ink, #1b1c1e);
  cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
  user-select: none;
}
.mapLgdInput:hover {
  background: #fff;
  border-color: #d9d9d2;
  box-shadow: 0 2px 8px rgba(20, 20, 20, .06);
}
.mapLgdInput label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}
.mapLgd .imgWrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}
.mapLgd .imgWrapper img {
  max-width: 30px;
  max-height: 30px;
  width: auto;
  height: auto;
  vertical-align: middle;
}
.map-checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--an-yellow-dp, #e6c500);
  margin: 0;
}

/* Legacy legend list, if ever used */
#map_legend ul {
  column-count: 3;
  list-style: none;
  padding: 0;
}
#map_legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
}
#map_legend li img { vertical-align: middle; }

/* =====================================================================
   Pop-up (OpenLayers overlay + legacy infowindow)
   ===================================================================== */
#map-popup { visibility: hidden; }

.ol-popup,
.map-popup {
  position: absolute;
  background: #fff;
  padding: 16px 18px;
  border: 1px solid var(--an-line, #e7e7e2);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(20, 20, 20, .18);
  bottom: 14px;
  left: -50px;
  min-width: 290px;
}
.ol-popup:after,
.ol-popup:before {
  top: 100%;
  border: solid transparent;
  content: " ";
  height: 0; width: 0;
  position: absolute;
  pointer-events: none;
}
.ol-popup:after { border-top-color: #fff; border-width: 10px; left: 48px; margin-left: -10px; }
.ol-popup:before { border-top-color: var(--an-line, #e7e7e2); border-width: 11px; left: 48px; margin-left: -11px; }

.ol-popup-closer {
  text-decoration: none;
  position: absolute;
  top: 8px;
  right: 12px;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  color: var(--an-ink-soft, #5c6268);
  transition: background .12s, color .12s;
}
.ol-popup-closer:hover { background: #faf9f4; color: var(--an-ink, #1b1c1e); }
.ol-popup-closer:after { content: "✕"; font-size: 13px; }

#map-popup-content,
.map-popup-content,
.map_infowindow {
  max-width: 320px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--an-ink, #1b1c1e);
}

#map-popup-content h3,
.map_infowindow h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.3; }

#map-popup-content h3 a,
.map_infowindow h3 a {
  color: var(--an-ink, #1b1c1e);
  font-weight: 700;
  text-decoration: none;
}
#map-popup-content h3 a:hover,
.map_infowindow h3 a:hover { color: var(--an-yellow-dp, #b8860b); text-decoration: underline; }
#map-popup-content h3 a:visited,
.map_infowindow h3 a:visited { color: var(--an-ink, #1b1c1e); }

#map-popup-content_image,
.map_infowindow_image { width: 100%; text-align: center; }

#map-popup-content img,
.map_infowindow img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 150px;
  margin-bottom: 12px;
  border-radius: 10px;
}

#map-image-placeholder {
  width: 100%;
  height: 128px;
  background: #faf9f4;
  border-radius: 10px;
}

#map-popup-content li,
.map_infowindow li {
  padding: 6px 0;
  border-bottom: 1px solid var(--an-line, #ececeb);
  list-style: none;
}
#map-popup-content li:last-child,
.map_infowindow li:last-child { border-bottom: 0; }

#map-popup-content li span:first-child,
.map_infowindow li span:first-child {
  display: inline-block;
  float: left;
  width: 60px;
  font-weight: 600;
  color: var(--an-ink-soft, #5c6268);
}
#map-popup-content li span:nth-child(2) { display: inline-block; width: 190px; }
.map_infowindow li span:nth-child(2) { display: inline-block; width: 250px; }

/* =====================================================================
   Loader (kept — on-brand yellow dots)
   ===================================================================== */
#map-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
#map-loader-text {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--an-ink, #1b1c1e);
  margin-bottom: 20px;
}
#map-loader-disks { height: 50px; width: 100%; text-align: center; }
#map-loader-disks span {
  display: inline-block;
  margin-top: 10px;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background-color: var(--an-yellow, #fbe023);
}
#map-loader-disks span:not(:first-child) { margin-left: 10px; }
#map-loader-disks span:nth-child(1) { animation: move 1s ease-in-out 0s infinite alternate; }
#map-loader-disks span:nth-child(2) { animation: move 1s ease-in-out 0.5s infinite alternate; }
#map-loader-disks span:nth-child(3) { animation: move 1s ease-in-out 1s infinite alternate; }
#map-loader-disks span:nth-child(4) { animation: move 1s ease-in-out 1.5s infinite alternate; }

@keyframes move {
  from { transform: translateY(0px); }
  to { transform: translateY(-10px); }
}
