/* LOGIN.PHP */

@font-face {
    font-family: 'titulo';
    src: url('../fonts/Montserrat-Medium.ttf') format('truetype');
}

/* LOGIN.PHP - Página y contenedor */

@font-face {
    font-family: 'texto';
    src: url('../fonts/Inter_18pt-Light.ttf') format('truetype');
}

body {
    font-family: 'texto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

/* LOGIN.PHP - Botón volver inicio */
.btn-volver-inicio {
    /* estilo desktop: fijo en esquina */
    position: fixed;
    top: 18px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 18px;
    background: var(--nv-green, #75bde0);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'texto', sans-serif;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.10);
    z-index: 1100;
    transition: background .2s, transform .12s;
}

/* LOGIN.PHP - Responsive */
/* comportamiento responsive: en móviles se integra con el contenedor y toma ancho similar a los botones */
@media (max-width: 800px) {
    .btn-volver-inicio {
        position: relative;
        /* dejar dentro del flujo */
        top: auto;
        left: auto;
        margin: 12px auto;
        width: calc(100% - 48px);
        max-width: 380px;
        display: inline-flex;
        justify-content: center;
        box-shadow: 0 6px 18px rgba(39, 174, 96, 0.08);
    }
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url("../img/fondo.webp");
    background-size: cover;
    background-repeat: no-repeat;
}

.container {
    position: relative;
    width: calc(100% - 40px);
    max-width: 850px;
    height: 550px;
    background: #fff;
    margin: 20px;
    border-radius: 30px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .2);
    overflow: hidden;
}

.container h1 {
    font-size: 36px;
    margin: -10px 0;
}

.container p {
    font-size: 14.5px;
    margin: 15px 0;
}

form {
    width: 100%;
}

/* LOGIN.PHP - Panel de acceso / registro */
.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    color: #333;
    text-align: center;
    padding: 40px;
    z-index: 1;
    transition: .6s ease-in-out 1.2s, visibility 0s 1s;
}

.container.active .form-box {
    right: 50%;
}

.form-box.register {
    visibility: hidden;
}

.container.active .form-box.register {
    visibility: visible;
}

.input-box {
    position: relative;
    margin: 30px 0;
}

.input-box input,
.input-box select {
    width: 100%;
    padding: 13px 50px 13px 20px;
    background: #eee;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.input-box input::placeholder {
    color: #888;
    font-weight: 400;
}

.input-box select {
    cursor: pointer;
    color: #888 !important;
}

.input-box select:valid {
    color: #333 !important;
}

.input-box select option {
    background: #fff;
    color: #333;
}

.input-box select option[disabled] {
    color: #888;
}

.input-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.forgot-link {
    margin: -15px 0 15px;
}

.forgot-link a {
    font-size: 14.5px;
    color: #333;
}

.btn,
.form-container button {
    display: inline-flex;
    /* centra verticalmente */
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    /* conserva altura original */
    padding: 0 18px;
    /* mantiene forma */
    border-radius: 8px;
    /* forma original */
    line-height: 1;
    /* evita desalineación de texto */
    vertical-align: middle;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
}

.btn {
    width: 100%;
    height: 48px;
    background: #7494ec;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
}

#nv-open-register{
    margin-bottom: 15px !important;

}

.toggle-box {
    position: absolute;
    width: 100%;
    height: 100%;
}

.toggle-box::before {
    content: '';
    position: absolute;
    left: -250%;
    width: 300%;
    height: 100%;
    background: #7494ec;
    /* border: 2px solid red; */
    border-radius: 150px;
    z-index: 2;
    transition: 1.8s ease-in-out;
}

.container.active .toggle-box::before {
    left: 50%;
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    /* background: seagreen; */
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: .6s ease-in-out;
}

.toggle-panel.toggle-left {
    left: 0;
    transition-delay: 1.2s;
}

.container.active .toggle-panel.toggle-left {
    left: -50%;
    transition-delay: .6s;
}

.toggle-panel.toggle-right {
    right: -50%;
    transition-delay: .6s;
}

.container.active .toggle-panel.toggle-right {
    right: 0;
    transition-delay: 1.2s;
}

.toggle-panel p {
    margin-bottom: 20px;
}

.toggle-panel .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 46px;
    padding: 0 16px;
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
    border-radius: 8px;
    line-height: 1;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 24px;
    color: #333;
    background: #fff;
    width: 44px;
    height: 44px;
}

