/* Base container */
.educo-mapdeckgl {
  width: 100%;
  position: relative;
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Full width (edge-to-edge) when alignfull is applied */
.educo-mapdeckgl.alignfull {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Full-bleed alignment that accounts for Twenty Twenty-Five root paddings */
:where(.wp-site-blocks) .educo-mapdeckgl.alignfull {
  left: auto;
  right: auto;
  width: calc(100vw - var(--wp--style--root--padding-left, 0px) - var(--wp--style--root--padding-right, 0px));
  max-width: none;
  margin-left: calc(50% - 50vw + var(--wp--style--root--padding-left, 0px));
  margin-right: calc(50% - 50vw + var(--wp--style--root--padding-right, 0px));
}

/* Ensure inner map canvas fills container */
.educo-mapdeckgl canvas {
  display: block;
}

.educo-mapdeckgl .educo-slide-loading-mask {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
  z-index: 6;
}

.educo-mapdeckgl .educo-slide-loading-mask.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Legend overlay */
.educo-mapdeckgl .educo-legend {
  position: absolute;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(4px);
  backdrop-filter: saturate(180%) blur(4px);
  color: #111;
  padding: 22px 14px 14px;
  border-radius: 0;
  border: 1px solid rgba(92, 45, 147, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  font-size: 14px;
  line-height: 1.4;
  width: min(92vw, 360px);
  max-width: min(92vw, 360px);
  pointer-events: auto;
  max-height: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.educo-mapdeckgl .educo-legend .legend-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  pointer-events: none;
  cursor: default;
  z-index: 2;
  border-radius: 0;
  overflow: hidden;
}

.educo-mapdeckgl .educo-legend .legend-progress-track {
  position: absolute;
  inset: 0;
  background: rgba(92, 45, 147, 0.2);
  overflow: hidden;
}

.educo-mapdeckgl .educo-legend .legend-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  border-radius: 0;
  background: #f29600;
  transition: width 240ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width;
}

.educo-mapdeckgl .educo-legend .legend-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.educo-mapdeckgl .educo-legend .legend-body::-webkit-scrollbar {
  width: 6px;
}

.educo-mapdeckgl .educo-legend .legend-body::-webkit-scrollbar-thumb {
  background: rgba(92, 45, 147, 0.4);
}

.educo-mapdeckgl .educo-legend .legend-body::-webkit-scrollbar-track {
  background: transparent;
}

.educo-mapdeckgl .educo-legend.pos-br { right: 12px; bottom: 12px; }
.educo-mapdeckgl .educo-legend.pos-bl { left: 12px; bottom: 12px; }
.educo-mapdeckgl .educo-legend.pos-tr { right: 12px; top: 12px; }
.educo-mapdeckgl .educo-legend.pos-tl { left: 12px; top: 12px; }

.educo-mapdeckgl .educo-legend .legend-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}

.educo-mapdeckgl .educo-legend .legend-description {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #2f1b4f;
  transition: opacity 0.18s ease;
}

.educo-mapdeckgl .educo-legend .legend-description.is-loading {
  opacity: 0.65;
  font-style: italic;
}

.educo-mapdeckgl .educo-legend .legend-loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  text-align: center;
}

.educo-mapdeckgl .educo-legend .legend-loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(68, 33, 115, 0.2);
  border-top-color: #5c2d93;
  animation: educo-loading-spin 0.9s linear infinite;
  flex-shrink: 0;
}

.educo-mapdeckgl .educo-legend .legend-loading-text {
  font-size: 14px;
  font-weight: 500;
}

.educo-mapdeckgl .educo-legend .legend-description p {
  margin: 0 0 0.6em;
}

.educo-mapdeckgl .educo-legend .legend-description p:last-child {
  margin-bottom: 0;
}

.educo-mapdeckgl .educo-legend .legend-description img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  height: auto;
}

.educo-mapdeckgl .educo-legend .legend-description figure.wp-caption {
  margin: 0 auto 12px;
  text-align: center;
}

.educo-mapdeckgl .educo-legend .legend-description figure.wp-caption:last-child {
  margin-bottom: 0;
}

.educo-mapdeckgl .educo-legend .legend-description .wp-caption-text {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #2f1b4f;
}

.educo-mapdeckgl .educo-legend .legend-description iframe {
  width: 100%;
  max-width: 100%;
  border: none;
  display: block;
  aspect-ratio: 16 / 9;
}

