@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/Atkinson_Hyperlegible/AtkinsonHyperlegible-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/Atkinson_Hyperlegible/AtkinsonHyperlegible-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@layer reset, base, componentes;

@layer reset {
  * {
    box-sizing: border-box;
  }

  body,
  h1,
  p {
    margin: 0;
  }
}

@layer base {
  body {
    color: #000;
    /* background: #fffaf2; */
    font-family: "Atkinson Hyperlegible", Arial, sans-serif;
  }
}

@layer componentes {
  .mapa-embed {
    display: grid;
    gap: 12px;
    padding: 0px;
  }

  .mapa-embed__encabezado {
    display: grid;
    gap: 4px;

    h1 {
      font-size: 1.25rem;
      line-height: 1.3;
    }

    p {
      font-size: 1rem;
    }
  }

  .map-libre-contenedor {
    position: relative;
    width: 100%;
    height: 600px;
    background: #fff0d9;
  }

  .map-libre-mapa {
    width: 100%;
    height: 100%;
  }

  .map-libre-mapa--sin-fondo {
    background: #fff;
  }

  .mapa-otbn__leyenda {
    position: absolute;
    z-index: 1;
    bottom: 24px;
    left: 12px;
    display: grid;
    gap: 6px;
    padding: 12px;
    color: #000;
    background: #fffaf2;
    font-size: 13px;
  }

  .mapa-otbn__item {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mapa-otbn__color {
    display: inline-block;
    width: 16px;
    height: 16px;
  }

  .mapa-otbn__color--alto {
    background: #ee2e2e;
  }

  .mapa-otbn__color--medio {
    background: #ffd105;
  }

  .mapa-otbn__color--bajo {
    background: #1cac55;
  }

  .map-libre-leyenda {
    position: absolute;
    z-index: 1;
    bottom: 24px;
    left: 12px;
    display: grid;
    gap: 4px;
    padding: 12px;
    color: #000;
    background: #fffaf2;
    font-size: 12px;
    text-align: left;
  }

  .map-libre-leyenda__titulo {
    font-size: 12px;
    font-weight: 700;
  }

  .map-libre-leyenda__item {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .map-libre-leyenda__color {
    display: inline-block;
    width: 16px;
    height: 16px;
  }

  .map-libre-leyenda__color--1 {
    background: #fff3b0;
  }

  .map-libre-leyenda__color--2 {
    background: #ffd105;
  }

  .map-libre-leyenda__color--3 {
    background: #fe9929;
  }

  .map-libre-leyenda__color--4 {
    background: #ee2e2e;
  }

  .map-libre-leyenda__color--5 {
    background: #b30d0d;
  }

  .map-libre-contenedor .maplibregl-popup-content {
    color: #000;
    font-family: "Atkinson Hyperlegible", Arial, sans-serif;
    font-size: 14px;
  }

  .map-libre-error,
  .mapa-embed__aviso {
    padding: 16px;
    font-size: 1rem;
  }

  .mapa-embed__fuente {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
  }

  .mapa-embed__fuente img {
    display: block;
    width: 112px;
    height: auto;
  }

  @media (max-width: 700px) {
    .mapa-embed {
      padding: 0;
    }

    .map-libre-contenedor {
      height: 75svh;
      min-height: 360px;
    }

    .map-libre-leyenda {
      bottom: 12px;
      left: 12px;
      gap: 4px;
      padding: 10px;
      font-size: 11px;
    }

    .map-libre-leyenda__titulo {
      font-size: 11px;
    }

    .map-libre-leyenda__color {
      width: 14px;
      height: 14px;
    }

    .mapa-otbn__leyenda {
      bottom: 12px;
      left: 12px;
      gap: 4px;
      padding: 10px;
      font-size: 11px;
    }

    .mapa-otbn__color {
      width: 14px;
      height: 14px;
    }
  }
}
