.search-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.search-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
}

.search-brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--cyan));
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(18,114,232,.22);
}

.search-brand strong,
.search-brand small {
  display: block;
}

.search-brand strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
}

.search-brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: .67rem;
}

.search-page-main {
  flex: 1;
  padding: 70px 0 90px;
}

.search-page-content {
  max-width: 1180px;
}

.search-page-heading {
  max-width: 900px;
  margin: 0 auto 30px;
  text-align: center;
}

.search-page-heading h1 {
  margin: 17px 0 13px;
  color: var(--navy);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.search-page-heading p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.02rem;
}

.search-page-card {
  position: relative;
  z-index: 5;
  padding: clamp(20px, 4vw, 35px);
  border: 1px solid var(--line);
  border-radius: 27px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}

.national-search-form {
  width: 100%;
}

.search-filter-bar {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 17px;
}

.search-filter-bar .filter-control {
  display: grid;
  gap: 7px;
}

.filter-label {
  color: var(--navy);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.search-filter-bar select {
  width: 100%;
  min-height: 48px;
  padding: 0 43px 0 15px;
  border: 1px solid #cfdeea;
  border-radius: 14px;
  color: var(--navy);
  background:
    linear-gradient(45deg, transparent 50%, #547087 50%)
      calc(100% - 20px) 20px / 6px 6px no-repeat,
    linear-gradient(135deg, #547087 50%, transparent 50%)
      calc(100% - 14px) 20px / 6px 6px no-repeat,
    #fff;
  font: inherit;
  font-size: .86rem;
  font-weight: 700;
  appearance: none;
  cursor: pointer;
}

.search-filter-bar select:focus-visible {
  outline: 3px solid rgba(18,114,232,.18);
  border-color: var(--blue);
}

.entity-availability {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid #dbe7e1;
  border-radius: 14px;
  color: #587166;
  background: #f5faf7;
  font-size: .72rem;
  font-weight: 720;
  line-height: 1.45;
}

.entity-availability.is-error {
  color: #9b433c;
  border-color: #eed4d1;
  background: #fff7f6;
}

.clear-state-filter {
  min-height: 48px;
  padding: 0 17px;
  border: 1px solid #cfdeea;
  border-radius: 14px;
  color: #31526d;
  background: #fff;
  font: inherit;
  font-size: .75rem;
  font-weight: 850;
  cursor: pointer;
}

.clear-state-filter:hover {
  color: var(--blue);
  border-color: rgba(18,114,232,.42);
}

.search-page .company-search-wrap,
.search-page .search-box {
  width: 100%;
  max-width: none;
}

.search-page .search-results {
  position: static;
  inset: auto;
  max-height: none;
  margin-top: 13px;
  box-shadow: 0 15px 40px rgba(7,26,45,.10);
}

.search-page .search-help {
  margin: 12px 5px 0;
}

.search-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 21px;
}

.search-source-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.78);
}

.search-source-grid strong {
  color: var(--navy);
  font-size: .84rem;
}

.search-source-grid p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}

.source-dot {
  width: 13px;
  height: 13px;
  margin-top: 5px;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(18,114,232,.09);
}

.source-dot-confiometro { background: var(--blue); }
.source-dot-denue { background: #d19b17; }
.source-dot-scian { background: #16a27a; }

/* ===============================================================
   MAPA NACIONAL DEL BUSCADOR
================================================================ */

.search-coverage-section {
  margin-top: 68px;
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid #d9e7e1;
  border-radius: 32px;
  background:
    radial-gradient(circle at 92% 8%, rgba(31,153,110,.12), transparent 27%),
    linear-gradient(145deg, #f9fcfb, #edf7f3);
  box-shadow: 0 25px 70px rgba(8, 52, 38, .08);
}

.search-coverage-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: end;
  margin-bottom: 27px;
}

.search-coverage-heading h2 {
  margin: 12px 0 11px;
  color: var(--navy);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  line-height: 1.03;
  letter-spacing: -.05em;
}

.search-coverage-heading p {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-coverage-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(145px, 1fr));
  gap: 11px;
}

.search-coverage-summary article {
  min-width: 150px;
  padding: 17px 19px;
  border: 1px solid #d5e6de;
  border-radius: 17px;
  background: rgba(255,255,255,.88);
}

.search-coverage-summary span {
  display: block;
  margin-bottom: 7px;
  color: #718178;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.search-coverage-summary strong {
  color: #0c6f50;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.48rem;
}

.search-coverage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .76fr);
  gap: 20px;
}

