/* 1. Usamos Flexbox en la etiqueta <label> para alinear todo horizontalmente. */
label {
    display: flex;
    /* Pone los elementos (checkbox y texto) uno al lado del otro */
    align-items: center;
    /* Centra verticalmente el checkbox con el texto */
    cursor: pointer;
    /* Muestra una mano al pasar el cursor */
    margin-bottom: 12px;
    /* Espacio entre cada opción de la lista */
    font-family: sans-serif;
    /* Una fuente legible (puedes cambiarla) */
}

/* 2. Ocultamos el checkbox original y creamos el nuestro. */
input[type="checkbox"] {
    /* Reseteo para quitar el estilo nativo del navegador */
    appearance: none;
    -webkit-appearance: none;
    margin: 0;

    /* Dimensiones y estilo de la caja */
    width: 1.5em;
    /* 1.5 veces el tamaño de la fuente actual */
    height: 1.5em;
    border: 2px solid #adb5bd;
    /* Borde gris */
    border-radius: 4px;
    background-color: white;
    /* Fondo blanco */

    /* Espacio entre la caja y el texto */
    margin-right: 0.6em;

    /* Transiciones suaves para los cambios de color */
    transition: all 0.2s ease-in-out;
}

/* 3. Estilo para cuando el checkbox está marcado (checked). */
input[type="checkbox"]:checked {
    background-color: #029999;
    /* Color de fondo verde */
    border-color: #029999;
    /* Color del borde verde */

    /* Añadimos el "tick" (✓) usando un SVG para alta calidad. */
    /* Es un SVG de un tick blanco codificado para no necesitar archivos externos. */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-size: 75%;
    background-position: center;
    background-repeat: no-repeat;
}

/* 2. Ocultamos el checkbox original y creamos el nuestro. */
input[type="radio"] {
    /* Reseteo para quitar el estilo nativo del navegador */
    appearance: none;
    -webkit-appearance: none;
    margin: 0;

    /* Dimensiones y estilo de la caja */
    width: 1.5em;
    /* 1.5 veces el tamaño de la fuente actual */
    height: 1.5em;
    border: 2px solid #adb5bd;
    /* Borde gris */
    border-radius: 25px;
    background-color: white;
    /* Fondo blanco */

    /* Espacio entre la caja y el texto */
    margin-right: 0.6em;

    /* Transiciones suaves para los cambios de color */
    transition: all 0.2s ease-in-out;
}

/* 3. Estilo para cuando el checkbox está marcado (checked). */
input[type="radio"]:checked {
    background-color: #029999;
    /* Color de fondo verde */
    border-color: #029999;
    /* Color del borde verde */

    /* Añadimos el "tick" (✓) usando un SVG para alta calidad. */
    /* Es un SVG de un tick blanco codificado para no necesitar archivos externos. */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-size: 75%;
    background-position: center;
    background-repeat: no-repeat;
}

/* 4. (Opcional) Mejora de accesibilidad para navegación con teclado. */
input[type="radio"]:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.flex-justify-between {
    justify-content: space-between;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 0.75rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.valid-input {
    border-color: #c2e9dd !important;
    background: #f4fff9;
    -webkit-transition: 0s;
    transition: 0s;

}

.invalid-input {
    border-color: #ffd6d6 !important;
    background: #fff2f2 ;
    -webkit-transition: 0s;
    transition: 0s;

}
.valid-input:not(select, [type="radio"], [type="checkbox"]) {
    background: #f4fff9 url(../../images/icons/icon-rebuild-exito.svg) calc(100% - .7rem) 50% no-repeat;
}

/* Estilo para inputs inválidos, excluyendo select, radio y checkbox */
.invalid-input:not(select, [type="radio"], [type="checkbox"]) {
    background: #fff2f2 url(../../images/icons/icon-rebuild-error.svg) calc(100% - .7rem) 50% no-repeat;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #ffffff;
    border: 3px solid #00AAA4;
    border-radius: 50%;
    cursor: pointer;
    margin-top: 0px;
    /* Centra el círculo verticalmente sobre la barra */
}

.range-slider::-moz-range-thumb {
    width: 18px;
    /* Firefox requiere un tamaño slightly different para el calculo del borde */
    height: 18px;
    background: #ffffff;
    border: 3px solid #00AAA4;
    border-radius: 50%;
    cursor: pointer;
    margin-top: 0;
}

.beautiful-input {
    appearance: none;
    background: transparent;
    line-height: 1;
    border: 0;
    border-radius: 7px;
    display: block;
    height: 40px;
    cursor: pointer;
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    font-size: 12px;
    transition: all .2s ease;
    background: #fff url(../../images/icons/file-input-icon.svg) 0 50% no-repeat;
    background-size: contain;
}

.form-error-tooltip{
    bottom: -15% !important;
    right: 5px !important;
}