@media screen and (max-width: 650px) {
    .container {
        height: calc(100vh - 40px);
        min-height: 650px;
    }

    .form-box {
        bottom: 0;
        width: 100%;
        height: 70%;
        overflow-y: auto;
        align-items: flex-start;
    }
    
    .form-box form {
        margin: auto;
    }

    .container.active .form-box {
        right: 0;
        bottom: 30%;
    }

    .toggle-box::before {
        left: 0;
        top: -270%;
        width: 100%;
        height: 300%;
        border-radius: 20vw;
    }

    .container.active .toggle-box::before {
        left: 0;
        top: 70%;
    }

    .container.active .toggle-panel.toggle-left {
        left: 0;
        top: -30%;
    }

    .toggle-panel {
        width: 100%;
        height: 30%;
    }

    .toggle-panel.toggle-left {
        top: 0;
    }

    .toggle-panel.toggle-right {
        right: 0;
        bottom: -30%;
    }

    .container.active .toggle-panel.toggle-right {
        bottom: 0;
    }
}

@media screen and (max-width: 400px) {
    .form-box {
        padding: 20px;
    }

    .toggle-panel h1 {
        font-size: 30px;
    }
}

/* Ajustes: centrar texto de botones y preservar estilo de social icons */

/* Botones principales (Register / Login) - mantener forma pero centrar texto */
.btn,
.form-container button {
    display: inline-flex;
    /* centra verticalmente */
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    /* conserva altura original */
    padding: 0 18px;
    /* mantiene forma */
    border-radius: 8px;
    /* forma original */
    line-height: 1;
    /* evita desalineación de texto */
    vertical-align: middle;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
}

/* Asegura que el texto del botón no baje (por iconos o wrap) */
.btn>* {
    display: inline-block;
}

/* Botón "ghost" dentro de los panels (Register/Login side) */
.toggle-panel .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 46px;
    padding: 0 16px;
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
    border-radius: 8px;
    line-height: 1;
}

/* Mantener exactamente el estilo previo de los iconos sociales */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 24px;
    color: #333;
    background: #fff;
    width: 44px;
    height: 44px;
}

/* Pequeño ajuste responsive si el texto del botón tuviera wrap */
@media (max-width:420px) {

    .btn,
    .toggle-panel .btn {
        height: 44px;
        font-size: 15px;
    }
}

/* Paleta NutriVida (sobrescribe azules anteriores) */
:root {
    --nv-green: #6FBE4A;
    --nv-green-dark: #4b9e25;
    --nv-accent: #75bde0;
    --nv-curve: linear-gradient(90deg, var(--nv-green), var(--nv-accent));
}

/* Reemplazos de color (añadir al final para que tengan prioridad) */
.btn {
    background: var(--nv-green) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.12) !important;
}

.btn:hover {
    background: var(--nv-green-dark) !important;
}

/* Franja / curva decorativa */
.toggle-box::before {
    background: var(--nv-curve) !important;
}

/* Enlaces importantes */
.forgot-link a,
.btn-volver-inicio {
    color: #fff;
    /* el botón volver ya tiene fondo verde, se mantiene */
}

.forgot-link a {
    color: var(--nv-green);
}

/* Botón ghost dentro de paneles: mantener borde blanco pero usar sombra/tono */
.toggle-panel .btn {
    border-color: rgba(255, 255, 255, 0.9) !important;
    color: #fff !important;
}

/* Iconos sociales: borde sutil en verde */
.social-icons a {
    border-color: rgba(39, 174, 96, 0.12) !important;
}

/* Sobrescribe estilos de iconos sociales para usar colores de marca */
.social-icons a {
    border: none !important;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Selección por aria-label (usa los atributos que ya tienes en el HTML) */
.social-icons a[aria-label="Google"] {
    background: #db4437;
}

/* Google */
.social-icons a[aria-label="Facebook"] {
    background: #1877f2;
}

/* Facebook */
.social-icons a[aria-label="GitHub"] {
    background: #24292e;
}

/* GitHub */
.social-icons a[aria-label="LinkedIn"] {
    background: #0a66c2;
}

/* LinkedIn */

/* Hover: oscurecer ligeramente */
.social-icons a:hover {
    transform: translateY(-2px);
    filter: brightness(.95);
    transition: .18s;
}

/* Si usas iconos en color (no blancos), fuerza que sean blancos */
.social-icons a i {
    color: #fff !important;
}

/* Mobile: ajustar tamaño si hace falta */
@media (max-width:420px) {
    .social-icons a {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Asegurar consistencia en dispositivos pequeños */
@media (max-width:420px) {

    .btn,
    .toggle-panel .btn {
        height: 44px;
        font-size: 15px;
    }
}