.search-map-card,
.search-map-detail {
  position: relative;
  border: 1px solid #d5e4dd;
  border-radius: 25px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 22px 55px rgba(10,54,39,.08);
}

.search-map-card {
  margin: 0;
  overflow: hidden;
  padding: 19px;
}

.search-map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 0 4px 14px;
}

.search-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  color: #62736b;
  font-size: .69rem;
  font-weight: 750;
}

.search-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.search-map-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.legend-ready {
  background: #0f8a61;
  box-shadow: 0 0 0 4px rgba(15,138,97,.13);
}

.legend-pending {
  background: #d2dfd9;
}

.coverage-edition {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: #0e7052;
  background: #e3f3ec;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .05em;
}

.mexico-map-stage {
  min-height: 410px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 48% 54%, rgba(31,153,110,.09), transparent 47%),
    linear-gradient(145deg, #f7fbf9, #edf6f2);
}

.mexico-map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(18,101,75,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,101,75,.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}

.mexico-map-stage img {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 15px 22px rgba(16,55,43,.10));
  user-select: none;
  pointer-events: none;
}

.mexico-map-markers {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.denue-state-marker {
  width: 18px;
  height: 18px;
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #0e8a61;
  box-shadow:
    0 0 0 5px rgba(14,138,97,.15),
    0 7px 16px rgba(9,83,57,.28);
  cursor: pointer;
  pointer-events: auto;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background-color .18s ease;
}

.denue-state-marker::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(14,138,97,.35);
  border-radius: 50%;
  animation: denue-marker-pulse 2.3s ease-out infinite;
}

.denue-state-marker::after {
  content: attr(data-state-name);
  min-width: max-content;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translate(-50%, 5px);
  padding: 7px 10px;
  border-radius: 9px;
  color: #fff;
  background: #0a3e2e;
  box-shadow: 0 9px 24px rgba(0,0,0,.18);
  font-family: inherit;
  font-size: .68rem;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.denue-state-marker:hover,
.denue-state-marker:focus-visible,
.denue-state-marker.is-selected {
  transform: translate(-50%, -50%) scale(1.28);
  background: #0b6f50;
  box-shadow:
    0 0 0 7px rgba(14,138,97,.20),
    0 10px 20px rgba(9,83,57,.33);
}

.denue-state-marker:hover::after,
.denue-state-marker:focus-visible::after,
.denue-state-marker.is-selected::after {
  transform: translate(-50%, 0);
  opacity: 1;
}

.denue-state-marker:focus-visible {
  outline: 3px solid rgba(18,114,232,.35);
  outline-offset: 5px;
}

.coverage-map-loading {
  position: absolute;
  z-index: 5;
  padding: 11px 14px;
  border: 1px solid #d7e5df;
  border-radius: 12px;
  color: #607269;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 30px rgba(10,54,39,.08);
  font-size: .76rem;
  font-weight: 800;
}

.coverage-map-loading.is-hidden {
  display: none;
}

.search-map-card figcaption {
  padding: 12px 6px 0;
  color: #7a8982;
  font-size: .64rem;
  line-height: 1.5;
}

.search-map-detail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(24px, 4vw, 35px);
}

.search-map-detail::after {
  content: "";
  width: 220px;
  height: 220px;
  position: absolute;
  right: -105px;
  bottom: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24,164,113,.14), transparent 66%);
  pointer-events: none;
}

.coverage-detail-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 25px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #0a7050;
  background: #e5f5ed;
  font-size: .68rem;
  font-weight: 900;
}

.coverage-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0b8c61;
  box-shadow: 0 0 0 4px rgba(11,140,97,.13);
}

.coverage-state-code {
  color: #1a8563;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.search-map-detail h3 {
  margin: 9px 0 12px;
  color: var(--navy);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.55rem);
  line-height: 1.03;
  letter-spacing: -.045em;
}

.search-map-detail > p {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.68;
}

