/* === Variables y Fuentes === */
:root {
    --color-primary: darkgreen;
    --color-selection: #d6e6fc;
}

/* === Reset Moderno === */
:where(body, div, h1, h2, h3, p, ul, ol, li) {
    margin: 0;
    padding: 0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100vw;
    height: 100%;
    max-width: 100%;
}

html {
    font-family: -apple-system,"BlinkMacSystemFont","San Francisco","Roboto","Segoe UI","Helvetica Neue",sans-serif;
    color: var(--color-primary);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #2d2d2d;
    display: flex;
    flex-direction: column;
}

/* Estilo de formularios */
input, label, select, button, textarea {
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: none;
    vertical-align: middle;
    line-height: 1;
}

button[disabled], input[disabled] {
    cursor: default;
}

button::-moz-focus-inner, input::-moz-focus-inner {
    padding: 0;
    border: 0;
}

:invalid, :-moz-submit-invalid, :-moz-ui-invalid {
    box-shadow: none;
}

select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #000;
}

/* Estilos de textarea */
textarea {
    overflow: auto;
    resize: none;
    vertical-align: top;
}

/* Ocultar botones de autocompletado en inputs */
input::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    position: absolute;
    right: 0;
}

.object-visible {
    visibility: visible;
    /* opacity: 1; */
}
.object-hidden {
    visibility: hidden;
    /* opacity: 0; */
}

.display-none {
    display: none;
}
.display-block {
    display: block;
}

#map {
    width: 100%;
    flex: 1 1 auto;
}





/* TOP SECTION */

.Header__Container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    padding: 5px 5px;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 50px);
    background-color: white;
    opacity: 0.9;
    border-bottom-right-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.Header__Left {
    display: flex;
    align-items: center;
    position: relative;
}

.Header__Left::before {
    content: '';
    position: absolute;
    top: -5px;   /* igual al padding-top de .Header__Container */
    bottom: -5px; /* igual al padding-bottom */
    left: -10px;  /* igual al padding-left */
    right: 100%;  /* se extiende hacia la izquierda solo */
    background-color: white;
    z-index: -1; /* para que quede detrás del contenido de Header__Left */
}

.Header__Right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 50px;
}

.Header__Right form {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #000;
    color: #fff;
    width: 100%;
    padding: 10px 60px;
    box-sizing: border-box;
    font-family: Open Sans, Arial, sans-serif;
    font-size: 0.9em;
}

.Footer__Logos {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.Footer__Logos p {
    margin: 0;
    font-weight: bold;
    text-align: center;
}

footer a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

@media (max-width: 900px) {
    footer {
        display: none;
        visibility: hidden;
    }
}

.Footer__PoweredBy {
    text-align: center;
    margin: 15px 0 0 0;
    /* font-size: 0.85em; */
    font-size: 1em;
    color: #888;
}

.Footer__PoweredBy p {
    margin: 0 0 5px 0; /* separa el texto del logo */
    padding-bottom: 6px;
}

.Footer__PoweredBy a {
    display: inline-block;
}

.Footer__PoweredByLogo {
    height: 30px; /* ajusta a lo que mejor encaje */
    width: auto;
}

.TopBar__Container {
    position: absolute; /* o fixed si quieres que siempre esté visible */
    top: 20px;
    right: 10px;
    display: flex;
    gap: 12px; /* separación entre login y selector */
    align-items: center;
    z-index: 1000;
}

/* Botón de login */
.LoginButton__Button {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.LoginButton__Button:hover {
    background-color: #219150;
}

.LoginModal__Overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

@media (max-width: 900px) {
    .LoginButton__Button {
        display: none;
        visibility: hidden;
    }
}

.LoginModal__Content {
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    width: 300px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.LoginModal__Content h2 {
    margin-top: 0;
    text-align: center;
}

.LoginModal__Content label {
    display: block;
    margin-top: 10px;
}

.LoginModal__Content input {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fafafa;
    font-size: 14px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.LoginModal__Content input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.4);
    outline: none;
    background-color: #fff;
}

.LoginModal__Content button {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
}

.LoginModal__Content button:hover {
    background-color: #45a049;
}

.LoginModal__Close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 20px;
    cursor: pointer;
}

/* Selector de idioma */
.LanguageSelector select {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #b0d4f1;
    border-radius: 4px;
    background-color: white;
    color: #004080;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.LanguageSelector select:hover {
    background-color: #d8ecff;
}

/* main container */
.Logos__Header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

/* top-left section */
.TopOptions__TopLeftOptions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    border-radius: 0 0 8px 0;
    box-shadow: 0px 2px 2px rgba(0,0,0,0.25);
    max-width: 990px;
    max-height: 500px;
    overflow: visible;
}

