/* ==========================================================
   CONFIGURACIÓN GENERAL
   ========================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    padding: 0;
}

html {
    background-color: #003EF2;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 18px;

    display: flex;
    justify-content: center;
    align-items: center;

    background-color: #003EF2;

    font-family: Arial, Helvetica, sans-serif;

    position: relative;
    overflow-x: hidden;
}


/* ==========================================================
   FONDO TECNOLÓGICO
   ========================================================== */

body::before {
    content: "";

    position: fixed;
    inset: 0;

    background-image: url("../img/backtech.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    z-index: 0;
    pointer-events: none;
}


/* ==========================================================
   TARJETA PRINCIPAL
   ========================================================== */

.formulario {
    width: 100%;
    max-width: 520px;

    padding: 24px 32px;

    background: #ffffff;

    border-radius: 18px;

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.14);

    position: relative;
    z-index: 5;
}


/* ==========================================================
   ENCABEZADO
   ========================================================== */

.formulario > p:first-child {
    margin-top: 0;
    margin-bottom: 3px;

    text-align: center;
}

.formulario img {
    width: 47% !important;

    max-width: 250px;
    min-width: 165px;

    height: auto;
}

.formulario h1 {
    margin-top: -8px !important;
    margin-bottom: 8px;

    text-align: center;

    color: #003EF2;

    font-size: 26px;
    font-weight: 700;
}

.formulario h1 + p {
    margin-top: 0;
    margin-bottom: 6px;

    text-align: center;

    color: #111111;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.descripcion {
    margin-top: 0;
    margin-bottom: 15px;

    text-align: center;

    color: #5b6473;

    font-size: 13px;
    line-height: 1.4;
}


/* ==========================================================
   FORMULARIO
   ========================================================== */

form {
    width: 100%;
}


/* ==========================================================
   CAMPOS
   ========================================================== */

.campo {
    width: 100%;
    margin-bottom: 12px;
}

label {
    display: block;

    margin-bottom: 6px;

    font-weight: 700;
    font-size: 12px;

    color: #242c3a;
}


/* ==========================================================
   CONTENEDOR DE VALIDACIÓN
   ========================================================== */

.input-validacion {
    position: relative;
    width: 100%;
}


/* ==========================================================
   INPUT / SELECT / TEXTAREA
   ========================================================== */

.input-validacion input,
.input-validacion select,
.input-validacion textarea {
    width: 100%;

    border: 1px solid #cbd3df;
    border-radius: 8px;

    background-color: #ffffff;

    color: #1e293b;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* ==========================================================
   INPUTS Y SELECTS
   ========================================================== */

.input-validacion input,
.input-validacion select {
    height: 40px;

    padding:
        8px
        38px
        8px
        12px;
}


/* ==========================================================
   TEXTAREA
   ========================================================== */

.input-validacion textarea {
    height: 86px;
    min-height: 86px;
    max-height: 86px;

    padding:
        10px
        38px
        10px
        12px;

    resize: none;

    line-height: 1.35;

    overflow-y: auto;
}


/* ==========================================================
   PLACEHOLDER
   ========================================================== */

.input-validacion input::placeholder,
.input-validacion textarea::placeholder {
    color: #94a3b8;
}


/* ==========================================================
   FOCUS
   ========================================================== */

.input-validacion input:focus,
.input-validacion select:focus,
.input-validacion textarea:focus {
    border-color: #245cff;

    outline: none;

    box-shadow:
        0 0 0 3px rgba(36, 92, 255, 0.10);
}


/* ==========================================================
   SELECT
   ========================================================== */

.input-validacion select {
    cursor: pointer;
}


/* ==========================================================
   FECHA + HORA INICIO + HORA FINAL
   ========================================================== */

.fila-fecha-horas {
    width: 100%;

    display: grid;

    grid-template-columns:
        1.25fr
        1fr
        1fr;

    gap: 10px;

    align-items: start;
}

.fila-fecha-horas .campo {
    min-width: 0;
    margin-bottom: 12px;
}

.fila-fecha-horas label {
    white-space: nowrap;
}


/* ==========================================================
   ICONO DE ESTADO
   ========================================================== */

.estado-campo {
    position: absolute;

    right: 12px;
    top: 50%;

    transform: translateY(-50%);

    width: 18px;
    height: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;
    font-weight: bold;

    pointer-events: none;

    z-index: 10;
}


/* ==========================================================
   ICONO EN TEXTAREA
   ========================================================== */

.textarea-validacion .estado-campo {
    top: 10px;
    transform: none;
}


/* ==========================================================
   CAMPO VÁLIDO
   ========================================================== */

.campo-valido {
    border-color: #28a745 !important;
    background-color: #f5fff7 !important;
}

.estado-valido {
    color: #28a745;
}


/* ==========================================================
   CAMPO INVÁLIDO
   ========================================================== */

.campo-invalido {
    border-color: #dc3545 !important;
    background-color: #fff7f7 !important;
}

.estado-invalido {
    color: #dc3545;
}


/* ==========================================================
   MENSAJE DE VALIDACIÓN
   ========================================================== */

.mensaje-validacion {
    display: block;

    margin-top: 4px;

    font-size: 11px;
    line-height: 1.25;

    color: #dc3545;

    min-height: 0;
}


/* Cuando no hay mensaje no reserva espacio */

.mensaje-validacion:empty {
    display: none;
}


/* ==========================================================
   TEXTO DE AYUDA
   ========================================================== */

.ayuda {
    display: block;

    margin-top: 5px;
    margin-bottom: 0;

    color: #6e7684;

    font-size: 11px;
    line-height: 1.35;
}


/* ==========================================================
   BOTÓN
   ========================================================== */

#btnEnviar {
    width: 100%;
    height: 40px;

    margin-top: 6px;

    border: 0;
    border-radius: 8px;

    background: #245cff;

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

#btnEnviar:hover:not(:disabled) {
    background: #1648d3;

    transform: translateY(-1px);
}

