#overlay-controls-container{
  display:flex;
  flex-direction:column;
  gap:12px;
}

#overlay-controls-container > div.container_legenda{
  display:flex;
  flex-direction:column;
  gap:12px;
  /* padding:14px; */
  /* border:1px solid #dbe4f0; */
  border-radius:16px;
  background:rgba(255,255,255,0.96);
  box-shadow:0 18px 38px rgba(15,23,42,0.12);
  backdrop-filter:blur(8px);
}

#overlay-controls-container > div.container_legenda:empty{
  display:none;
}

#overlay-controls-container > div.container_legenda > div.legenda-item{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:0 8px 22px rgba(15,23,42,0.08);
}

#overlay-controls-container > div.container_legenda > div.legenda-item > img{
  display:block;
  width:100%;
  max-width: 190px;
  height:auto;
  border-radius:10px;
  /* border:1px solid #e5e7eb; */
  background:#ffffff;
}

#overlay-controls-container > div.container_legenda > div.legenda-item > p{
  margin:0;
  font-family:'Roboto', sans-serif;
  font-size: 12px;
  font-weight:600;
  line-height:1.45;
  color:#0f172a;
}

#overlay-controls-container > div.container_legenda > div.legenda-item > button,
#overlay-controls-container > div.container_legenda > div.legenda-item > a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  /* min-height:42px; */
  padding: 9px 0px;
  border:1px solid #2563eb;
  border-radius:12px;
  background:#2563eb;
  color:#ffffff;
  font-family:'Roboto', sans-serif;
  font-size:13px;
  font-weight:700;
  line-height:1;
  text-decoration:none;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease;
  box-shadow:0 12px 24px rgba(37,99,235,0.22);
}

#overlay-controls-container > div.container_legenda > div.legenda-item > button:hover,
#overlay-controls-container > div.container_legenda > div.legenda-item > a:hover{
  filter:brightness(0.98);
  /* transform:translateY(-1px); */
}

#overlay-controls-container > div.container_legenda > div.legenda-item > button:focus-visible,
#overlay-controls-container > div.container_legenda > div.legenda-item > a:focus-visible,
div.sx-map-modal > div.sx-map-modal__card > div.sx-map-modal__actions > .btn:focus-visible{
  outline:3px solid rgba(37,99,235,0.24);
  outline-offset:2px;
}

div.sx-map-modal > div.sx-map-modal__card > div.sx-map-modal__actions > .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 18px;
  border-radius:12px;
  border:1px solid transparent;
  font-family:'Roboto', sans-serif;
  font-size:14px;
  font-weight:700;
  line-height:1;
  text-decoration:none;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease, background-color .16s ease, border-color .16s ease;
}

div.sx-map-modal > div.sx-map-modal__card > div.sx-map-modal__actions > .btn:hover{
  filter:brightness(0.98);
  transform:translateY(-1px);
}

div.sx-map-modal > div.sx-map-modal__card > div.sx-map-modal__actions > .btn.primary{
  background:#2563eb;
  border-color:#2563eb;
  color:#ffffff;
  box-shadow:0 14px 28px rgba(37,99,235,0.22);
}

div.sx-map-modal > div.sx-map-modal__card > div.sx-map-modal__actions > .btn.secondary{
  background:#f8fafc;
  border-color:#cbd5e1;
  color:#0f172a;
  box-shadow:0 8px 20px rgba(15,23,42,0.08);
}

@media (max-width: 768px){
  #overlay-controls-container > div.container_legenda{
    padding: 8px;
    border-radius:14px;
    max-width: 171px;
  }

  #overlay-controls-container > div.container_legenda > div.legenda-item{
    padding:10px;
    border-radius:12px;
  }

  #overlay-controls-container > div.container_legenda > div.legenda-item > button,
  #overlay-controls-container > div.container_legenda > div.legenda-item > a,
  div.sx-map-modal > div.sx-map-modal__card > div.sx-map-modal__actions > .btn{
  }
}
/* container geral do controle */
.overlay-control {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 10px;
    z-index: 100;
}

/* botÃ£o */
.overlay-btn {
    padding: 6px 10px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease-in-out;
}
.overlay-btn.active {
    background: #DFF2D8;
}