.coverage-detail-stats {
  display: grid;
  gap: 0;
  margin: 25px 0;
  border-top: 1px solid #e0ebe6;
}

.coverage-detail-stats div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid #e0ebe6;
}

.coverage-detail-stats dt {
  color: #718078;
  font-size: .72rem;
}

.coverage-detail-stats dd {
  margin: 0;
  color: #173b2e;
  text-align: right;
  font-size: .75rem;
  font-weight: 900;
}

.coverage-search-button {
  width: 100%;
  position: relative;
  z-index: 1;
  justify-content: space-between;
  margin-top: auto;
}

.coverage-search-button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.coverage-active-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.coverage-state-chip {
  padding: 7px 9px;
  border: 1px solid #d6e5de;
  border-radius: 999px;
  color: #4b655a;
  background: #fff;
  font: inherit;
  font-size: .65rem;
  font-weight: 850;
  cursor: pointer;
}

.coverage-state-chip:hover,
.coverage-state-chip.is-selected {
  color: #fff;
  border-color: #0c7a57;
  background: #0c7a57;
}

@keyframes denue-marker-pulse {
  0% {
    transform: scale(.75);
    opacity: .7;
  }

  80%,
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

.search-page-footer {
  padding: 23px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.88);
  font-size: .76rem;
}

.search-page-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 980px) {
  .search-filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .clear-state-filter {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .search-coverage-heading,
  .search-coverage-layout {
    grid-template-columns: 1fr;
  }

  .search-coverage-summary {
    width: 100%;
  }

  .mexico-map-stage {
    min-height: 350px;
  }
}

@media (max-width: 760px) {
  .search-page-main {
    padding-top: 45px;
  }

  .search-source-grid,
  .search-filter-bar {
    grid-template-columns: 1fr;
  }

  .search-page-footer .container {
    flex-direction: column;
  }

  .search-coverage-section {
    padding: 20px 14px;
    border-radius: 24px;
  }
}

@media (max-width: 620px) {
  .search-brand small {
    display: none;
  }

  .search-page .search-box {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .search-page .search-box button {
    grid-column: 1 / -1;
  }

  .search-coverage-summary {
    grid-template-columns: 1fr 1fr;
  }

  .search-coverage-summary article {
    min-width: 0;
    padding: 14px;
  }

  .search-coverage-summary strong {
    font-size: 1.18rem;
  }

  .search-map-card {
    padding: 11px;
    border-radius: 20px;
  }

  .search-map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .mexico-map-stage {
    min-height: 255px;
  }

  .denue-state-marker {
    width: 16px;
    height: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .denue-state-marker::before {
    animation: none;
  }
}


/* ===============================================================
   PAGINACIÓN DE RESULTADOS DENUE
================================================================ */

.search-results-more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 13px;
  padding: 18px 15px 6px;
  border-top: 1px solid #e1eaf1;
}

.search-results-more[hidden] {
  display: none;
}

.search-results-more-button {
  min-height: 45px;
  padding: 0 22px;
  border: 1px solid rgba(18,114,232,.28);
  border-radius: 13px;
  color: #0d63c6;
  background: #f3f8ff;
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background-color .18s ease;
}

.search-results-more-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(18,114,232,.55);
  background: #eaf3ff;
}

.search-results-more-button:focus-visible {
  outline: 3px solid rgba(18,114,232,.20);
  outline-offset: 3px;
}

.search-results-more-button:disabled {
  opacity: .58;
  cursor: wait;
}

.search-results-more-status {
  color: #718298;
  font-size: .7rem;
  font-weight: 700;
}

@media (max-width: 620px) {
  .search-results-more {
    align-items: stretch;
    flex-direction: column;
  }

  .search-results-more-button {
    width: 100%;
  }

  .search-results-more-status {
    text-align: center;
  }
}


/* ===============================================================
   SELECTOR MULTIESTADO V4
================================================================ */

.state-multiselect {
  position: relative;
  min-width: 0;
}

.state-multiselect-toggle {
  width: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border: 0;
  color: var(--navy);
  background: transparent;
  font: inherit;
  font-size: .86rem;
  font-weight: 850;
  cursor: pointer;
}

.state-multiselect-toggle:disabled {
  opacity: .55;
  cursor: wait;
}

.state-multiselect-toggle > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-multiselect-toggle i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  transform: rotate(45deg) translateY(-3px);
  border-right: 2px solid #536c82;
  border-bottom: 2px solid #536c82;
  transition: transform .18s ease;
}

