body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #011224;

    position: absolute;
    width: 100%;
    height: 100%;
}

body.modal-abierto {
    overflow: hidden;
    height: 100%;
}

.grid-container {
    display: flex;
    width: 100%;
    height: 100%;
}

#map { 
    height: 100%; 
    width: 100%; 
          }
  .cargando {
      display: none;
      justify-content: center;
      align-items: center;
      height: 100vh;
  }


#ubicacion-container {
    margin-top: 7px;
    margin-bottom: 7px;
    flex: 1;
    padding: 10px;
    width: 95%;
    height: 25%;
}
.cargando {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Fondo oscuro con transparencia */
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Asegura que esté sobre otros elementos */
}

.container {
    width: 100%;
    margin: auto;
    background-color: #1e252bcc;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}
h2 {
    text-align: center;
    color: #99a3a4;
}

h3{
    text-align: center;
    color: #99a3a4;
    font-size: 18px !important;
}

.btn {
    display: block;
    width: 100%;
    height: 30px;
    padding-top: 12px;
    background-color: #405e7e;
    color: white;
    text-align: center;
    border-radius: 5px;
    margin-bottom: 1px;
    text-decoration: none;
}
label {
    display: block;
    margin-top: 5px;
    color: #99a3a4;

}
select, input {
    width: 100%;
    padding: 6px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #e8f0fe !important;
    box-sizing: border-box; 
}

.text-box {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #e8f0fe !important;
    box-sizing: border-box;

}
.salidas {
    margin-top: 15px;
}
.salida {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}
.salida select, .salida input {
    width: 48%;
    box-sizing: border-box; 
}
.add {
    display: block;
    width: 100%;
    padding: 10px;
    background: #405e7e;
    color: white;
    text-align: center;
    border-radius: 7px;
    cursor: pointer;
    margin-top: 10px;
    box-sizing: border-box; 

}


/* Asegura que el modal se posicione dejando visible el 25% superior */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 35vh;
    width: 100%;
    height: 65vh;
    background-color: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-soporte{
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 35vh; 
    width: 100%;
    height: 65vh;
    background-color: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease-in-out; 
    opacity: 0;
    pointer-events: none;


}

.modal-soporte.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content-soporte
{
    background: #1e252b;
    color: #99a3a4;
    width: 99%;
    overflow-y: auto; 
    padding: 20px;
    border: 2px solid #888;
    box-sizing: border-box;
    position: relative;
    overflow-y: auto; 
    height: 80vh; 
    align-items: flex-start;
    transition: opacity 2.3s ease-in-out, transform 2.3s ease-in-out; 
}

.modal-content-soporte.show {
    opacity: 1;
}

.modal-content {
    background: #2c363f;
    color: #99a3a4;
    padding: 5px, 15px, 10px 15px;
    position: relative;
    height: 100%;
    border-radius: 5%;
    border-top: 55px outset var(--borde-salida, rgb(11, 54, 148)); 
}

.modal-joystick {
    background: #2c363f;
    color: #99a3a4;
    padding: 20px;
    position: relative;
    height: 50%;
    border-radius: 5%;
}

.form{
    display: flex;
    height: 65%;
    flex-direction: column;
}
.form-h80{
    height: 80%;
}
.form-bottom {
    position: revert;
    bottom: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

}

.salidaActualOLD{
    color:white;
    display: flex;
    justify-content: space-around;
    margin-bottom: 5px;
    font-size: 15px;
}


.salidaActual {
    position: absolute;
    top: -45px;
    left: 50%;   
    transform: translate(-50%, -50%);
    background: transparent !important;
    color: white;
    padding: 0 12px;
    z-index: 1;
    pointer-events: none;
}


.close {
    color: #ff0000;
    float: right;
    position: absolute;
    top:-45px;
    right: 20px;
    font-size: 36px;
    font-weight: bold;
    text-shadow: 2px 2px 2PX black;

}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.salidasContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; 
    }

.salidabtn 
{
    width: calc(33.33% - 15px); /* Ajustado para incluir margenes y padding */
    box-sizing: border-box; /* Añadido */
    margin: 5px; 
    height: 50px;
    padding: 10px 15px;
    box-sizing: border-box; 
    text-align: center;
    background: #407e4d;
    color: white;
    text-align: center;
    border-radius: 7px;
    cursor: pointer;
    transition: background-color 0.3s ease; 

}
.cargando-text
{
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
}

a.inactive
{
    display: none !important;
}

.salidabtn.inactive {
    background-color: #ccc !important;
    color: #666 !important;
}

.colorS1 {
    background-color: #D95F3B; 
  }
  
  .colorS2 {
    background-color: #F0984A; 
    color: black; 
  }
  
  .colorS3 {
    background-color: #800080; 
  }
  
  .colorS4 {
    background-color: #7AA9A3; 
    color: black; 
  }
  
  .colorS5 {
    background-color: #338F9A ; 
  }
  
  .colorS6 {
    background-color: #1C4C70; 
  }
  
  .salidabtn:hover {
    opacity: 0.8;
  }

