/* Estilos globales */
/* Estilo Dinamico del Logo Cargando */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.logo-cargando {
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 1.6vw;
    height: 1.6vw;
    animation: spin 2s linear infinite;
}
/* Estilo dinamico para cambiar de una señal a otra */
@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.fade-out {
    animation: fadeOut 1s forwards;
}

.fade-in {
    animation: fadeIn 1s forwards;
}

body {
    background-color: #20232d;
    font-family: Arial, sans-serif;
    color: white;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 100px;
    padding-bottom: 100px;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-y: scroll;
}

/* Estilos para el current-time */
.current-time {
    font-size: 2vw;
    color: white;
    margin-bottom: 4vw;
}

/* Estilos para el contenedor principal */
.container {
    background-color: #20232d;
    border-radius: 1vw;
    padding: 2vw;
    width: 90%;
    max-width: 80vw;
    aspect-ratio: 3 / 1;
    box-shadow: 0 0 2vw rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    position: relative;
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 55%;
    opacity: 1;
    animation: fadeIn 1s ease-in-out;
}

/* Estilos para el encabezado y pie de página */
.header, .footer {
    text-align: center;
    margin-bottom: 1vw;
    position: relative;
}

.header {
    font-size: 2vw;
}

.hora-ejecucion {
    color: yellow;
    font-weight: bold;
}

.content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70%;
}

.activo-financiero {
    text-align: center;
    width: 70%;
    height: 100%;
    position: relative;
}

.activo-financiero p {
    margin: 0.5vw 0;
}

.activo-financiero .nombre-activo {
    font-size: 10.2vw;
    font-weight: bold;
    color: white;
    position: relative;
    margin-bottom: -1.5vw;
    margin-top: -2vw;
}

.activo-financiero .otc {
    background-color: #ff7700;
    border-radius: 5px;
    padding: 0.2vw;
    font-size: 1.5vw;
    color: white;
    margin-left: 0.5vw;
}

.minutos-expiracion {
    font-size: 2.7vw;
    color: white;
    position: relative;
    margin-top: -1vw;
}

.minutos-expiracion .tiempo {
    color: yellow;
    font-weight: bold;
}

.indicador-operacion {
    text-align: center;
    border-radius: 1.5vw;
    padding: 1vw;
    width: 22%;
    height: 80%;
    position: relative;
}

.indicador-operacion p {
    margin: 0;
    font-size: 2vw;
    font-weight: bold;
}

.indicador-operacion .icono {
    font-size: 14vw;
    margin-top: -12px;
}

.footer {
    font-size: 2vw;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1vw;
}

.footer .tiempo-restante {
    color: yellow;
    font-weight: bold;
    margin-left: 1vw;
    margin-right: 1vw;
}

.logo-cargando {
    width: 1.6vw;
    height: 1.6vw;
    border: 0.5vw solid #60677c;
    border-top: 0.5vw solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 1vw;
}

/* Estilos para el tooltip */
.tooltip {
    display: none;
    position: absolute;
    background-color: #50586d;
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 1.5vw;
    z-index: 1000;
    pointer-events: none;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 10%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #50586d transparent transparent transparent;
}

/* Estilos para el selector de zona horaria */
#timezone-selector-container {
    margin-top: 2vw;
    text-align: center;
}

#timezone-selector-container label {
    color: #aebdf1;
    font-size: 1.2vw;
    display: block;
    margin-bottom: 0.5vw;
    font-weight: normal;
}

#timezone-selector {
    background-color: #353c4e;
    color: white;
    font-size: 2.5vw;
    padding: 0.5vw;
    border: none;
    border-radius: 5px;
    outline: none;
    width: 100%;
    max-width: 40vw;
}

#timezone-selector option {
    background-color: #1a202e;
    color: white;
}

#timezone-selector option:hover {
    background-color: #353c4e;
}

#timezone-selector option:checked {
    background-color: #1a202e;
    font-weight: bold;
}

/* Estilos para el formulario de Telegram */
#telegram-form-container {
    background-color: rgb(58, 66, 85);
    margin-top: 50px;
    width: 80%;
    max-width: 80vw;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

#telegram-form-container h2 {
    font-size: 3vw;
    color: #67a6fb;
    margin-top: -2px;
}

#telegram-form-container p {
    font-size: 1.8vw;
    color: white;
    margin-bottom: 20px;
}

#telegram-form label {
    font-size: 1.8vw;
    color: slategrey;
    display: block;
    margin-bottom: 5px;
}

#telegram-form input[type="text"] {
    width: 90%;
    padding: 10px;
    background-color: #191f2d;
    margin: 10px 0;
    border-radius: 5px;
    border: none;
    font-size: 2.5vw;
    color: #99a7cc;
}

#telegram-form .checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.8vw;
    color: white;
}

#telegram-form .checkbox-container input {
    width: 2vw;
    height: 2vw;
    margin-right: 10px;
}

#telegram-form button {
    background-color: #2cac40;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.8vw;
    margin-top: 5px;
}

#telegram-form button.restart {
    background-color: #b64434;
}

/* Media queries para ajustar estilos específicos de dispositivos móviles */
@media (max-width: 768px) {
    .current-time {
        font-size: 4vw;
    }

    .footer {
        margin-top: 1vw;
        font-size: 3vw;
        display: inherit;
    }

    .header {
        font-size: 3.1vw;
        margin-top: -1vw;
        margin-bottom: -0.4vw;
    }

    #timezone-selector-container label {
        font-size: 3.5vw;
    }

    #timezone-selector {
        background-color: #353c4e;
        color: white;
        font-size: 4vw;
        padding: 0.5vw;
        border: none;
        border-radius: 5px;
        outline: none;
        width: 100%;
        max-width: 90%;
    }

    .minutos-expiracion {
        font-size: 3.2vw;
    }

    .indicador-operacion p {
        font-size: 3vw;
    }

    .indicador-operacion .icono {
        margin-bottom: 0;
    }

    #telegram-form-container h2 {
        font-size: 5vw;
        color: #67a6fb;
        margin-top: -2px;
    }

    #telegram-form label {
        font-size: 2.8vw;
        display: block;
        margin: 0;
        color: slategrey;
    }

    #telegram-form input[type="text"] {
        width: 95%;
        padding: 10px;
        background-color: #191f2d;
        margin: 10px 0;
        border-radius: 5px;
        border: none;
        font-size: 3vw;
        color: #99a7cc;
    }

    #telegram-form button {
        background-color: #2cac40;
        color: white;
        padding: 10px 20px;
        border: none;
        border-radius: 5px;
        font-size: 4vw;
        cursor: pointer;
        margin-top: 5px;
    }

    #telegram-form-container p {
        font-size: 2.2vw;
        color: white;
        margin-bottom: 20px;
    }

    #telegram-form .checkbox-container input {
        width: 4vw;
        height: 4vw;
    }
}
