/* ==========================================================================
   Office maps (OpenStreetMap + Leaflet), used on Contact, About, Rwanda and Uganda
   ========================================================================== */
.office-map { position: relative; }
.office-map-frame {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  background: #e9eef3 url(../../img/2023/10/memphis_img2.png);
}
.office-map-canvas { position: relative; z-index: 0; width: 100%; height: 460px; background: transparent; }
.office-map.is-single .office-map-canvas { height: 400px; }
.office-map-canvas:focus-visible { outline: 3px solid var(--c-blue); outline-offset: -3px; }

/* Address list shown until the map is ready (and again if it cannot load) */
.office-map-fallback {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: 28px; background: rgba(248, 250, 252, .94);
  color: #333;
}
.office-map.is-ready .office-map-fallback { display: none; }
.office-map-fallback-title { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--f-head); font-size: var(--fs-h5); font-weight: 600; color: #000; }
.office-map-fallback-title .icon { color: var(--c-red); font-size: 22px; }
.office-map-fallback ul { list-style: none; display: grid; gap: 12px; }
.office-map-fallback li { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-small); }
.office-map-fallback strong { color: #000; font-family: var(--f-head); }
.office-map-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.office-map-links a, .office-map-caption-links a { color: var(--c-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.office-map-links a:hover, .office-map-caption-links a:hover { color: var(--c-red); }
.office-map-status { margin: 0; font-size: var(--fs-small); color: var(--c-navy); }
.office-map-status:empty { display: none; }
.office-map.is-failed .office-map-status { color: var(--c-red); font-weight: 600; }
.office-map.is-loading .office-map-fallback::after {
  content: ""; position: absolute; top: 18px; right: 18px; width: 18px; height: 18px;
  border: 2px solid var(--c-blue); border-right-color: transparent; border-radius: 50%;
  animation: office-map-spin .8s linear infinite;
}
@keyframes office-map-spin { to { transform: rotate(360deg); } }

/* Caption under a single-office map */
.office-map-caption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 12px 0 0; font-size: var(--fs-small); color: #333; }
.office-map-caption > .icon { color: var(--c-red); font-size: 18px; }
.office-map-caption em { font-style: normal; opacity: .8; }
.office-map-caption-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-left: auto; }

/* Pins and popups */
.office-pin { background: none; border: 0; }
.office-pin svg { display: block; filter: drop-shadow(0 3px 4px rgba(13, 30, 70, .35)); transition: transform .2s; transform-origin: 50% 100%; }
.office-pin:hover svg, .office-pin:focus svg { transform: scale(1.12); }
.office-pin:focus { outline: none; }
.office-pin:focus-visible svg { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 3px var(--c-blue)) drop-shadow(0 0 2px var(--c-blue)); }
.leaflet-container { font-family: var(--f-body); font-size: 13px; }
.leaflet-container a { color: var(--c-blue); }
.leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: 0 10px 30px -10px rgba(13, 30, 70, .45); }
.leaflet-popup-content { margin: 16px 18px; line-height: 1.5; }
.office-popup p { margin: 0 0 8px; }
.office-popup p:last-child { margin: 0; }
.office-popup-kicker { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--c-red); }
.office-popup-title { font-family: var(--f-head); font-size: 17px; font-weight: 700; color: #000; letter-spacing: -.3px; }
.office-popup-title:focus { outline: none; }
.office-popup-address { color: #444; }
.office-popup-note { font-size: 12px; color: #666; font-style: italic; }
.office-popup-contact a { font-weight: 600; }
.office-popup-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.office-popup-actions a {
  display: inline-flex; padding: 6px 10px; border-radius: var(--radius-sm);
  background: var(--c-blue); color: #fff !important; font-weight: 600; font-size: 12px;
}
.office-popup-actions a + a { background: var(--c-navy); }
.office-popup-actions a:hover { filter: brightness(1.1); }
.leaflet-control-attribution { font-size: 11px; }
.leaflet-bar a:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 1px; }

@media (max-width: 1024px) {
  .office-map-canvas { height: 400px; }
  .office-map.is-single .office-map-canvas { height: 340px; }
}
@media (max-width: 767px) {
  .office-map-canvas, .office-map.is-single .office-map-canvas { height: 340px; }
  .office-map-fallback { padding: 18px; justify-content: flex-start; overflow-y: auto; }
  .office-map-caption-links { margin-left: 0; }
}