.educo-mapdeckgl .educo-legend .legend-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.educo-mapdeckgl .educo-legend .legend-controls .legend-prev,
.educo-mapdeckgl .educo-legend .legend-controls .legend-next {
  flex: 0 0 auto;
}

.educo-mapdeckgl .educo-legend .legend-prev,
.educo-mapdeckgl .educo-legend .legend-next {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.24);
  background: #5c2d93;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.educo-mapdeckgl .educo-legend .legend-prev {
  background: #80bb2a;
  border-color: rgba(74, 112, 22, 0.5);
  margin-right: 0;
}

.educo-mapdeckgl .educo-legend .legend-next:hover {
  background: #4b2083;
  border-color: rgba(52, 22, 88, 0.6);
}

.educo-mapdeckgl .educo-legend .legend-prev:hover {
  background: #6da926;
  border-color: rgba(74, 112, 22, 0.65);
}

.educo-mapdeckgl .educo-legend .legend-toggle {
  display: none;
  padding: 6px 12px;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.24);
  background: #1f2937;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.educo-mapdeckgl .educo-legend .legend-toggle:hover {
  background: #0f172a;
  border-color: rgba(15, 23, 42, 0.5);
}

.educo-mapdeckgl .educo-hover-card {
  position: absolute;
  z-index: 15;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 0;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
  white-space: pre-wrap;
  max-width: 260px;
}

.educo-mapdeckgl .educo-heat-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 11;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  line-height: 1.3;
  color: #0f172a;
  pointer-events: none;
}

.educo-mapdeckgl .educo-heat-legend .heat-legend-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #334155;
  text-align: center;
}

.educo-mapdeckgl .educo-heat-legend .heat-legend-scale {
  display: flex;
  align-items: center;
  gap: 8px;
}

.educo-mapdeckgl .educo-heat-legend .heat-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.educo-mapdeckgl .educo-heat-legend .heat-gradient {
  flex: 1 1 140px;
  min-width: 120px;
  height: 8px;
  border-radius: 0;
  background: linear-gradient(90deg, rgb(59, 130, 246) 0%, rgb(220, 38, 38) 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.educo-mapdeckgl .educo-category-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 12;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.14);
  font-size: 13px;
  line-height: 1.4;
  color: #0f172a;
  max-width: min(90vw, 280px);
  max-height: 260px;
  overflow-y: auto;
  pointer-events: auto;
}

.educo-mapdeckgl .educo-category-legend .category-legend-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
}

.educo-mapdeckgl .educo-category-legend .category-legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.educo-mapdeckgl .educo-category-legend .category-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
}

.educo-mapdeckgl .educo-category-legend .category-legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  background: #94a3b8;
  flex-shrink: 0;
}

.educo-mapdeckgl .educo-category-legend .category-legend-label {
  display: inline-block;
  font-weight: 500;
}

.educo-mapdeckgl .educo-timeline {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(320px, 90%);
  padding: 10px 14px;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
  pointer-events: auto;
}

.educo-mapdeckgl .educo-timeline .timeline-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.educo-mapdeckgl .educo-timeline .timeline-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.educo-mapdeckgl .educo-timeline .timeline-play {
  padding: 6px 10px;
  border: none;
  border-radius: 0;
  background: #f29600;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.educo-mapdeckgl .educo-timeline .timeline-play.is-playing {
  background: #80bb2a;
}

.educo-mapdeckgl .educo-timeline .timeline-play:focus-visible {
  outline: 2px solid #5c2d93;
  outline-offset: 2px;
}

.educo-mapdeckgl .educo-timeline .timeline-play[disabled] {
  opacity: 0.5;
  cursor: default;
}

.educo-mapdeckgl .educo-timeline .timeline-caption-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.educo-mapdeckgl .educo-timeline .timeline-value {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
}

.educo-mapdeckgl .educo-timeline .timeline-step {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}

.educo-mapdeckgl .educo-timeline .timeline-slider {
  width: 100%;
  flex: 1 1 auto;
  accent-color: #f29600;
  cursor: pointer;
}

.educo-mapdeckgl .educo-timeline .timeline-slider:disabled {
  opacity: 0.6;
  cursor: default;
}

