/* ICR Europe Map — Dark Theme v5 */

/* ====== WRAPPER ====== */
.icr-map-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 440.5 / 582.9 !important;
  height: auto !important;
  background: transparent;
  overflow: hidden;
  border-radius: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  min-height: 0;
  box-sizing: border-box;
}

.icr-map-fullwidth {
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  max-width: 100vw !important;
  width: 100vw !important;
  border-radius: 0 !important;
}

/* ====== LOADING ====== */
.icr-map-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: transparent;
  color: #999;
  font-size: 13px;
  z-index: 50;
  transition: opacity .5s ease;
}
.icr-map-loading.hidden { opacity: 0; pointer-events: none; }

.icr-map-loading-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #DC4D41;
  box-shadow: 0 0 10px 3px rgba(220,77,65,0.45);
  animation: icrPulse 1.4s ease-in-out infinite;
}
@keyframes icrPulse {
  0%,100%{ transform:scale(1); opacity:1; }
  50%    { transform:scale(1.8); opacity:.5; }
}

/* ====== CONTAINER & SVG ====== */
.icr-map-container {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

#icr-world-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ====== MAP PATHS — blue outline, semi-transparent fill (sits on Elementor dark bg) ====== */
.icr-continents path,
.icr-continents circle {
  fill: #D9D9D9 !important;
  stroke: rgba(255,255,255,0.35) !important;
  stroke-width: 0.6 !important;
  transition: fill .18s ease;
}
.icr-continents path:hover,
.icr-continents circle:hover {
  fill: #BFBFBF !important;
}

/* ====== PINS ====== */
.icr-pin { cursor: pointer; }

.icr-pin .pin-dot {
  transition: r .2s cubic-bezier(0.34,1.56,0.64,1);
}
.icr-pin .pin-marker {
  transition: transform .2s cubic-bezier(0.34,1.56,0.64,1);
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.icr-pin:hover .pin-marker,
.icr-pin.active .pin-marker {
  transform: scale(1.18);
}
.pin-marker-hole { pointer-events: none; }
/* Primary pin — orange (head office) */
.icr-pin.pin-orange .pin-dot {
  fill: #E8732A;
  stroke: #fff;
  stroke-width: 0.15;
  filter: drop-shadow(0 0.3px 1px rgba(232,115,42,0.6));
}
.icr-pin.pin-orange:hover .pin-dot,
.icr-pin.pin-orange.active .pin-dot {
  r: 4.3 !important;
  filter: drop-shadow(0 0.4px 1.5px rgba(232,115,42,0.8));
}
.icr-pin.pin-orange .pin-marker {
  fill: #E8732A;
  stroke: #fff;
  stroke-width: 0.4;
  filter: drop-shadow(0 0.6px 1.5px rgba(232,115,42,0.7));
}
.icr-pin.pin-orange .pin-marker-hole { fill: #fff; }

/* Secondary pin — white (branch/partner) */
.icr-pin.pin-white .pin-dot {
  fill: #ffffff;
  stroke: rgba(255,255,255,0.4);
  stroke-width: 0.1;
  filter: drop-shadow(0 0.3px 0.8px rgba(0,0,0,0.3));
}
.icr-pin.pin-white:hover .pin-dot,
.icr-pin.pin-white.active .pin-dot {
  r: 4.3 !important;
  filter: drop-shadow(0 0.4px 1.2px rgba(255,255,255,0.6));
}
.icr-pin.pin-white .pin-marker {
  fill: #D32012;
  stroke: #fff;
  stroke-width: 0.4;
  filter: drop-shadow(0 0.6px 1.5px rgba(211,32,18,0.6));
}
.icr-pin.pin-white .pin-marker-hole { fill: #fff; }

/* Other locations — maroon (not a PBS office, e.g. partner hubs) */
.icr-pin.pin-maroon .pin-dot {
  fill: #800000;
  stroke: #fff;
  stroke-width: 0.15;
  filter: drop-shadow(0 0.3px 1px rgba(128,0,0,0.6));
}
.icr-pin.pin-maroon:hover .pin-dot,
.icr-pin.pin-maroon.active .pin-dot {
  r: 4.3 !important;
  filter: drop-shadow(0 0.4px 1.5px rgba(128,0,0,0.8));
}

/* Hover glow ring */
.icr-pin .pin-glow {
  fill: none; stroke: transparent; stroke-width: 0;
  transition: stroke-width .2s ease, opacity .2s ease;
  opacity: 0;
}
.icr-pin.pin-orange:hover .pin-glow,
.icr-pin.pin-orange.active .pin-glow {
  stroke: rgba(232,115,42,0.4);
  stroke-width: 0.8;
  opacity: 1;
}
.icr-pin.pin-white:hover .pin-glow,
.icr-pin.pin-white.active .pin-glow {
  stroke: rgba(255,255,255,0.25);
  stroke-width: 0.8;
  opacity: 1;
}
.icr-pin.pin-maroon:hover .pin-glow,
.icr-pin.pin-maroon.active .pin-glow {
  stroke: rgba(128,0,0,0.4);
  stroke-width: 0.8;
  opacity: 1;
}

/* Ripple for primary pins */
.icr-pin.pin-orange .pin-ripple {
  fill: none;
  stroke: rgba(232,115,42,0.6);
  stroke-width: 0.5;
  animation: icrRipple 2.5s ease-out infinite;
  opacity: 0.7;
}
@keyframes icrRipple {
  0%  { r: 1.4; opacity: .7; }
  100%{ r: 3.6;  opacity: 0;  }
}
.icr-pin.pin-orange .pin-ripple2 {
  fill: none;
  stroke: rgba(232,115,42,0.4);
  stroke-width: 0.3;
  animation: icrRipple 2.5s ease-out infinite 1.25s;
  opacity: 0;
}

/* ====== POPUP — light card (Image 1 style) ====== */
.icr-popup {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 300px;
  max-width: calc(100% - 32px);
  background: #ffffff;
  border: 1px solid #e0e4ea;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transition: opacity .22s ease, transform .22s ease;
  overflow: hidden;
}
.icr-popup.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.icr-popup-close {
  position: absolute; top: 10px; right: 10px;
  background: #e8732a;
  border: none;
  border-radius: 50%;
  width: auto; height: auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 14px;
  color: #fff;
  cursor: pointer;
  transition: background .15s, transform .15s;
  font-weight: 700;
  z-index: 10;
  padding: 7px 10px 8px 10px;
}
.icr-popup-close:hover,.icr-popup-close:focus:hover {
  background: #d46019;

}
.icr-popup-close:focus{background: #e8732a;outline;none;}

.icr-popup-inner { padding: 22px 16px 18px; }

.icr-popup-type {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: #E8732A;
  margin-bottom: 4px;
}

.icr-popup-country {
  display: flex; align-items: center; gap: 5px;
  position: absolute; top: 18px; right: 48px;
  font-size: 13px; font-weight: 700;
  color: #1a2d4a;
}
.icr-flag { font-size: 16px; line-height: 1; }

.icr-popup-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a2d4a;
  margin: 8px 0 10px;
  line-height: 1.3;
}

.icr-popup-divider {
  border: none; height: 1px;
  background: #e8edf3;
  margin: 0 0 14px;
}

.icr-popup-address {
  font-size: 13px;
  color: #4a5a6a;
  line-height: 1.7;
  margin-bottom: 12px;
}

.icr-popup-contact {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
}
.icr-popup-contact-row {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 13px;
}
.icr-popup-contact-label {
  font-weight: 700;
  color: #E8732A;
  min-width: 40px;
  flex-shrink: 0;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.icr-popup-contact-value { color: #1a2d4a; word-break: break-all; }
.icr-popup-contact-value a {
  color: #1a2d4a;
  text-decoration: none;
  transition: color .15s;
}
.icr-popup-contact-value a:hover {
  color: #E8732A;
  text-decoration: underline;
}

.icr-popup-logos {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e8edf3;
  margin-top: 4px;
}
.icr-popup-logos img { max-height: 36px; max-width: 90px; object-fit: contain; opacity: 1; }
.icr-popup-thumb { max-height: 36px; max-width: 110px; object-fit: contain; border-radius: 3px; opacity: 1; }

/* Regional contact card — name, role, headshot, direct phone/email */
.icr-popup-regional-contact {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid #e8edf3;
}
.icr-popup-headshot {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #e0e4ea;
}
.icr-popup-regional-contact-info { min-width: 0; flex: 1; }
.icr-popup-regional-contact-name {
  font-weight: 700;
  font-size: 13.5px;
  color: #1a2d4a;
}
.icr-popup-regional-contact-role {
  font-size: 12px;
  color: #6a7a8a;
  margin-bottom: 6px;
}

/* Icon-led contact rows (email/phone/LinkedIn) — matches the site's
   existing red icon badges instead of text labels like EMAIL / TEL. */
.icr-icon-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
  text-decoration: none;
}
.icr-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #D32012;
  flex-shrink: 0;
}
.icr-icon-row-value { color: #1a2d4a; word-break: break-all; }
.icr-icon-row-value a {
  color: #1a2d4a;
  text-decoration: none;
  transition: color .15s;
}
.icr-icon-row-value a:hover {
  color: #D32012;
  text-decoration: underline;
}
.icr-linkedin-row {
  margin-top: 4px;
  cursor: pointer;
}
.icr-linkedin-row-label {
  color: #6a7a8a;
  font-weight: 600;
  transition: color .15s;
}
.icr-linkedin-row:hover .icr-linkedin-row-label { color: #D32012; }


/* Subtle affordance so hover-enabled pins (e.g. Aberdeen, Teesside) read
   as interactive at a glance, without changing their base color. */
.icr-pin.icr-pin-hoverable .pin-dot {
  stroke-width: 0.3;
}

.icr-map-notice {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(20,32,48,0.85);
  color: #8aa0bb; font-size: 12px;
  padding: 8px 18px; border-radius: 4px;
  border: 1px solid #2d4a6a;
  pointer-events: none; z-index: 10; white-space: nowrap;
}

@media(max-width:600px){
  .icr-popup { width: calc(100% - 28px); left: 14px; right: 14px; top: 14px; }
}

g.icr-pin.pin-white.active:focus {
    outline: none;
}
g.icr-pin.pin-white:focus {
    outline: none;
}