/* 
 * REGISTER STYLES - CoworkingByVimod 
 * Styles for the user registration page
 */

body { transition: background 0.4s ease, color 0.4s ease; }

/* Sobrescribir colores para la página de registro usando RGB más oscuros y vivos */
:root {
    --bg-main: rgb(12, 16, 28);
    --bg-glass: rgba(18, 24, 40, 0.92);
}

.glass-bg {
    background: rgb(12, 16, 28) !important;
}

body.light-mode .glass-bg {
    background: rgb(240, 244, 248) !important;
}

/* Fix for buttons to use solid colors instead of gradients */
.auth-container .btn-primary {
    background: rgb(5, 45, 97) !important;
}

.auth-container .btn-primary:hover {
    background: rgb(3, 30, 65) !important;
}

.auth-container { 
    max-width: 550px; 
    margin: clamp(3rem, 8vh, 8rem) auto; 
    padding: 0 1.5rem; 
}

.auth-header { 
    text-align: center; 
    margin-bottom: 2.5rem; 
}

.auth-header h2 { 
    font-size: 2rem; 
    margin-bottom: 0.5rem; 
    color: var(--text-main); 
}

/* Alert Notifications */
.alert { 
    padding: 1rem; 
    border-radius: var(--radius-md); 
    margin-bottom: 1.5rem; 
    font-size: 0.9rem; 
    text-align: center; 
    border: 1px solid transparent; 
    display: none; 
}

.alert-error { 
    background: rgba(244, 63, 94, 0.1); 
    color: #fb7185; 
    border-color: rgba(244, 63, 94, 0.2); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
}

/* Grid Layout for Form Rows */
.form-row { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1.25rem; 
}

@media (max-width: 600px) { 
    .form-row { 
        grid-template-columns: 1fr; 
        gap: 0; 
    } 
}

/* Input Styles */
.form-input { 
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid var(--glass-border); 
    padding: 0.85rem 1.1rem; 
    border-radius: var(--radius-md); 
    color: var(--text-main); 
    width: 100%; 
    transition: var(--transition); 
}

.form-input:focus { 
    outline: none; 
    border-color: var(--primary); 
    background: rgba(255, 255, 255, 0.06); 
    box-shadow: 0 0 0 4px var(--primary-glow); 
}

.form-label { 
    display: block; 
    font-size: 0.8rem; 
    font-weight: 600; 
    margin-bottom: 0.5rem; 
    color: var(--text-muted); 
}

/* Light Mode Support */
body.light-mode .form-input { 
    background: rgb(255, 255, 255); 
    border-color: rgb(200, 210, 225); 
    color: rgb(15, 30, 55); 
}

/* Fix for button and text visibility in light mode */
body.light-mode .btn-primary {
    background: rgb(5, 45, 97) !important;
    color: rgb(255, 255, 255) !important;
    border: 2px solid rgb(5, 45, 97) !important;
    box-shadow: 0 4px 12px rgba(5, 45, 97, 0.2) !important;
}

body.light-mode .btn-primary span,
body.light-mode .btn-primary i {
    color: rgb(255, 255, 255) !important;
}

body.light-mode .btn-primary:hover {
    background: rgb(3, 30, 65) !important;
    border-color: rgb(3, 30, 65) !important;
    box-shadow: 0 6px 16px rgba(5, 45, 97, 0.3) !important;
}

/* Fix for card border and shadow in light mode */
body.light-mode .auth-container .card {
    border-color: rgb(170, 185, 205) !important;
    box-shadow: 0 15px 50px rgba(5, 45, 97, 0.22) !important;
}

/* Aplicar paleta azul oscuro a otros elementos de texto en modo claro */
body.light-mode .form-label,
body.light-mode .auth-header h1,
body.light-mode .auth-header h2,
body.light-mode .auth-header p,
body.light-mode .auth-container {
    color: rgb(15, 30, 55) !important;
}

/* Loader Animation */
.loader { 
    width: 20px; 
    height: 20px; 
    border: 2px solid rgba(255,255,255,0.3); 
    border-radius: 50%; 
    border-top-color: #fff; 
    animation: spin 0.8s linear infinite; 
    display: none; 
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn-loading .loader { display: inline-block; }
.btn-loading .btn-text { display: none; }

/* Fix for invisible links */
.auth-link {
    color: #60a5fa; /* bright blue */
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #93c5fd; /* lighter blue on hover */
}

body.light-mode .auth-link {
    color: var(--primary);
}

body.light-mode .auth-link:hover {
    color: var(--primary-light);
}

/* Fix for card hover changing color to darker */
.auth-container .card:hover {
    background: var(--bg-glass);
    border-color: var(--glass-border);
}

/* ── Responsive móvil + Safari iPhone ── */
@media (max-width: 600px) {
    .auth-container {
        margin: 3rem auto 0;
        padding: 0 1rem;
        /* Respeta la barra de inicio del iPhone */
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    .auth-container .card {
        padding: 2rem 1.25rem !important;
        border-radius: 20px !important;
    }

    .auth-header h2 {
        font-size: 1.5rem !important;
    }

    .auth-header p {
        font-size: 0.85rem !important;
    }

    .form-input {
        font-size: 1rem;
        padding: 0.85rem 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .nav .btn-sm {
        padding: 0.45rem 0.85rem !important;
        font-size: 0.78rem !important;
    }
}