/* menu and logos */
.Logos__LogosBlock {
    display: flex;
    align-items: center;
    height: 56px;
    padding-right: 16px;
    background-color: #fff;
    gap: 30px;
}

.Logos__LogosBlock > div:first-child {
    display: flex;
    align-items: center;
    padding-left: 7px;
    cursor: pointer;
}

.Logos__LogosBlock img {
    height: 45px;                /* Altura fija para todos */
    border-radius: 3px;          /* Esquinas ligeramente redondeadas */
    object-fit: contain;         /* Asegura que no se deformen */
    background-color: white;     /* Fondo blanco para mejor contraste si es PNG transparente */
    transition: transform 0.2s ease;
    padding: 0;
    margin-right: 14px;
}

.Logos__LogosBlock img:hover {
    transform: scale(1.02); /* Pequeño efecto al pasar el ratón */
}

@media (max-width: 900px) {
    .Logos__LogosBlock {
        height: 36px;
    }
}



/* BOTTOM SECTION */

.Legend__LegendInfo {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    bottom: 150px;
    right: 20px; /* si se quiere cambiar posicion, aqui!!!!! */
    width: 80px;
    /* margin-left: -200px; */
    font: 500 12px;
    transition: transform 0.15s ease;
    z-index: 90;
}

.Legend__LegendInfo > div:first-child {
    min-width: 100%;
}

/* Buttons Block */
.Flex__MapButtons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 8px 0;
}

.MapButtons__BaseMapSelect {
    flex-shrink: 0;
    width: 32px;
    margin-right: 8px;
}

.MapButtons__BaseMapSelect button {
    position: relative;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    background: none;
}

.MapButtons__BaseMapSelect button:before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background-color: #2f80ed;
    border-radius: 6px;
    transition: opacity 0.15s ease;
}

.MapButtons__BaseMapSelect button:hover:before {
    opacity: 0.4;
}

.topomap button {
    display: block;
    background: url('/images/ortomap-preview.jpg') center center no-repeat;
}

.ortomap button {
    display: block;
    background: url('/images/topomap-preview.jpg') center center no-repeat;
}




/* LEFT SECTION */

.Taxons__TaxonSelect {
    position: absolute;
    display: flex;
    flex-direction: row;
    top: 67px;
    left: 0;
    width: auto; /*width: 88px;*/
    max-width: 250px;
    height: auto;
    flex-grow: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 0 8px 8px 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease-in, visibility 0s ease 0s;
    z-index: 100;
}

/* Taxon Menu */
.Taxons__TaxonOptions {
    width: auto;
    max-width: 78px;
    max-height: calc(99vh - 67px);
    overflow-y: auto;
    padding: 0 5px 10px;
    box-sizing: border-box;
}

.Taxons__Taxon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    line-height: 15px;
    text-align: center;
    color: #2d2d2d;
    transition: color 0.15s ease;
}