/* container do slider */
.overlay-opacity {
    margin-top: 8px;
    right: 53px !important;
    top: 35px !important;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    font: 13px/1.2 system-ui, -apple-system, 'Segoe UI', Roboto, Arial;
    display: none; /* sÃ³ aparece quando ativo */
    max-width: 175px;
}

/* label do slider */
.overlay-label {
    display: block;
    margin-bottom: 6px;
}

/* input range */
.overlay-range {
    width: 160px;
}
.container_legenda{
    display: block;
    max-width: 300px;
    font-size: 12px;
}
.container_legenda>.legenda_container{
    margin-bottom: 7px;
    display: flex;
    flex-direction: column-reverse;
    align-items: end;
}
.container_legenda>.legenda_container>.legenda{
    font-size: 12px;
    color: #444;
    /* text-transform: uppercase; */
    /* font-weight: 700; */
    background-color: white;
    padding: 5px;
    margin-top: 5px;
    max-width: 180px;
    text-align: center;
    border-radius: 6px;
}
.container_legenda>.legenda_container>img{
    display: block;
    margin-top: 6px;
    max-width: 100%;
    width: 180px;
    border-radius: 7px;
}
.legenda_download_wrap { margin-top: 6px; }
.legenda_download_btn, .legenda_download_btn {
  display: inline-block;
  padding: 6px 10px;
  text-decoration: none;
  font-size: 13px;
  background: #dd6514;
  color: #fff;
  font-family: 'Abel';
  text-transform: uppercase;
  border: none;
  cursor: pointer;
    transition: all linear 0.5s
}
.legenda_download_btn:hover,
.legenda_download_btn:hover{
    opacity:0.9
}
#overlay-controls-container{
    z-index: 1;
    top: 12px;
    position: absolute;
    right: 10px;
}
#overlay-controls-container select{
    padding: 5px;
    border: none;
    border-radius: 5px;
    width: 120px;
}
#overlay-controls-container option{}
#escala-controls-container{
    background: #ffffff;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    border: 1px solid #e5e7eb;
    font: 14px / 1.2 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial;
}
#escala-value-display{align-content: center;}
#escala-controls-container>label{
    align-content: center;
    padding: 0 2px;
}

/* Container do checkbox "Usar escala no Satélite" — antes estava sem background
   e ficava com texto flutuando sobre as imagens de satélite (ilegível).
   Mesmo estilo de card do #escala-controls-container para consistência. */
#satellite-scale-controls-container{
    background: #ffffff;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    border: 1px solid #e5e7eb;
    color: #0f172a;
    font: 12px / 1.3 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial;
}
#satellite-scale-controls-container #satellite-scale-label{
    color: #0f172a;
}
.overlay-select-wrap{
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 5px;
}

/* ── Swatches de categoria na legenda (CAR / INCRA / UC / Comunidades) ────── */
.legenda-cat-list{
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}
.legenda-cat{
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #1e293b;
    line-height: 1.25;
}
.legenda-cat__swatch{
    flex: 0 0 13px;
    width: 13px;
    height: 13px;
    border-radius: 3px;
    border: 2px solid;
    display: inline-block;
    box-sizing: border-box;
}
/* solidsoft: preenchimento semitransparente (CAR, Comunidades) */
.legenda-cat__swatch.is-solidsoft{
    opacity: 0.7;
}
/* border: só contorno, sem fill (INCRA) */
.legenda-cat__swatch.is-border{
    background-color: transparent !important;
}
/* solid: preenchimento opaco total (UC Uso Sustentável) */
.legenda-cat__swatch.is-solid{
    opacity: 1;
}
/* hatch: listras diagonais brancas sobre a cor (UC Proteção Integral) */
.legenda-cat__swatch.is-hatch{
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.65) 0px,
        rgba(255,255,255,0.65) 3px,
        transparent 3px,
        transparent 7px
    );
}
/* line: traço horizontal representando rios/drenagens */
.legenda-cat__swatch.is-line{
    height: 3px;
    border-radius: 2px;
    border: none;
    margin-top: 5px;
    align-self: center;
}
.legenda-cat__label{
    flex: 1;
    word-break: break-word;
}