.state-multiselect-toggle[aria-expanded="true"] i {
  transform: rotate(225deg) translate(-2px, -1px);
}

.state-multiselect-menu {
  width: min(430px, calc(100vw - 30px));
  max-height: min(590px, 72vh);
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 260;
  overflow: hidden;
  border: 1px solid #ccdce8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 26px 65px rgba(7,26,45,.22);
}

.state-multiselect-menu[hidden] {
  display: none;
}

.state-multiselect-head,
.state-multiselect-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 14px 16px;
}

.state-multiselect-head {
  border-bottom: 1px solid #e2ebf2;
}

.state-multiselect-head strong {
  color: var(--navy);
  font-size: .77rem;
}

.state-close-button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: #557087;
  background: #f0f5f8;
  font: inherit;
  font-size: 1.18rem;
  cursor: pointer;
}

.state-options-list {
  max-height: 350px;
  overflow-y: auto;
  padding: 7px;
  overscroll-behavior: contain;
}

.state-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 10px 11px;
  border-radius: 11px;
  color: var(--navy);
  cursor: pointer;
}

.state-option:hover {
  background: #f2f7fb;
}

.state-option-all {
  margin: 7px;
  border: 1px solid #dbe7ef;
  background: #f7fafc;
}

.state-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.state-option span,
.state-option strong,
.state-option small {
  display: block;
  min-width: 0;
}

.state-option strong {
  font-size: .76rem;
  line-height: 1.25;
}

.state-option small {
  margin-top: 2px;
  color: #7a8ea1;
  font-size: .63rem;
  line-height: 1.3;
}

.state-multiselect-footer {
  border-top: 1px solid #e2ebf2;
  background: #f8fbfd;
}

.state-multiselect-footer > span {
  color: #60778b;
  font-size: .67rem;
  font-weight: 800;
}

.state-apply-button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  font: inherit;
  font-size: .7rem;
  font-weight: 900;
  cursor: pointer;
}

.state-multiselect-home-unused {
  min-width: 200px;
  align-self: stretch;
  border-left: 1px solid var(--line);
}

.state-multiselect-home-unused .state-multiselect-menu {
  right: -3px;
}

@media (max-width: 760px) {
  .state-multiselect-home-unused {
    width: 100%;
    min-height: 54px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .state-multiselect-home-unused .state-multiselect-menu {
    right: auto;
    left: 0;
  }
}


.state-multiselect-page {
  width: 100%;
}

.state-multiselect-page .state-multiselect-toggle {
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid #cfdeea;
  border-radius: 14px;
  background: #fff;
  text-align: left;
}

.state-multiselect-page .state-multiselect-toggle:focus-visible {
  outline: 3px solid rgba(18,114,232,.18);
  border-color: var(--blue);
}

.state-multiselect-page .state-multiselect-menu {
  right: auto;
  left: 0;
}

@media (max-width: 760px) {
  .state-multiselect-page .state-multiselect-menu {
    width: min(100%, calc(100vw - 40px));
  }
}


/* ===============================================================
   MAPA V4.1 — PINES REGIONALES COMPACTOS
================================================================ */

.search-map-legend-regional {
  display: grid;
  gap: 9px;
}

.coverage-region-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
}

.coverage-region-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #50655d;
  font-size: .63rem;
  font-weight: 800;
}

.coverage-region-item i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--region-color);
  box-shadow: 0 0 0 2px rgba(13,72,54,.08);
}

.coverage-region-item b {
  font: inherit;
}

.coverage-size-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #718078;
}

.coverage-size-legend small {
  font-size: .6rem;
  font-weight: 750;
}

.size-pin {
  position: relative;
  display: inline-block;
  transform: rotate(-45deg);
  border: 1.5px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #6e8190;
  box-shadow: 0 3px 7px rgba(36,58,72,.20);
}

.size-pin::after {
  content: "";
  width: 28%;
  height: 28%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
}

.size-pin-small {
  width: 11px;
  height: 11px;
}