.educo-mapdeckgl .educo-mobile-legend-button,
.educo-mapdeckgl .educo-mobile-layer-button {
  position: absolute;
  z-index: 25;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
  cursor: pointer;
  pointer-events: auto;
  line-height: 1.1;
}

.educo-mapdeckgl .educo-mobile-legend-button:focus-visible,
.educo-mapdeckgl .educo-mobile-layer-button:focus-visible {
  outline: 2px solid #f29600;
  outline-offset: 2px;
}

.educo-mapdeckgl .educo-mobile-layer-button {
  top: 12px;
  left: 12px;
}

.educo-mapdeckgl .educo-mobile-legend-button {
  top: 60px;
  left: 12px;
}

.educo-mapdeckgl.is-mobile .educo-mobile-legend-button.is-active {
  display: inline-flex;
}

.educo-mapdeckgl.is-mobile .educo-mobile-layer-button.is-visible {
  display: inline-flex;
}


.educo-mapdeckgl.is-mobile .educo-legend {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  max-width: none;
  max-height: none;
  border-radius: 0;
  border-width: 0;
  margin: 0;
  padding: 24px 18px 28px;
  gap: 18px;
}

.educo-mapdeckgl.is-mobile .educo-legend.pos-br,
.educo-mapdeckgl.is-mobile .educo-legend.pos-bl,
.educo-mapdeckgl.is-mobile .educo-legend.pos-tr,
.educo-mapdeckgl.is-mobile .educo-legend.pos-tl {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.educo-mapdeckgl.is-mobile .educo-legend .legend-body {
  padding-right: 0;
}

.educo-mapdeckgl.is-mobile .educo-legend .legend-controls {
  gap: 10px;
}

.educo-mapdeckgl.is-mobile .educo-legend .legend-prev,
.educo-mapdeckgl.is-mobile .educo-legend .legend-toggle,
.educo-mapdeckgl.is-mobile .educo-legend .legend-next {
  flex: 1 1 0;
  text-align: center;
}

.educo-mapdeckgl.is-mobile .educo-legend .legend-toggle {
  display: inline-block;
}

.educo-mapdeckgl.is-mobile .educo-timeline {
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  width: 100%;
  border-radius: 0;
  padding: 14px 18px;
  gap: 8px;
}

.educo-mapdeckgl.is-mobile:not(.legend-hidden) .educo-timeline {
  display: none !important;
}

.educo-mapdeckgl.is-mobile.legend-hidden .educo-heat-legend,
.educo-mapdeckgl.is-mobile.legend-hidden .educo-category-legend {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  max-width: min(88vw, 320px);
}

.educo-mapdeckgl.is-mobile.legend-hidden .educo-heat-legend {
  bottom: 100px;
  top: auto;
}

.educo-mapdeckgl.is-mobile.legend-hidden .educo-category-legend {
  bottom: 176px;
  top: auto;
  align-items: center;
  text-align: center;
}

.educo-mapdeckgl.is-mobile.legend-hidden .educo-category-legend .category-legend-list {
  width: 100%;
}

.educo-mapdeckgl .educo-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  z-index: 30;
  color: #111;
  text-align: center;
}

.educo-mapdeckgl .educo-loading-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.educo-mapdeckgl .educo-loading-spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 320px;
}

.educo-mapdeckgl .educo-loading-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(17, 17, 17, 0.15);
  border-top-color: #5c2d93;
  animation: educo-loading-spin 0.9s linear infinite;
}

.educo-mapdeckgl .educo-loading-message {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.educo-mapdeckgl .educo-loading-error {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 360px;
}

.educo-mapdeckgl .educo-loading-overlay.has-error .educo-loading-spinner-wrap {
  display: none;
}

.educo-mapdeckgl .educo-loading-overlay.has-error .educo-loading-error {
  display: flex;
}

.educo-mapdeckgl .educo-loading-error-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.educo-mapdeckgl .educo-loading-error-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}

.educo-mapdeckgl .educo-loading-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid #5c2d93;
  background: #5c2d93;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.educo-mapdeckgl .educo-loading-retry:hover,
.educo-mapdeckgl .educo-loading-retry:focus-visible {
  background: #442173;
  border-color: #442173;
  color: #fff;
  outline: none;
}

.educo-mapdeckgl .educo-loading-retry:focus-visible {
  box-shadow: 0 0 0 2px rgba(68, 33, 115, 0.25);
}

@keyframes educo-loading-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
