body {
    background-image: url('./../img/fondo-formulario.png') !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center !important;
}

img {
    width: 170px;
    align-self: center;
}

h2 {
    text-align: center;
    /* COMRPIMIR ESPACIO VERTICAL DEL H2 */
    line-height: .9;
    font-size: xxx-large;
    font-weight: bold;
}

form {
    display: flex;
    width: 600px;
    flex-direction: column;
    background: #1C4379;
    padding: 1.5rem;
    color: #ffffff;
    border-radius: 10px;
    gap: .8rem;
}

form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

form select {
    outline: none;
    background: none;
    color: rgb(248, 248, 248);
    border: 1px solid #000000;
    border-radius: 5px;
    padding: 10px 12px;
}

form select option {
    /* Fondo oscuro */
    color: #ffffff;

    /* Textrgb(0, 0, 0)nco */
    font-family: Arial;
    /* Fuente */
    padding: 10px;
    /* ⚠️ OJO: Solo funciona en algunos navegadores (como Firefox) */
    border: none;
}

form label {
    font-weight: bold;
}

#label-span {
    display: flex;
    align-items: center;
}

#btn-popup-referencia {
    cursor: pointer;

    font-size: 16px;

    margin-left: 10px;

    background-color: #ACD3E2;
    color: #1C4379;

    border-radius: 50%;

    padding: 1px 2px;


}

form input[type="text"]::placeholder,
form input[type="email"]::placeholder,
form input[type="number"]::placeholder {
    color: #00000091;
    opacity: 1;
    /* Algunos navegadores bajan la opacidad por defecto */
}

form input[type="text"],
form input[type="email"],
form input[type="number"] {
    border-radius: 5px;
    /* outline: ; */
    background-color: white;
    color: rgb(0, 0, 0);
    border: 1px solid #000000;
    padding: 10px 12px;
}

input[type="file"]::file-selector-button {
    background: #ACD3E2;
    color: #1C4379;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
}

form input:focus,
form input:active {
    outline: none;
    /* Seguimos quitando el azul del navegador */
    box-shadow: none;
    /* Seguimos sin sombras */
    border: 1px solid rgb(0, 0, 0);
    /* <--- AQUÍ pones el borde blanco */
}

input::placeholder {
    color: rgb(0, 0, 0);
    opacity: 1;
    /* Algunos navegadores bajan la opacidad por defecto */
}


form button {
    background-color: #ACD3E2;
    border: none;
    color: #1C4379;
    padding: 10px 12px;
    border-radius: 5px;
    font-weight: bold;

    font-size: 1.2rem;

    width: 300px;
    align-self: center;

    transition: all .2s ease-in-out;
}

form button:hover {
    background-color: #1f2c4c;
    color: white;
}

a {
    color: #6ed5ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
}

.loading-overlay.active {
    display: flex;
}

.loading-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    color: #ffffff;
    max-width: 320px;
    width: 100%;
    backdrop-filter: blur(8px);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 18px;
}

.loading-box p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.loading-box span {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.85;
    font-weight: 400;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


@media (max-width: 768px) {
    body {
        background-image: url("./../img/fondo-formulario-mobile.jpg") !important;
    }

    h2 {
        font-size: 1.7rem;
        line-height: 1.05;
    }

    form {
        width: 90vw;
        padding: 1.25rem;
        /* gap: 1rem; */
    }

    form button {
        width: auto;
        font-size: 1rem;
    }

    img {
        width: 140px;
    }
}

/* PARA POPUP */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    pointer-events: none;

    transition: 0.3s;
    z-index: 9999;

    padding: 1rem;
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.popup-box {
    background: white;
    width: 100%;
    max-width: 500px;

    border-radius: 14px;

    position: relative;

    animation: popupShow 0.25s ease;
}

.popup-box img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.popup-box p {
    padding: 1rem;
    margin: 0;

    font-size: 15px;
    line-height: 1.4;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.7);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.popup-close span {
    font-size: 22px;
}

@keyframes popupShow {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 600px) {

    .popup-box {
        max-width: 100%;
        border-radius: 12px;
    }

    .popup-box p {
        font-size: 14px;
    }

}