/* ========================================
   Neo-Modern Login Design - Glassmorphism
   All design tokens provided by base.css
   ======================================== */

/* Material Symbols Fix */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

/* ========================================
   Loading Screen
   ======================================== */

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-logo {
    animation: revealScale 2s infinite ease-in-out;
}

.loading-circle-expand {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-600);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
}

.loading-screen.fade-out .loading-circle-expand {
    animation: expandFullScreen 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes revealScale {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0);
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
        filter: blur(1px);
    }
}

@keyframes expandFullScreen {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(200);
        opacity: 0;
    }
}

/* ========================================
   Animations & Keyframes
   ======================================== */

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 15s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ========================================
   Glass Card
   ======================================== */

.glass-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    box-shadow: 0 25px 50px -12px rgba(16, 16, 79, 0.25);
    transform: translateY(-2px);
}

/* ========================================
   Form Elements
   ======================================== */

/* Inputs are styled with Tailwind in HTML, but here are specific overrides */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--slate-50) inset !important;
    -webkit-text-fill-color: var(--slate-900) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Keep login CTA visible even if Tailwind utility class set is stale */
#loginButton {
    background: var(--grad-primary-strong) !important;
    box-shadow: var(--glow-primary) !important;
    color: var(--white) !important;
    -webkit-text-fill-color: var(--white) !important;
    border: 1px solid transparent;
}

#loginButton:hover {
    background: var(--grad-primary-hover) !important;
    box-shadow: var(--glow-primary-hover) !important;
}

#loginButton,
#loginButton *,
#loginButtonText,
#loginButtonLoader {
    color: var(--white) !important;
    -webkit-text-fill-color: var(--white) !important;
}

#loginButtonText {
    display: inline-block;
    line-height: 1.2;
    color: var(--white) !important;
    -webkit-text-fill-color: var(--white) !important;
}

/* Forgot password submit button fallback when Tailwind utility tokens are missing */
#submitButton {
    background: var(--grad-primary-strong) !important;
    box-shadow: var(--glow-primary) !important;
    color: var(--white) !important;
    -webkit-text-fill-color: var(--white) !important;
    border: 1px solid transparent;
}

#submitButton:hover {
    background: var(--grad-primary-hover) !important;
    box-shadow: var(--glow-primary-hover) !important;
}

#submitButton,
#submitButton *,
#buttonText,
#buttonLoader {
    color: var(--white) !important;
    -webkit-text-fill-color: var(--white) !important;
}

/* ========================================
   Toast Messages
   ======================================== */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    max-width: 380px;
    width: 100%;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--spacing-md) 20px;
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 10px 40px -10px rgba(16, 16, 79, 0.2);
    margin-bottom: 12px;
    animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: white;
    pointer-events: auto;
    border: 1px solid var(--border-color);
}

.toast-error {
    border-left: 4px solid var(--color-red-500);
}

.toast-success {
    border-left: 4px solid var(--color-green-500);
}

.toast.slide-out {
    animation: slideOut 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    to {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }
}