.Taxons__Taxon div {
    position: relative;
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 50%; /* Simplificado */
    margin-bottom: 6px;
    background-color: #b3c289;
    color: #818181;
    transition: background-color 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.Taxons__Taxon div span svg {
    position: absolute;
    top: -4px;
    left: -4px;
    opacity: 0;
    transform: scale(1);
    transition: none;
}

.Taxons__Taxon div span svg circle {
    transition: fill 0.2s ease;
}

.Taxons__Taxon:hover {
    color: #6dbcdb;
}

.Taxons__Taxon:hover div {
    background-color: #6dbcdb;
    color: #fff;
}

.Taxons__Separator {
    width: 1px;
    background-color: #b3b3b3;
    margin: 0 5px;
}

/* Mueve el elemento de sitio */
@media (max-width: 950px) {
    .Taxons__TaxonSelect {
        /* position: absolute; */
        top: auto;
        bottom: 0;
        left: 0;
        min-width: 100%;
        /* max-height: calc(99vh - 67px); */
        height: auto;
        flex-direction: column;
        border-radius: 0;
        border-top: 1px solid #e0e0e0;
        background-color: white;
        z-index: 120;
    }

    .Taxons__TaxonOptions {
        min-width: 100%;
        /* max-height: calc(99vh - 67px); */
        overflow: visible;
        padding: 0 10px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }
    .Taxons__TaxonOptions {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        display: flex;
        flex-direction: row;
        gap: 8px;
        scroll-snap-type: x mandatory;
        padding: 10px;
        scroll-behavior: smooth;
    }

    .Taxons__Taxon {
        flex: 0 0 auto;
        scroll-snap-align: center;
        width: 60px;
        margin: 0;
        text-align: center;
        white-space: normal;  /* ✅ permite que el texto se divida en varias líneas */
        word-wrap: break-word;
        max-width: 60px; /* o lo que uses como ancho del icono */
        text-align: center;
        line-height: 1.1;
    }

    .Taxons__Taxon div {
        width: 45px; /* Ajusté el tamaño para que encajen mejor */
        height: 45px;
        margin-bottom: 0;
        background-color: #b3c289;
    }

    .Taxons__Separator {
        display: none;
    }

    .Taxons__Catalogs {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around;
        align-items: center;
        width: 100%;
        padding: 5px !important;
        margin-top: 10px;
    }

    .Taxons__OpenCatalog {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin-bottom: 0;
        width: auto;
    }

    .Taxons__OpenCatalog div {
        width: 40px;
        height: 40px;
    }

    .Taxons__OpenCatalog span {
        margin-top: 6px;
        font-size: 11px;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
        word-break: break-word;
        max-width: 70px;
    }

    .Taxons__ToggleBtn {
        position: absolute !important;
        top: -28px !important;
        left: 50% !important;
        right: auto !important;
        transform: rotate(270deg) !important;
        width: 14px !important;
        height: 40px !important;
        border-radius: 6px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.2);
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 999;
        cursor: pointer;
    }

    .Taxons__ToggleBtn span {
        transform: rotate(90deg) !important; /* ▼ */
        transition: transform 0.3s ease;
        display: inline-block;
    }

    .Taxons__TaxonSelect--collapsed .Taxons__ToggleBtn span {
        transform: rotate(-90deg) !important; /* ▲ */
    }

    .Taxons__TaxonSelect {
        transition: transform 0.3s ease;
    }

    .Taxons__TaxonSelect--collapsed {
        transform: translateY(100%) !important; /* Panel hacia abajo */
    }
}

.Taxons__Catalogs {
    width: auto;
    padding: 16px 8px;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    line-height: 15px;
    color: #2d2d2d;
    transition: color 0.15s ease;
}

.Taxons__OpenCatalog {
    position: relative;
    display: flex;
    flex-direction: column; /* Coloca el SVG y el texto en columna */
    align-items: center;
    width: 78px;
    margin-bottom: 16px;
    text-align: center;
    transition: color 0.15s ease;
}