.flex-style{
    display: flex;
}
.margin-10px{
    margin: 10px;
}
.gap-20px{
    gap: 20px;
}

.size-30{
    width: 30%;
}
.size-50{
    width: 50%;
}
.size-70{
    width: 70%;
}

.bg-cute {
    background-color: #12191fd9;
    top: 30%;
}

/* Estilo para los botones de dos estados */
.two-state-button {
    display: inline-flex;
    border: 2px solid #007bff;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px;
}
.two-state-button div {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #C7D9ED;
    color: gray;
    transition: background-color 0.3s;
    font-size: 16px;
    width: 100px;
    text-align: center;
}
.two-state-button div.active {
    background-color: #0056b3;
    color: white;
}

/* Estilo base para el contenedor del botón de tres estados */
.three-state-button {
    display: inline-flex;
    border: 2px solid #007bff;
    border-radius: 5px;
    overflow: hidden;
    margin: 2px;
    width: 100%;
  }
  
  .three-state-button div {
    padding: 10px 15px;
    cursor: pointer;
    background-color: #C7D9ED;
    color: gray;
    transition: background-color 0.3s, color 0.3s;
    font-size: 12px;
    text-align: center;
    flex-grow: 1;
    box-sizing: border-box;
  }
  
  .three-state-button div.active {
    background-color: #0056b3;
    color: white;
  }
 
  .three-state-button img {
    filter: invert(0.4);
  }

  .three-state-button div.active img{
    filter: invert(1) !important;
  }



/* Estilo para los botones de cuatro estados */
.four-state-button {
    display: inline-flex;
    border: 2px solid #007bff; 
    border-radius: 5px;
    overflow: hidden;
    margin: 2px;
    width: 100%;
  }
  
  .four-state-button div { /* Seleccionamos directamente los divs dentro */
    padding: 10px 10px;
    cursor: pointer;
    background-color: #C7D9ED;
    color: gray;
    transition: background-color 0.3s, color 0.3s;
    font-size: 12px;
    width: 100px;
    text-align: center;
    flex-grow: 1;
    box-sizing: border-box;
  }
  
  .four-state-button div.active {
    background-color: #0056b3;
    color: white;
  }


  /* Estilo para los botones de cinco estados */
.five-state-button {
    display: inline-flex;
    border: 2px solid #007bff;
    border-radius: 5px;
    overflow: hidden;
    margin: 2px;
    width: 100%; 
  }
  
  .five-state-button div { 
    padding: 10px 10px;
    cursor: pointer;
    background-color: #C7D9ED;
    color: gray;
    transition: background-color 0.3s, color 0.3s;
    font-size: 12px;
    text-align: center;
    flex-grow: 1; 
    box-sizing: border-box; 
  }
  
  .five-state-button div.active {
    background-color: #0056b3;
    color: white;
  }



footer {
    display: NONE;
	position: flex;
	bottom: 0;
	width: 100%;
	background-color: #333;
	color: white;
	text-align: center;
	padding: 10px 0;
    max-height: 8%;
    z-index: 9998;
	}
    .classflex
    {
        display: flex;
    }

    .sinoBtn{
        display: block;
        padding: 10px;
        width: 100%;
        text-align: center;
        border-radius: 7px;
        cursor: pointer;
        margin: 10px;
        box-sizing: border-box; 
        height: 100px;
    }

    .siBtn{
        background: #61a707;
        color: white;        
        font-size: 25px;
    }

    .noBtn{
        background: #ac0d0d;
        color: white;
        font-size: 25px;
    }

    .btn-borrar-ultimo{
        padding: 5px;
        background: #531f1f;
        color: white;
        text-align: center;
        border-radius: 7px;
        cursor: pointer;
        box-sizing: border-box;
        position: absolute;
        top: 4px;
        left: 2px;
    }
    
    .btn-add-soporte{
        display: block;
        width: 100%;
        text-align: center;
        border-radius: 7px;
        cursor: pointer;
        margin: 3px;
        margin-top: 15px;
        box-sizing: border-box;
        height: 43px;
        background-color: #285a8f;
        color: white;
    }

    .btn-remove-soporte
    {
        display: block;
        width: 40%;
        text-align: center;
        border-radius: 7px;
        cursor: pointer;
        margin: 3px;
        margin-top: 15px;
        box-sizing: border-box;
        height: 43px;
        background-color: #8f2b28;
        color: white;

    }

    .btn-fin-salida
    {
        display: block;
        width: 100%;
        text-align: center;
        border-radius: 7px;
        cursor: pointer;
        margin: 3px;
        margin-top: 5px;
        box-sizing: border-box;
        height: 43px;
        background-color: #318f28;
        color: white;
    }


    @media (max-width: 600px) {
        .salidabtn {
            width: calc(50% - 15px); /* 2 botones por fila en pantallas pequeñas */
        }
    }

    @media (max-width: 200px) {
        .salidabtn {
            width: calc(100% - 15px); /* 1 botón por fila en pantallas muy pequeñas */
        }
    }