.size-pin-large {
  width: 17px;
  height: 17px;
}

.denue-state-marker {
  --marker-size: 21px;
  --zone-color: #0e8a61;

  width: clamp(16px, var(--marker-size), 29px);
  height: clamp(16px, var(--marker-size), 29px);
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;
  transition: none;
}

.denue-state-marker::before,
.denue-state-marker::after {
  content: none;
  display: none;
}

.denue-pin-shape {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--zone-color);
  box-shadow:
    0 0 0 3px rgba(5,58,42,.07),
    0 7px 13px rgba(9,53,39,.20);
  transition:
    transform .18s ease,
    filter .18s ease;
}

.denue-pin-center {
  width: 31%;
  height: 31%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
}

.denue-pin-pulse {
  width: 65%;
  height: 65%;
  position: absolute;
  left: 50%;
  bottom: -5%;
  z-index: 1;
  transform: translateX(-50%);
  border: 1.5px solid var(--zone-color);
  border-radius: 50%;
  opacity: .42;
  animation: denue-pin-compact-pulse 2.5s ease-out infinite;
}

.denue-pin-tooltip {
  min-width: max-content;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 20;
  display: grid;
  gap: 2px;
  transform: translate(-50%, 6px);
  padding: 8px 10px;
  border-radius: 10px;
  color: #fff;
  text-align: left;
  background: color-mix(
    in srgb,
    var(--zone-color) 76%,
    #071a2d
  );
  box-shadow: 0 10px 24px rgba(4,27,43,.23);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity .18s ease,
    transform .18s ease;
}

.denue-pin-tooltip strong {
  font-size: .72rem;
}

.denue-pin-tooltip small,
.denue-pin-tooltip em {
  font-size: .59rem;
  font-style: normal;
}

.denue-state-marker:hover,
.denue-state-marker:focus-visible,
.denue-state-marker.is-selected {
  transform: translate(-50%, -100%);
  background: transparent;
  box-shadow: none;
  z-index: 150 !important;
}

.denue-state-marker:hover .denue-pin-shape,
.denue-state-marker:focus-visible .denue-pin-shape,
.denue-state-marker.is-selected .denue-pin-shape {
  transform: rotate(-45deg) scale(1.22);
  filter: saturate(1.12) brightness(.96);
}

.denue-state-marker:hover .denue-pin-tooltip,
.denue-state-marker:focus-visible .denue-pin-tooltip,
.denue-state-marker.is-selected .denue-pin-tooltip {
  transform: translate(-50%, 0);
  opacity: 1;
}

.search-map-detail {
  --selected-region-color: #0e8a61;
}

.search-map-detail .coverage-status-dot {
  background: var(--selected-region-color);
}

.search-map-detail .coverage-state-code {
  color: var(--selected-region-color);
}

.coverage-state-chip {
  position: relative;
  padding-left: 21px;
}

.coverage-state-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--zone-color, #0c7a57);
}