#btnEnviar:disabled {
    opacity: 0.55;

    cursor: not-allowed;

    background: #6f8ce5;
}


/* ==========================================================
   FLATPICKR MODERNO
   ========================================================== */

.flatpickr-calendar {
    border: none !important;

    border-radius: 14px !important;

    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.20) !important;

    overflow: hidden;
}

.flatpickr-months {
    background:
        linear-gradient(
            135deg,
            #245cff,
            #003EF2
        ) !important;

    padding-top: 6px;
    padding-bottom: 6px;
}

.flatpickr-month,
.flatpickr-current-month,
.flatpickr-current-month input.cur-year,
.flatpickr-prev-month,
.flatpickr-next-month {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.flatpickr-weekdays {
    background: #f3f6ff !important;
}

span.flatpickr-weekday {
    color: #5b6473 !important;

    font-size: 11px !important;
    font-weight: 700 !important;
}

.flatpickr-day {
    border-radius: 50% !important;

    font-size: 12px !important;
}

.flatpickr-day:hover {
    background: #e8efff !important;

    border-color: #e8efff !important;

    color: #245cff !important;
}

.flatpickr-day.today {
    border-color: #245cff !important;

    color: #245cff !important;

    font-weight: 700 !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #245cff !important;

    border-color: #245cff !important;

    color: #ffffff !important;

    box-shadow:
        0 4px 10px rgba(36, 92, 255, 0.25) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #cfd6e1 !important;

    background: transparent !important;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 600px) {

    body {
        padding: 14px;

        align-items: center;
    }

    .formulario {
        padding:
            22px
            20px;

        border-radius: 14px;
    }

    .formulario img {
        width: 50% !important;

        min-width: 145px;
    }

    .formulario h1 {
        font-size: 23px;

        margin-bottom: 7px;
    }

    .descripcion {
        font-size: 12px;

        margin-bottom: 13px;
    }

    .campo {
        margin-bottom: 10px;
    }

    label {
        margin-bottom: 5px;
    }

    .input-validacion input,
    .input-validacion select {
        height: 38px;

        font-size: 12px;
    }

    .input-validacion textarea {
        height: 82px;
        min-height: 82px;
        max-height: 82px;

        font-size: 12px;
    }

    .fila-fecha-horas {
        grid-template-columns:
            1.2fr
            1fr
            1fr;

        gap: 6px;
    }

    .fila-fecha-horas .campo {
        margin-bottom: 10px;
    }

    .fila-fecha-horas label {
        font-size: 10px;
    }

    .mensaje-validacion {
        font-size: 10px;
    }

    .ayuda {
        font-size: 10px;
        margin-top: 4px;
    }

    #btnEnviar {
        font-size: 13px;

        height: 38px;

        margin-top: 5px;
    }

    .estado-campo {
        right: 10px;

        font-size: 14px;
    }
}