.form {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.nodisplay{
    display: none;
}

.center-text{
    text-align: center;
}

/* ESTILOS MODAL modal-overlay DEL JOYSTIC/

/* estilos-modal.css */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo oscuro semitransparente */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Asegura que esté por encima de otros elementos */
}



@media (max-height: 600px) {
    .modal-content {
        margin-top: 5%;
        margin-bottom: 5%;
    }
}

.modal-title {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 0.9em;
}

.form-group input[type="number"] {
    width: calc(100% - 12px);
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

#estadosLamparas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.lampara-estado {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lampara-estado label {
    flex-grow: 1;
}

.lampara-estado select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.joystick {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 5px; /* Espacio entre los botones */
    width: 170px; /* Ajusta el ancho según necesites */
    margin: 20px auto; /* Centrar el joystick */
}

.joystick .arrow {
    width: 50px;
    height: 50px;
    border: black;
    border-bottom: outset;
    background-color: #eee;
    color: #333;
    font-size: 1.2em;
    border-radius: 25%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.joystick .arrow:hover {
    background-color: #ddd;
}

.joystick .up {
    grid-column: 2;
    grid-row: 1;
}

.joystick .left {
    grid-column: 1;
    grid-row: 2;
}

.joystick .center {
    grid-column: 2;
    grid-row: 2;
    /* Puedes usar este espacio para un botón central si lo necesitas */
}

.joystick .right {
    grid-column: 3;
    grid-row: 2;
}

.joystick .down {
    grid-column: 2;
    grid-row: 3;
}

.joystick .middle-row {
    display: flex;
}

.ok-button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.ok-button:hover {
    background-color: #0056b3;
}

/* Estilos para el marcador (necesitarás agregar un elemento con la clase 'marcador' dinámicamente con JS) */
.marcador {
    /* Estilos para que el marcador sea visible */
    background-color: yellow;
    border: 2px solid orange;
    /* ... otros estilos visuales ... */
}


.custom-checkbox {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
    font-size: 16px;
    color: #f0f0f0;
    padding-top: 3px;
  }
  
  .custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
  }

  .custom-checkbox .checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #ccc;
    border-radius: 4px;
    transition: background-color 0.3s ease;
  }

  .custom-checkbox input:checked ~ .checkmark {
    background-color: #0056b3;
  }

  .custom-checkbox .checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }

  .custom-checkbox input:checked ~ .checkmark::after {
    display: block;
  }


  .center-items{
    display: flex;
    flex-wrap: wrap;
    align-content: center;
  }

  .margins5-15{
    margin: 5px;
    margin-top: 15px;
  }

  .ml-15{
    margin-left: 15px;
  }

  .separator{
    margin-top: 5px;
  }


  .parpadeo-suave {
    animation: parpadear 1s ease-in-out infinite alternate; 
  }
  
  @keyframes parpadear {
    from { opacity: 0; }
    to { opacity: 1; } 
  }


  .toggle-button {
  background-color: #dd6464;
  border: none;
  color: black;  
  padding: 0px 20px; 
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 0px 5px 0px 5px;
  cursor: pointer; 
  border-radius: 8px; 
  transition: background-color 0.4s ease, transform 0.1s ease, box-shadow 0.2s ease; 
}


.toggle-button.active {
    background-color: #61b358; 
    color: black; 
}


.toggle-button:active {
  background-color: #61b358;
  box-shadow: 0 5px #666;
  color: black;
  transform: translateY(4px); 
}


.toggle-button:active {
    background-color: #3e8e41 !important;  
    box-shadow: 0 2px #555;
    transform: translateY(2px);
}

.toggle-button:not(.active):active {
    background-color: #c05050 !important;
}


/* ///////////////MODAL VENTANA  MESSAGE BOX /////////////////*/

.contenedor_modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Fondo oscuro más intenso */
    justify-content: center;
    align-items: center;
    z-index: 1050; /* Un poco más alto por si acaso */
}

.ventana_modal {
background-color: #000000;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgb(0 0 0);
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    animation: deslizarArriba 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes deslizarArriba {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.cabecera_modal {
    background-color: #52769b;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#titulo_modal {
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #dddfe0;
}

.icono_cerrar {
    font-size: 2em;
    cursor: pointer;
    color: #4e5458;
    opacity: 0.8;
    transition: opacity 0.15s ease-in-out;
}

.icono_cerrar:hover {
    opacity: 1;
    color: #343a40;
}

.cuerpo_modal {
    padding: 25px;
    color: white;
    background-color: #405e7e;
}

#mensaje_modal {
    margin: 0;
    line-height: 1.7;
    font-size: 1.1em;
}

/* Estilos personalizados para éxito */
.modal_exito .cabecera_modal {
    background-color: #d1e7dd;
    border-bottom-color: #c3e6cb;
}

.modal_exito #titulo_modal {
    color: #155724;
}

/* Estilos personalizados para error */
.modal_error .cabecera_modal {
    background-color: #ad2431;
    border-bottom-color: #ad2431;
}

.modal_error #titulo_modal {
    color: #ffffff;
}