.Taxons__OpenCatalog div {
    position: relative;
    display: block;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.Taxons__OpenCatalog:before {
    position: absolute;
    top: 0;
    left: 10px;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    content: '';
    background-color: #e2e2e2;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.Taxons__OpenCatalog svg {
    position: relative;
    top: 9px;
    left: -8px;
}

.Taxons__OpenCatalog span {
    margin-top: 25px; /* Añade espacio entre el svg y el texto */
    font-weight: 600;
    font-size: 12px;
    line-height: 15px;
    white-space: nowrap;
    color: #2d2d2d;
}

.Taxons__OpenCatalog:hover {
    color: #6dbcdb;
}

.Taxons__OpenCatalog:hover:before {
    background-color: #6dbcdb;
}

/* Contraer y extraer panel taxones */
.Taxons__ToggleBtn {
    position: absolute;
    top: 50%;
    right: -14px;
    transform: translateY(-50%);
    width: 14px;
    height: 40px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: transform 0.3s ease;
}

.Taxons__ToggleBtn span {
    transform: rotate(90deg); /* Apunta a la izquierda ◀ */
    transition: transform 0.3s ease;
}

.Taxons__TaxonSelect--collapsed .Taxons__ToggleBtn span {
    transform: rotate(270deg); /* Apunta a la derecha ▶ */
}

.Taxons__TaxonSelect--collapsed {
    transform: translateX(-100%);
}

/* Zone catalog */
.Catalog__Order {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 8px;
    margin: 8px;
    background-color: rgba(0, 0, 0, 0.12);
}

.Catalog__Order:after {
    position: absolute;
    z-index: 1;
    bottom: -24px;
    left: -8px;
    right: -8px;
    height: 16px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    content: '';
}

.Catalog__Order:before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 33.33%;
    width: 33.33%;
    border-radius: 8px;
    content: '';
    transition: left 0.2s ease;
}

.Catalog__Order > div {
    position: relative;
    display: block;
    width: 33.33%;
    cursor: pointer;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 32px;
    text-align: center;
    color: #636363;
    transition: color 0.2s ease;
}

.Catalog__Order > div:nth-child(2):after,
.Catalog__Order > div:nth-child(2):before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background-color: rgba(0, 0, 0, 0.12);
    content: '';
    transition: opacity 0.2s ease;
}

.Catalog__Order > div:nth-child(2):before {
    left: 0;
    opacity: 0;
}

.Catalog__Order > div:nth-child(2):after {
    right: 0;
    opacity: 0;
}

.Catalog__Order > div span {
    position: relative;
}

.Catalog__Order > div[data-selected="false"]:hover {
    color: currentColor;
}

.Catalog__Order > div[data-selected="true"] {
    background-color: #2f80ed;
    opacity: 1;
    z-index: 1;
    color: #fff;
}

/* Search catalog */
.Catalog__SearchBar {
    padding-bottom: 8px;
    display: flex;
    margin: 0.8em;
}

