/* ============================================================
   HONESTIA CONNECT — AUTH.CSS
   Styles for auth.html page
   ============================================================ */

:root {
    --v-auth-bg: var(--v-bg-alt);
    --v-auth-card: var(--v-bg);
    --v-auth-text: var(--v-text);
    --v-auth-muted: var(--v-text-muted);
    --v-auth-border: var(--v-border);
}

body {
    background-color: var(--v-auth-bg);
    color: var(--v-auth-text);
    transition: background-color 0.4s ease, color 0.4s ease;
}

.auth-card {
    background: var(--v-auth-card);
    border: 1px solid var(--v-auth-border);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    transition: all 0.4s ease;
}

.mode-register .login-only {
    display: none !important;
}

.mode-login .register-only {
    display: none !important;
}

.form-input-premium {
    width: 100%;
    padding: 14px 14px 14px 44px;
    background: var(--v-auth-bg);
    border: 1px solid var(--v-auth-border);
    border-radius: 12px;
    color: var(--v-auth-text);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.form-input-premium::placeholder {
    color: var(--v-auth-muted);
    opacity: 0.6;
}

.form-input-premium:focus {
    background: var(--v-auth-card);
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

#google-btn-container iframe {
    margin: 0 auto !important;
    display: block !important;
}

/* Modal Style for Forgot Password */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: var(--v-auth-card);
    border: 1px solid var(--v-auth-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-premium);
    transition: all 0.4s ease;
}

.input-icon-wrapper {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--v-auth-muted);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.input-help-text {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--v-auth-muted);
}

.auth-switch-text {
    font-size: 15px;
    color: var(--v-auth-muted);
}

.apple-btn-primary:disabled {
    background-color: var(--v-auth-muted) !important;
    opacity: 0.5;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Dark mode text consistency */
.auth-card h1, .modal-card h3 { color: var(--v-auth-text) !important; }
.auth-card p, .modal-card p, .auth-card span:not(.login-only):not(#alertText):not(#forgotAlertText):not(#accountSelectAlertText) { color: var(--v-auth-muted) !important; }

/* ============================================================
   Alerts & Feedback Notices (Error / Success)
   ============================================================ */
.alert {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.alert svg,
.alert i {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* Error Alert: Fondo rojo prominente y texto de alto contraste */
.alert.alert-error,
.alert-error,
.auth-card .alert.alert-error,
.modal-card .alert.alert-error {
    background-color: #fef2f2 !important;
    border: 1px solid #f87171 !important;
    color: #991b1b !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12) !important;
}

.alert.alert-error span,
.alert-error span,
.auth-card .alert.alert-error span,
.modal-card .alert.alert-error span,
.auth-card span#alertText,
.modal-card span#forgotAlertText,
.modal-card span#accountSelectAlertText {
    color: #991b1b !important;
    font-weight: 600 !important;
}

.alert.alert-error svg,
.alert.alert-error i,
.auth-card .alert.alert-error svg,
.auth-card .alert.alert-error i,
.modal-card .alert.alert-error svg,
.modal-card .alert.alert-error i {
    color: #dc2626 !important;
    stroke: #dc2626 !important;
}

/* Success Alert */
.alert.alert-success,
.alert-success,
.auth-card .alert.alert-success,
.modal-card .alert.alert-success {
    background-color: #f0fdf4 !important;
    border: 1px solid #86efac !important;
    color: #166534 !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.12) !important;
}

.alert.alert-success span,
.alert-success span,
.auth-card .alert.alert-success span,
.modal-card .alert.alert-success span {
    color: #166534 !important;
    font-weight: 600 !important;
}

.alert.alert-success svg,
.alert.alert-success i,
.auth-card .alert.alert-success svg,
.auth-card .alert.alert-success i,
.modal-card .alert.alert-success svg,
.modal-card .alert.alert-success i {
    color: #16a34a !important;
    stroke: #16a34a !important;
}

/* Dark Mode Overrides */
html.dark .alert.alert-error,
body.dark .alert.alert-error,
:root.dark .alert.alert-error,
html.dark .auth-card .alert.alert-error,
body.dark .auth-card .alert.alert-error {
    background-color: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
    color: #fca5a5 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

html.dark .alert.alert-error span,
body.dark .alert.alert-error span,
:root.dark .alert.alert-error span,
html.dark .auth-card .alert.alert-error span,
body.dark .auth-card .alert.alert-error span,
html.dark .auth-card span#alertText,
body.dark .auth-card span#alertText {
    color: #fca5a5 !important;
}

html.dark .alert.alert-error svg,
html.dark .alert.alert-error i,
body.dark .alert.alert-error svg,
body.dark .alert.alert-error i {
    color: #f87171 !important;
    stroke: #f87171 !important;
}

html.dark .alert.alert-success,
body.dark .alert.alert-success,
:root.dark .alert.alert-success,
html.dark .auth-card .alert.alert-success,
body.dark .auth-card .alert.alert-success {
    background-color: rgba(34, 197, 94, 0.2) !important;
    border: 1px solid rgba(34, 197, 94, 0.45) !important;
    color: #86efac !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

html.dark .alert.alert-success span,
body.dark .alert.alert-success span,
:root.dark .alert.alert-success span,
html.dark .auth-card .alert.alert-success span,
body.dark .auth-card .alert.alert-success span {
    color: #86efac !important;
}

html.dark .alert.alert-success svg,
html.dark .alert.alert-success i,
body.dark .alert.alert-success svg,
body.dark .alert.alert-success i {
    color: #4ade80 !important;
    stroke: #4ade80 !important;
}

.auth-card label { color: var(--v-auth-text) !important; }