.coverage-state-chip:hover,
.coverage-state-chip.is-selected {
  color: #fff;
  border-color: var(--zone-color, #0c7a57);
  background: var(--zone-color, #0c7a57);
}

.coverage-state-chip:hover::before,
.coverage-state-chip.is-selected::before {
  background: #fff;
}

@keyframes denue-pin-compact-pulse {
  0% {
    transform: translateX(-50%) scale(.48);
    opacity: .52;
  }

  78%,
  100% {
    transform: translateX(-50%) scale(1.7);
    opacity: 0;
  }
}

@media (max-width: 620px) {
  .denue-state-marker {
    width: clamp(
      14px,
      calc(var(--marker-size) * .9),
      25px
    );
    height: clamp(
      14px,
      calc(var(--marker-size) * .9),
      25px
    );
  }

  .denue-pin-tooltip {
    min-width: 135px;
    max-width: 180px;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .denue-pin-pulse {
    animation: none;
  }
}


/* ===============================================================
   MAPA COROPLÉTICO POR ENTIDADES
================================================================ */

.choropleth-map-stage {
  min-height: 390px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(16, 121, 87, .10),
      transparent 58%
    ),
    linear-gradient(145deg, #f7fbf9, #edf5f2);
}

.mexico-state-map {
  width: 100%;
  min-height: 320px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
}

.mexico-state-map svg {
  width: 100%;
  height: auto;
  max-height: 590px;
  display: block;
  overflow: visible;
}

.mexico-state {
  --state-fill: #e3ebe8;
  --state-zone-color: #61788b;

  fill: #e3ebe8;
  stroke: rgba(255,255,255,.96);
  stroke-width: 1.45;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  transition:
    fill .24s ease,
    stroke .18s ease,
    stroke-width .18s ease,
    filter .18s ease,
    opacity .18s ease;
}

.mexico-state.is-pending {
  fill: #e5ece9;
  opacity: .68;
}

.mexico-state.is-loaded {
  fill: var(--state-fill);
  cursor: pointer;
  opacity: 1;
}

.mexico-state.is-loaded:hover,
.mexico-state.is-loaded:focus-visible {
  stroke: #082c43;
  stroke-width: 2.1;
  filter:
    brightness(.96)
    drop-shadow(0 5px 7px rgba(7, 31, 46, .18));
  outline: none;
}

.mexico-state.is-selected {
  stroke: #041e31;
  stroke-width: 2.7;
  filter:
    brightness(.91)
    drop-shadow(0 6px 8px rgba(4, 30, 49, .26));
}

.mexico-state-hit {
  fill: transparent;
  pointer-events: none;
  cursor: pointer;
}

.choropleth-tooltip {
  width: max-content;
  max-width: min(245px, calc(100% - 32px));
  position: absolute;
  z-index: 20;
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 13px;
  color: #fff;
  background: rgba(5, 35, 52, .95);
  box-shadow: 0 14px 34px rgba(4, 27, 43, .25);
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity .16s ease,
    transform .16s ease;
}

.choropleth-tooltip[hidden] {
  display: none;
}

.choropleth-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.choropleth-tooltip strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: .82rem;
}

.choropleth-tooltip span {
  color: rgba(255,255,255,.78);
  font-size: .66rem;
  font-weight: 800;
}

.choropleth-tooltip b {
  font-size: .69rem;
}

.choropleth-tooltip small {
  color: rgba(255,255,255,.72);
  font-size: .61rem;
}

.coverage-region-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
}

.coverage-region-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #52685f;
  font-size: .66rem;
  font-weight: 800;
}

.coverage-region-item i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--region-color);
  box-shadow: 0 0 0 2px rgba(12, 67, 50, .08);
}

.coverage-region-item b {
  font: inherit;
}

.choropleth-intensity-legend {
  display: grid;
  grid-template-columns: auto minmax(90px, 170px) auto;
  gap: 9px;
  align-items: center;
  color: #75867e;
  font-size: .61rem;
  font-weight: 800;
}

.choropleth-intensity-legend i {
  height: 9px;
  display: block;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      #edf4f1,
      #8dbfae,
      #147d5c
    );
  box-shadow: inset 0 0 0 1px rgba(9, 70, 51, .08);
}

@media (max-width: 760px) {
  .choropleth-map-stage {
    min-height: 300px;
  }

  .mexico-state-map {
    min-height: 260px;
  }

  .coverage-region-item {
    font-size: .61rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mexico-state,
  .choropleth-tooltip {
    transition: none;
  }
}


/* ===============================================================
   MAPA NACIONAL POR ESTADOS V6
================================================================ */

.search-map-legend-regional {
  display: grid;
  gap: 9px;
}

.search-intensity-legend {
  max-width: 340px;
}

.search-choropleth-stage {
  min-height: 450px;
}

.search-map-detail {
  --selected-region-color: #0e8a61;
}

.search-map-detail .coverage-status-dot {
  background: var(--selected-region-color);
  box-shadow: 0 0 0 4px rgba(11, 140, 97, .13);
}

.search-map-detail .coverage-state-code {
  color: var(--selected-region-color);
}

.search-map-detail .coverage-search-button {
  border-color: var(--selected-region-color);
  background:
    linear-gradient(
      135deg,
      color-mix(
        in srgb,
        var(--selected-region-color) 78%,
        #0b5bac
      ),
      var(--selected-region-color)
    );
}

@media (max-width: 760px) {
  .search-choropleth-stage {
    min-height: 310px;
  }
}