.Catalog__SearchBar input {
    flex: 1;
    height: 40px;
    padding: 0 8px 0 42px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: url('/images/searchIcon.svg') 8px center no-repeat rgba(0, 0, 0, 0.05);
    font-size: 14px;
    line-height: 17px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.Catalog__SearchBar input:focus {
    background-color: #fff;
}

.Catalog__SearchBar button {
    position: relative;
    display: block;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-left: 8px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.1);
    color: currentColor;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.Catalog__SearchBar button:hover {
    background-color: #2f80ed;
    color: #fff;
}

.Catalog__SearchBar button span {
    position: absolute;
    z-index: 1;
    opacity: 0;
    left: -12px;
    bottom: -12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    pointer-events: none;
    background-color: #fd532d;
    font-size: 16px;
    font-weight: 700;
    line-height: 30px;
    color: #fff;
    transform: scale(0.6);
    transition: none;
}

.Catalog__SearchBar small {
    z-index: 10;
    position: absolute;
    top: 0;
    left: 50%;
    visibility: hidden;
    opacity: 0;
    padding: 20px 12px 8px;
    font-weight: 600;
    font-size: 12px;
    line-height: 15px;
    white-space: nowrap;
    transform: translateY(100%) translateY(-6px) translateX(-50%);
    transition: visibility 0s 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.Catalog__SearchBar small:before {
    position: absolute;
    z-index: -1;
    top: 12px;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 4px;
    background-color: #2d2d2d;
    content: '';
}

.Catalog__SearchBar:hover small {
    opacity: 1;
    visibility: visible;
    transform: translateY(100%) translateY(-1px) translateX(-50%);
    transition: visibility 0s 0s ease, opacity 0.15s ease, transform 0.15s ease;
}




/* Contenido de Paneles */
.Catalog__CatalogPanel {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 64px;
    left: 180px;
    width: 350px;
    visibility: hidden;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    backdrop-filter: blur(4px);
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
    transform: translateX(0%);
    transition: transform 0.2s ease-in, visibility 0s 0.2s;
    overflow: auto;
    max-height: calc(100% - 115px);
    z-index: 100;
}

@media (max-width: 950px) {
    .Catalog__CatalogPanel {
        position: absolute;
        /* bottom: 10px; */
        left: 0;
        width: 100%;
        top: 10px;
        z-index: 160;
        background-color: rgb(230, 230, 230);
        border-top: 0.2px gray solid;
    }
}

.Catalog__CatalogHeader {
    position: relative;
    padding: 12px 54px 12px 16px;
    font-size: 24px;
    font-weight: 700;
    line-height: 29px;
}

.Catalog__CatalogContent {
    overflow: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    padding-top: 5px;
    max-height: calc(100vh - 200px);
}

/* InfoPanel */
.InfoPanel {
    z-index: 100;
    position: absolute;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    top: 105px;
    right: 16px;
    width: 350px;
    max-height: 100vh;
    transform: translateX(0px);
    transition: transform 0.2s ease-in, visibility 0s 0.2s, max-height 0.2s ease, top 0.15s ease;
    overflow: visible;
}

.InfoPanel__ZoneHeader,
.InfoPanel__RegionHeader {
    width: 100%;
    height: 57px;
    overflow: hidden;
    padding: 8px;
    border-radius: 8px 8px 0 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 19px;
    color: #fff;
    opacity: 1;
    transform: translateY(-100%) translateY(8px);
    transition: transform 0.15s ease, opacity 0s 0.15s ease;
}

.InfoPanel__ZoneHeader {
    background: rgba(39, 174, 96, 0.8);
    backdrop-filter: blur(10px);
    padding: 8px 95px;
}

.InfoPanel__ZoneHeader small,
.InfoPanel__RegionHeader small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    line-height: 15px;
}

.InfoPanel__RegionHeader {
    background: rgba(70, 70, 70, 0.9);
    backdrop-filter: blur(10px);
    padding: 8px 70px;
}

.InfoPanel__CloseSelection {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.InfoPanel__CloseSelection:hover svg circle {
    fill-opacity: 1;
}

.InfoPanel__CloseSelection svg circle {
    transition: fill-opacity 0.2s ease;
}

.InfoPanel__PanelContent {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    max-height: calc(100vh - 220px);
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    backdrop-filter: blur(4px);
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
    transform: translateY(-57px) translateY(8px);
}

.InfoPanel__BottomActions {
    display: block;
    position: relative;
    max-height: 57px;
    background-color: rgba(255, 255, 255, 0.9);
    text-align: center;
    border-radius: 0px 0px 8px 8px;
}
.InfoPanel__BottomActions > div {
    box-sizing: content-box;
}
.InfoPanel__BottomActions button {
    cursor: pointer;
    background-color: rgb(230, 230, 230);
    font-family: -apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Helvetica Neue", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 38px;
    color: rgb(47, 128, 237);
    border: 1px solid rgb(220, 220, 220);
    border-radius: 8px;
    margin: 8px;
    padding: 0 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}




/* Panel de info y tarjetas */
.InfoPanel__Data {
    flex: 1;
    overflow: auto;
}

.InfoPanel__Data > div {
    /* padding: 0 8px; */
    overflow: auto;
}

.InfoPanel__SectionHeader {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 0 44px;
    margin: 0.8em;
    border-radius: 16px;
    background-color: #464646;
    font-size: 12px;
    font-weight: 700;
    line-height: 32px;
    color: #fff;
}
.InfoPanel__SectionHeader span {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 4px;
    top: -2px;
}
.InfoPanel__SectionHeader strong {
    font-size: 14px;
    color: #e2e2e2;
}
.InfoPanel__SectionHeader svg {
    width: 36px;
    height: auto;
}

.CellData__MonitoringSummary {
    display: flex;
    align-items: center;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-left: 4px solid #0077cc;
    padding: 0.75em 1em;
    margin-bottom: 1em;
    border-radius: 6px;
    gap: 1em;
}

.MonitoringSummary__Icon {
    font-size: 1.5em;
    color: #0077cc;
}

.MonitoringSummary__Content strong {
    /* display: block; */
    font-size: 1.1em;
    margin-bottom: 0.2em;
}

.MonitoringSummary__Content small {
    color: #666;
    font-size: 0.9em;
}

/* Total de unidades en celda */
.CellData__TotalSpecies {
    font-weight: bold;
    margin-bottom: 1em;
}

.MainCard__InfoExtra {
    background-color: #f0f9f4; /* verde pastel suave */
    border-radius: 12px;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #2a4d3a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.MainCard__InfoExtra strong {
    /* display: block; */
    margin-bottom: 4px;
    color: #216c4f;
    font-weight: 600;
}

.MainCard__HabitatList,
.MainCard__ProtectionList {
    list-style: disc inside;
    margin: 4px 0 12px 0;
    padding-left: 12px;
}

.MainCard__HabitatList li,
.MainCard__ProtectionList li {
    margin-bottom: 4px;
}

.Specie__HabitatSection {
    margin-top: 1rem;
    padding: 0 1rem;
}

.Specie__HabitatToggle {
    background: none;
    border: none;
    color: #2a9958;
    cursor: pointer;
    font-weight: bold;
    padding: 0;
    margin-bottom: 0.5rem;
}

.Specie__HabitatList {
    list-style: disc;
    padding-left: 1.5rem !important;
    margin: 0;
    max-height: 200px; /* <- Altura máxima visible */
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    background: #fafafa;
}

.MainCard__Card {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #222;
    position: relative;
    max-height: 600px;
}

/* Header más limpio y espaciado */
.MainCard__CardHeader {
    padding-left: 80px;
    padding-top: 12px;
    margin-bottom: 16px;
    border-bottom: 1px dashed #ddd;
}

/* Título bien jerarquizado */
.MainCard__CardHeader h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #000;
}

/* Subtítulo sobrio */
.MainCard__CardHeader small {
    font-size: 13px;
    color: #444;
    font-style: italic;
}

/* Imagen circular de perfil */
.MainCard__CardImage {
    position: absolute;
    top: -60px;
    left: -60px;
    width: 120px;
    height: 120px;
    background: #fff;
    border: 3px solid #27ae60;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-align: center;
    z-index: 5;
}

/* Imagen dentro del círculo */
.MainCard__CardImage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.MainCard__Card:not(:has(.MainCard__CardImage)) .MainCard__CardHeader {
    padding-left: 0;
}

.MainCard__Discard {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    z-index: 10;
}
.MainCard__Discard circle {
    transition: fill 0.2s ease;
}
.MainCard__Discard:hover svg circle {
    fill: #999;
}

.MainCard__Stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 0 8px;
  max-height: 60vh;
  overflow-y: auto;
}

