* {
    padding: 0;
    margin: 0;
}

row {
    display: grid;
    grid-template-columns: repeat(12, 1fr); /* 12 columnas como Bootstrap */
    gap: 16px; /* Espacio entre columnas */
  }

  .col-6 {
    grid-column: span 6;
  }

  .col-4 {
    grid-column: span 4;
  }

  .col-12 {
    grid-column: span 12;
  }

  .col {
    grid-column: span 1; /* columna básica */
  }

  .box {
    background: lightblue;
    padding: 20px;
    text-align: center;
  }

#leyenda-wrapper {
    display: grid;
    place-items: center;
    width: 100%;
}

#leyenda-units-wrapper {
    position: absolute;
    display: grid;
    bottom: 5rem;
    right: 5rem;
    z-index: 2;
    
}

#legend-wrapper {
    position: absolute;
    display: grid;
    bottom: 5rem;
    right: 5rem;
    z-index: 2;
}

#leyenda-units-wrapper > img {
    width: 100%;
    height: 100%;
}

/* responsive para leyenda-units-wrapper */
@media only screen and (max-width: 1024px) {
    #leyenda-units-wrapper {
        bottom: 4rem;
        left: 1.5rem;
        height: 17rem;
        width: 17rem;
    }

    #legend-wrapper {
        bottom: 4rem;
        left: 1.5rem;
        width: 17rem;
    }
}

/* responsive para leyenda-units-wrapper */
@media only screen and (max-width: 886px) {
    #leyenda-units-wrapper {
        bottom: 2.5rem;
        right: 1rem;
        height: 15rem;
        width: 15rem;
        transition: all ease 0.2s;
    }

    #leyenda-units-wrapper:hover {
        scale: 1.2;
    }
}

@media only screen and (max-width: 414px) {
    #leyenda-units-wrapper {
        bottom: 0.5rem;
        right: 0.5rem;
        height: 12rem;
        width: 12rem;
    }
}

@media only screen and (max-height: 690px) {
    #leyenda-units-wrapper {
        bottom: 0.5rem;
        left: 0.5rem;
        height: 20rem;
        width: 20rem;
    }
}

#header-options {
    /** en esta vista, desktop, poner botón a lado y centrar verticalmente */
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: center;
    right: 15rem;
    z-index: 1;
}

#menu {
    grid-row: 1;
    gap: 1rem;
    padding: 1rem;
    transition: all ease 1s;
}


.leyenda {
    bottom: 5.5rem;
    /* right: 0.5rem; */
    position: absolute;
    background-color: rgba(255, 255, 255, 0);
    border-radius: 0.5rem;
    padding: 0.8rem 1rem;
    display: grid;
    grid-auto-flow: column;
}

.leyenda .wrapper-content {
    display: grid;
    justify-items: center;
    align-items: center;
    width: 5.5rem;
}

.leyenda img {
    cursor: pointer;
    transition: transform .2s;

}

.leyenda img:hover {
    transform: scale(1.2);
}

.mobile .leyenda {
    bottom: 0.8rem;
    right: 0.8rem;

    z-index: 1100;
}

.marker-title {
    top: -12px;
    position: absolute;
    /* left: -7px; */
    border: 1px solid;
    background-color: inherit;
    padding: 5px;
    border-radius: 10px;
    color: #fff;
    font-weight: 500;
    width: 30px;
    text-align: center;
    font-size: 10px;
    z-index: 2;
}

.marker-title > span {
    /* TODO: Set color dynamically      DO NOT REMOVE THIS */
    color: white;
}

.base-marker {
    position: absolute;
    left: -7px;
}

#loader {
    position: fixed;
    width: 100%;
    height: 100vh;
    opacity: 0;
    overflow: hidden;
    /* TODO: Set project color dynamically      DO NOT REMOVE THIS */
    background-color: #da9804;
    z-index: 999;
    display: grid;
    place-items: center;
}

#loader.active {
    opacity: 1;
    position: fixed;
    width: 100%;
    height: 100vh;
    /* TODO: Set project color dynamically      DO NOT REMOVE THIS */
    background: #da9804;
    z-index: 999;
    display: grid;
    place-items: center;
}

.loader-spinner>img {
/* center */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: opacity 2s infinite;
    max-width: 20rem;
    
}

#image-loader {
    transition: all ease 1s;
}

/* Estilos para las imágenes de precarga según orientación */
.loader-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* animation: opacity 2s infinite; */
    display: none;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain; /* Mantiene la proporción y ocupa el mayor espacio posible */
    background: transparent;
    z-index: 1000;
    transition: all ease 1s;
}

/* Mostrar imagen horizontal en pantallas landscape */
@media screen and (orientation: landscape) {
    .loader-horizontal {
        display: block;
    }
    .loader-vertical {
        display: none;
    }
}

/* Mostrar imagen vertical en pantallas portrait */
@media screen and (orientation: portrait) {
    .loader-horizontal {
        display: none;
    }
    .loader-vertical {
        display: block;
    }
}

