/* Integration layout; typography is centralized in typography.css. */
/* Wordmark font, weight and tracking continue to come directly from B's styles. */
.lido-client {
  --atlas-ease: cubic-bezier(0.23, 1, 0.32, 1);
}
.lido-client .v4-flat-view[hidden],
.lido-client .v4-flat-view [hidden] {
  display: none !important;
}
.client-map-levels {
  position: absolute;
  z-index: 1003;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  max-width: calc(100% - 16px);
  padding: 3px;
  border: 1px solid #8ebbb6;
  border-radius: 3px;
  background: #102d40;
  color: #edf4f5;
}
.client-map-levels button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.client-map-levels button[aria-pressed="true"] {
  background: #c7e3d5;
  color: #102d40;
}
.client-map-levels button:disabled {
  opacity: 0.5;
  cursor: default;
}
.client-map-levels button:focus-visible {
  outline: 3px solid #ffa17c;
  outline-offset: -2px;
}
.lido-client .v4-flat-view {
  z-index: 30;
  overflow: hidden;
  border-radius: 8px;
}
.lido-client .v4-flat-view .leaflet-top.leaflet-right,
.lido-client .v4-aerial-map .maplibregl-ctrl-top-right {
  top: 64px;
  right: 10px;
}
.lido-client .aerial-actions {
  top: 218px;
  right: 10px;
}
.lido-client .is-aerial [data-regional-footer] {
  visibility: hidden;
}
.lido-client .globe-viewport.is-flat :is(.globe-dock, .globe-rotation-toggle, .globe-map-modes) {
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 600px) {
  .client-map-levels button {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* Original A replay presentation, confined to B's chart panel. */
#live-data.history-b .archive-replay {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(260px, 1fr);
  align-items: end;
  gap: 14px 40px;
  border-bottom: 1px solid #c2d3da;
  background: #fff5ec;
  padding: 22px 28px 20px;
}

#live-data.history-b .archive-replay-heading,
#live-data.history-b .archive-replay-time {
  min-width: 0;
}

#live-data.history-b .archive-replay-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

#live-data.history-b .archive-replay-label,
#live-data.history-b .archive-replay-mode {
  color: #153e56;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#live-data.history-b .archive-replay-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

#live-data.history-b .archive-replay-label i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f08764;
  box-shadow: 0 0 0 5px rgba(240, 135, 100, 0.13);
}

#live-data.history-b .archive-replay-mode {
  color: #7b5b4e;
  font-weight: 500;
}

#live-data.history-b .archive-replay-time {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

#live-data.history-b .archive-replay-time strong {
  color: #153e56;
  font-size: 19px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

#live-data.history-b .archive-replay-time span {
  min-width: 0;
  color: #6d4b3d;
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
  overflow-wrap: anywhere;
}

#live-data.history-b .archive-replay-progress {
  --replay-progress: 0;
  grid-column: 1 / -1;
  position: relative;
  height: 4px;
  overflow: hidden;
  background: #d7c5b9;
}

#live-data.history-b .archive-replay-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: #153e56;
  transform: scaleX(var(--replay-progress));
  transform-origin: left center;
  transition: transform 240ms linear;
}

#live-data.history-b .archive-replay > p {
  grid-column: 1 / -1;
  margin: 0;
  color: #6d4b3d;
  font-size: 11px;
  line-height: 1.45;
}

#live-data.history-b .archive-replay[data-playback="complete"] .archive-replay-label i {
  background: #166a63;
  box-shadow: 0 0 0 5px rgba(22, 106, 99, 0.12);
}

#live-data.history-b .archive-replay[data-playback="unavailable"] .archive-replay-label i {
  background: #8ca4af;
  box-shadow: none;
}

#live-data.history-b [data-timeline-range]:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

@media (max-width: 800px) {
  #live-data.history-b .archive-replay {
    grid-template-columns: 1fr;
  }

  #live-data.history-b .archive-replay-time,
  #live-data.history-b .archive-replay-progress,
  #live-data.history-b .archive-replay > p {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  #live-data.history-b .archive-replay {
    gap: 12px;
    padding: 20px 18px;
  }

  #live-data.history-b .archive-replay-heading,
  #live-data.history-b .archive-replay-time {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #live-data.history-b .archive-replay-time span {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  #live-data.history-b .archive-replay-progress span {
    transition: none;
  }
}

#live-data.history-b [data-replay-toggle] {
  justify-self: start;
  min-height: 44px;
  border: 1px solid #153e56;
  padding: 8px 14px;
  border-radius: 3px;
  color: #153e56;
  background: transparent;
  cursor: pointer;
}
#live-data.history-b [data-replay-toggle]:focus-visible {
  outline: 3px solid #b75e35;
  outline-offset: 3px;
}
/* Original V4 station fiche treatment, confined to the active geographic explorer.
   Its verified metadata/resource controls continue to be supplied by B. */
.lido-client
  .hero-visual[data-client-map-level]:not([data-client-map-level="global"])
  .station-popover {
  border: 1px solid #668a9b;
  border-radius: 3px;
  box-shadow: none;
  background: #153e56;
  color: #fff;
  padding: 30px;
}
.lido-client
  .hero-visual[data-client-map-level]:not([data-client-map-level="global"])
  .station-popover
  h3 {
  font-size: clamp(22px, 2.3vw, 34px);
  font-weight: 500;
  color: #fff;
}
.lido-client
  .hero-visual[data-client-map-level]:not([data-client-map-level="global"])
  .station-meta
  dt {
  color: #c9dce3;
}
.lido-client
  .hero-visual[data-client-map-level]:not([data-client-map-level="global"])
  .station-popover-close {
  border-radius: 2px;
  min-width: 44px;
  min-height: 44px;
}
@media (max-width: 480px) {
  .lido-client
    .hero-visual[data-client-map-level]:not([data-client-map-level="global"])
    .station-popover {
    padding: 24px 18px;
  }
  .lido-client
    .hero-visual[data-client-map-level]:not([data-client-map-level="global"])
    .station-popover
    h3 {
    padding-right: 36px;
    font-size: 22px;
  }
}

/* Adapt third-party map typography without changing vendored sources. */
.lido-client .leaflet-container,
.lido-client .leaflet-control-zoom-in,
.lido-client .leaflet-control-zoom-out,
.lido-client .leaflet-container a.leaflet-popup-close-button,
.lido-client .maplibregl-map,
.lido-client .maplibregl-map a.maplibregl-ctrl-logo {
  font-family: var(--font-ui);
}