.MainCard__Stats li {
  flex: 1 1 28%;
  text-align: center;
  padding: 14px 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1.5px solid #dfe6eb;
  font-size: 18px;
  font-weight: 600;
  color: #34495e;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: background 0.25s ease, box-shadow 0.25s ease;
  cursor: default;
}

.MainCard__Stats li:hover {
  background: #f0f5f9;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.MainCard__Stats small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-top: 6px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.Card__CellCard {
  background: #fdfdfd;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.Card__CellCard:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Título de la celda */
.Card__CellCard h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

/* Párrafo con info */
.Card__CellCard p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #555;
}

/* Botón */
.CellCard__Btn {
  display: inline-block;
  background: #2a9958;
  color: white;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.CellCard__Btn:hover {
  background: #21844b;
}

.MainCard__BlankSlate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 90px;
  padding: 18px 28px;
  margin: 20px 12px 0;

  text-align: center;
  color: #666;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;

  background: linear-gradient(135deg, #fafafa, #f4f6f8);
  border: 1px solid #ccc;
  border-radius: 14px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.07);
}

.NoData {
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 0.95rem;
    text-align: center;
    margin: 10px 10px 10px 10px;
}

.NoData h3 {
  margin: 0;
  font-size: 17px;
  color: #333;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.NoData small {
  font-size: 14px;
  color: #777;
  letter-spacing: 0.02em;
}