/* Fallback para navegadores que no soportan orientation media query */
@media screen and (min-width: 768px) {
    .loader-horizontal {
        display: block;
    }
    .loader-vertical {
        display: none;
    }
}

@media screen and (max-width: 767px) {
    .loader-horizontal {
        display: none;
    }
    .loader-vertical {
        display: block;
    }
}

@keyframes opacity {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.loader-spinner {
    position: relative;
    width: 48px;
    height: 48px;
    /* TODO: Set project color dynamically      DO NOT REMOVE THIS */
    background: #da9804; 
    /* remove bellows command for perspective change */
    color: #fff;
}

.loader-spinner:after {
    content: '';
    position: absolute;
    inset: 0;
}

.loader-spinner>img {
    max-width: 15rem;
}

.camera-icon-wrapper {
    cursor: pointer;
}

.camera-icon-wrapper img {
    transition: 0.3s;
}

.camera-icon-wrapper:hover img {
    scale: 1.2;
}

.asset-icon-wrapper {
    cursor: none;
}

.asset-icon-wrapper img {
    transition: 0.3s;
}

.asset-icon-wrapper:hover img {
    scale: 1.2;
}

#menu>img {
    cursor: pointer;
    margin: 0.2rem;
    transition: transform .2s;
}

#menu>img:hover {
    transform: scale(1.1);
}

@media only screen and (max-width: 886px) {
    #leyenda-wrapper {
        /* display: none; */
    }

    .leyenda {
        top: 8.5rem;
        bottom: auto;
        align-items: center;
        justify-content: center;
        left: 50%;
        transform: translateX(-50%);
        /* right: 0.5rem; */
        position: absolute;
        background-color: rgba(255, 255, 255, 0);
        border-radius: 0.5rem;
        padding: 0.8rem 1rem;
        display: grid;
        grid-auto-flow: column;
    }

    .leyenda .wrapper-content {
        width: 4.5rem;
        transition: all ease 0.2s;
    }

    .wrapper-content > img {
        width: 4.5rem;
        transition: all ease 0.2s;
    }

    #header-options {
        right: 7rem;
        left: auto;
    }

    
}

@media only screen and (max-width: 414px) {
    #leyenda-wrapper {
        /* display: none; */
    }

    .leyenda {
        top: 8.5rem;
        bottom: auto;
        align-items: center;
        justify-content: center;
        left: 50%;
        transform: translateX(-50%);
        /* right: 0.5rem; */
        position: absolute;
        background-color: rgba(255, 255, 255, 0);
        border-radius: 0.5rem;
        padding: 0.8rem 1rem;
        display: grid;
        grid-auto-flow: column;
    }

    .leyenda .wrapper-content {
        width: 4rem;
        transition: all ease 0.2s;
    }

    .wrapper-content > img {
        width: 4rem;
        transition: all ease 0.2s;
    }
}

/* Tooltip */

.link-hotspot-gv-tooltip {
    position: absolute;
    display: grid;
    place-items: center;
    bottom: 70px;
    right: 0;
    /* margin-left: -50px; */
    font-size: 14px;
    width: 350px;
    padding: 8px 10px;
    border-radius: 5px;
    background-color: rgba(16, 24, 47, 0);
    background-color: rgba(16, 24, 47, 0.7);
    color: #fff;
    /* word-wrap: break-word; */
    /* text-overflow: ellipsis; */
    overflow: hidden;
    /* cursor: pointer; */
    opacity: 0;
    -ms-transform: translateX(-8px);
    -webkit-transform: translateX(-8px);
    transform: translateX(-8px);
    -webkit-transition: -ms-transform 0.3s,
        -webkit-transform 0.3s,
        transform 0.3s,
        opacity 0.3s;
    transition: -ms-transform 0.3s,
        -webkit-transform 0.3s,
        transform 0.3s,
        opacity 0.3s;
    z-index: 10000 !important;
}

.link-hotspot-gv:hover .link-hotspot-gv-tooltip {
    opacity: 1;
    -ms-transform: translateX(0);
    -webkit-transform: translateX(0);
    transform: translateX(0);
}

/* Prevent tooltip from triggering */
.link-hotspot-gv-tooltip {
    pointer-events: none;
}

.no-touch .link-hotspot-gv:hover .link-hotspot-gv-tooltip {
    pointer-events: all;
}

/* Fallback mode without pointer-events (IE8-10) */
.tooltip-fallback .link-hotspot-gv-tooltip {
    display: none;
}

.no-touch .tooltip-fallback .link-hotspot-gv:hover .link-hotspot-gv-tooltip {
    display: block;
}

.route-controls {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    background: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.route-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
}

.route-point {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.route-point-label {
    font-size: 12px;
    color: #666;
}

.route-point-name {
    font-weight: 500;
    color: #333;
}

.route-inputs button {
    padding: 8px 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.route-inputs button:hover {
    background: #45a049;
}

.block-marker {
    /* align center */
    display: grid;
    place-items: center;
}