/* --- Variables y Configuración Base --- */
:root {
    --bg-dark: #212428;
    --card-bg: #292e35; /* Un poco más claro que el fondo para contraste */
    --primary: #ff014f;
    --text-main: #c4cfde;
    --text-muted: #878e99;
    --shadow: 10px 10px 19px #1c1e22, -10px -10px 19px #262a2e;
}

/* Ocultar títulos originales de WooCommerce porque usaremos el Switch */
.u-column1 h3, .u-column2 h3 {
    display: none;
}

/* --- Contenedor Principal (La Tarjeta) --- */
#customer_login {
    display: block !important; /* Romper el grid original */
    max-width: 500px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5); /* Sombra elegante */
    position: relative;
    overflow: hidden;
    min-height: 550px; /* Altura mínima para evitar saltos */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Estilos del Switch (Botones Superiores) --- */
.auth-switch-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background: #212428;
    padding: 5px;
    border-radius: 10px;
    position: relative;
}

.auth-switch-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    z-index: 2;
}

.auth-switch-btn.active {
    color: #fff;
    background-color: var(--primary);
    box-shadow: 0 4px 15px rgba(255, 1, 79, 0.4);
}

/* --- Gestión de las Columnas (Login vs Register) --- */
.u-column1, .u-column2 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    position: absolute; /* Para superponerlas */
    top: 110px; /* Espacio para el switch */
    left: 0;
    padding: 0 20px !important;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    visibility: hidden;
    transform: translateX(50px);
}

/* Estado Activo (Visible) */
.form-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 5;
    position: relative; /* Vuelve al flujo para dar altura */
    top: 0;
}

/* --- Estilizado de Inputs (WooCommerce) --- */
.woocommerce form .form-row .input-text {
    background-color: #191b1e;
    border: 2px solid #212428;
    border-radius: 8px;
    color: var(--text-main);
    padding: 15px;
    height: auto;
    transition: 0.3s;
    outline: none;
}

.woocommerce form .form-row .input-text:focus {
    border-color: var(--primary);
    background-color: #191b1e;
    box-shadow: 0 0 10px rgba(255, 1, 79, 0.2);
}

.woocommerce form .form-row label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

/* --- Botones de Acción --- */
.woocommerce button.button {
    width: 100%;
    background: linear-gradient(145deg, var(--primary), #d00040) !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 15px !important;
    font-weight: bold;
    border: none;
    margin-top: 10px;
    transition: transform 0.2s;
}

.woocommerce button.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 1, 79, 0.3);
}

/* --- Enlaces y Textos Extra --- */
.woocommerce-LostPassword a, .woocommerce-privacy-policy-text a {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
}

.woocommerce-form-login__rememberme {
    color: var(--text-main);
}

/* Checkbox personalizado */
input[type="checkbox"] {
    accent-color: var(--primary);
}


/* CONTENEDOR */
.woocommerce-notices-wrapper {
    margin-bottom: 14px;
}
/* ALERTA ERROR */
.woocommerce-error {
    display: flex;
    align-items: center;
    gap: 10px;

    background: transparent;
    border: 1px solid #ffd6d6;
    border-left: 4px solid #e63946;

    color: #7a1f1f !important;
    font-size: 12px !important;
    line-height: 1.4;

    padding: 10px 14px;
    border-radius: 8px;

    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

 
.woocommerce-error::before {
    position: static;
    margin: 0;
    font-size: 12px;
}

/* TEXTO */
.woocommerce-error li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* UL INTERNO */
.woocommerce-error ul {
    margin: 0;
    padding: 0;
}



/* --- Estilos Responsivos para MOviL y Tablets  --- */
@media (max-width: 768px) {
    #customer_login {
        width: 95%; /* Que no ocupe todo el ancho de la pantalla */
        margin: 15px auto; /* Un poco de margen arriba y abajo */
        padding: 10px; /* Menos padding interno que en escritorio */
        min-height: auto; /* Que la altura se adapte al contenido */
        box-shadow: 0 0 20px rgba(0,0,0,0.3); /* Sombra más suave */
    }

    .u-column1, .u-column2 {
        padding: 0 !important;
    }

    /* 3. Ajustar el interruptor (Switch) */
    .auth-switch-wrapper {
        margin-bottom: 25px;
    }

    .auth-switch-btn {
        padding: 5px;
        font-size: 12px; /* Texto un poco más pequeño */
    }

    .woocommerce form .form-row label {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        white-space: nowrap; /* Evita que el texto y el asterisco se separen */
    }
    
    .woocommerce form .form-row label .required {
        display: inline;
        float: none;
        margin-left: 4px;
    }

    /* 5. Asegurar que los inputs y el botón ocupen todo el ancho */
    .woocommerce form .form-row,
    .woocommerce form .form-row .input-text,
    .woocommerce button.button {
        width: 100% !important;
        box-sizing: border-box; 
    }

    /* 6. Ajustes específicos para el input de contraseña con el "ojo" */
    .woocommerce form .form-row .password-input {
        width: 100%;
        display: block;
        position: relative;
    }
    .woocommerce form .form-row .password-input input {
        padding-right: 45px;  
    }
    /* Centrar verticalmente el icono del ojo */
    .woocommerce form .form-row .show-password-input {
        top: 50%;
        transform: translateY(-50%);
        right: 10px;
    }

    /* 7. Centrar el enlace de "Lost your password?" */
    .woocommerce-LostPassword a, .woocommerce-privacy-policy-text a  {
        text-align: center;
        margin-top: 20px;
    }
}