.Card {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
    margin: 0 0.5em;   /* 👈 aire a izquierda y derecha */
}

.Card:not(:last-child) {
    margin-bottom: 8px;
}

.Card:after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0;
    border-radius: 8px;
    content: '';
    pointer-events: none;
    box-shadow: inset 0 0 0 2px #aaa;
    transition: opacity 0.15s ease; /* Eliminado el prefijo -webkit ya que no es necesario */
}

.Card:hover:after {
    opacity: 1;
}

.Card--selected {
    border: 2px solid #000; /* Borde negro grueso */
    background-color: #f5f5f5; /* Fondo más claro */
    box-shadow: 0 0 8px rgba(0,0,0,0.2); /* Sombra opcional */
}

.Card__Discard {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
}

.Card__Discard circle {
    transition: fill 0.20s ease;
}

.Card__Discard:hover svg circle {
    fill: #aaa;
}

/* Cabecera de tarjeta de especie */
.Card__CardHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #ccc;
    padding: 0.5em 0.8em;
    margin-bottom: 0.5em;
}

.Card__CardHeader h3 {
    font-size: 1.1em;
    font-weight: bold;
    margin: 0;
}

.Card__HeaderExtras {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 0.5em;
}

.Card.zone .Card__Species,
.Card.province .Card__Species,
.Card.specie .Card__Species {
    margin-top: 0;          /* 👈 ya no lo queremos empujando hacia abajo */
}

/* Etiqueta "Catalogada" */
.Specie__StatusLabel {
    background-color: #e91e63;
    color: white;
    padding: 0.2em 0.5em;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
}

.Specie__StatusDetails {
    margin-top: 0.4em;
    padding: 0.6em 0.8em;
    background-color: #f5f6ff;
    border-left: 3px solid #009c08;
    font-size: 0.85em;
    color: #333;
    border-radius: 4px;
}

.Specie__StatusEntry {
    margin-bottom: 0.4em;
}

.Specie__StatusTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
    color: #333;
}

.Specie__StatusTable td {
    padding: 0.25em 0.5em;
    vertical-align: top;
}

.Specie__StatusTable tr:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.Specie__StatusLink {
    display: inline-block;
    margin-top: 0.4em;
    font-weight: bold;
    color: #009c08;
    text-decoration: none;
}

.Specie__StatusLink:hover {
    text-decoration: underline;
}

/* Lista de poblaciones */
.Card__PopulationList {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.Card__PopulationItem {
  background-color: #eff9ff;
  padding: 14px 12px;
  margin-bottom: 10px;
  border-radius: 6px;
  box-shadow: 0 0 2px rgba(0,0,0,0.1);
  border-bottom: 2px solid #ccc;
}

.Card__PopulationItem strong {
    display: inline-block;
    margin-bottom: 0.25em;
    color: #1976D2;
}

/* Campo de datos vacío */
.Card__NoPopulations {
    font-style: italic;
    color: #888;
    font-size: 0.9em;
    margin-top: 0.5em;
}

/* === Tarjeta de especie === */
.specie-card {
    background-color: #fefefe;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 1.2em;
    padding: 1em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Cabecera con nombre científico + estado */
.specie-card .Card__CardHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 0.4em;
    margin-bottom: 0.6em;
}

.specie-card .Card__CardHeader h3 {
    font-size: 1.1em;
    font-weight: bold;
    margin: 0;
    color: #333;
}

/* Encabezado del panel por grupo taxonómico */
.InfoPanel__SectionHeader {
    margin-top: 1em;
    margin-bottom: 0.5em;
    cursor: pointer;
    padding: 0.5em;
    background-color: #000000;
    border: 1px solid #ddd;
    border-left: 4px solid #3e8f41;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.InfoPanel__SectionHeader:hover {
    background-color: #3e8f41;
}

.InfoPanel__SectionHeader.active {
    background-color: #3e8f41;
}

/* Contenedor de grupo */
.GroupContent {
    margin-left: 0.5em;
    padding-left: 1em;
    border-left: 2px dashed #ddd;
}

.Card__Species {
  box-sizing: border-box; /* clave para que borde y padding no aumenten el tamaño */
  width: 100%;            /* ocupa todo el ancho permitido */
  font-size: 0.85rem;
  padding: 4px 8px;
  border: 1.5px solid #2a9958;
  border-radius: 6px;
  background-color: #e6f4ea;
  color: #2a9958;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;       /* por si acaso */
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-top: 16px;
}

.Card__Species span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.Card__Species svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #2a9958;
  stroke-width: 2;
}

.Card__Stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 11px;
}
.Card__Stats li {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
}
.Card__Stats small {
    font-size: 11px;
    font-weight: 500;
    color: rgb(70, 70, 70);
    line-height: 13px;
}

/* Tarjetas de Unidades de Monitoreo y Proyectos */
.Card.monitoring-unit {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    cursor: default;
    transition: box-shadow 0.15s ease;
    padding-bottom: 8px; /* Espacio para la lista de especies */
}

.Card.monitoring-unit:not(:last-child) {
    margin-bottom: 8px;
}

.Card.monitoring-unit:after {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 2px #aaa;
    transition: opacity 0.15s ease;
}

.Card.monitoring-unit:hover:after {
    opacity: 1;
}

.Card__ProjectInfo {
    display: flex;
    flex-direction: column;
    padding: 10px 16px 6px;
}

.Card__ProjectInfo h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 19px;
    margin: 0;
}

.Card__ProjectInfo small {
    font-size: 12px;
    line-height: 15px;
    font-weight: 500;
    color: #555;
}

.Card__MonitoringUnit {
    font-size: 12px;
    font-weight: 500;
    color: #888;
    padding: 0 16px;
    margin-top: 4px;
    margin-bottom: 4px;
}

.Card__SpeciesList {
    border-top: 1px solid #eee;
}

.Card__SpeciesList .Card__Species {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    padding: 0 8px 0 16px;
    font-size: 12px;
    font-weight: 600;
    line-height: 15px;
    color: #2f80ed;
    cursor: default;
}

.Card__SpeciesList .Card__Species span {
    position: relative;
    padding-left: 36px;
}

.Card__SpeciesList .Card__Species span svg {
    position: absolute;
    left: -4px;
    top: -9px;
    width: 36px;
    height: auto;
    stroke-width: 1.5;
}

/* Botón cambio de vista */
.mapboxgl-ctrl-group button {
    background-color: #0078A8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}

.mapboxgl-ctrl-group button:hover {
    background-color: #005f82;
}






/* CALENDARIO */
.Calendar__CalendarInfo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 360px;
    height: 56px;
    background-color: rgba(255, 255, 255, 1);
    backdrop-filter: blur(4px);
    border-radius: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 17px;
    text-align: center;
    z-index: 1;
    overflow: visible;
}

/* Eliminar el filtro de calendario para movil y tablet vertical */
@media (max-width: 950px) {
    .Calendar__CalendarInfo {
        display: none;
    }
}

.Calendar__CalendarInfo label {
  font-size: 0.85rem;
  margin-right: 3px;
  font-weight: 500;
  color: #333;
}

.Calendar__Input {
  width: 120px;
  text-align: center;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  color: #222;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.Calendar__Input:focus {
  outline: none;
  border-color: #2f80ed;
  box-shadow: 0 0 0 2px rgba(47,128,237,0.25);
}

.Calendar__SearchBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: none;
  color: #555;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.Calendar__SearchBtn:hover {
  background: #2f80ed;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.Calendar__SearchBtn svg {
  transition: transform 0.25s ease;
}

.Calendar__SearchBtn:hover svg {
  transform: scale(1.2);
}

.Calendar__ResetBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.2);
    color: #e74c3c;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
    margin-left: 6px;
}

.Calendar__ResetBtn:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}




/* -- Loader -- */
#loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(100, 100, 100, 0.8);
  color:white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader {
  font-size: 30px;
  font-family: monospace;
  font-weight: bold;
  position: relative;
}

.loader::after {
  content: '';
  display: inline-block;
  animation: dots 1s steps(4, end) infinite;
  width: 1.5em;
  text-align: left;
  overflow: hidden;
  vertical-align: bottom;
}