/* ========================================
   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: #ffffff;
    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: #1173d4;
    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: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 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 #f8fafc 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-color: var(--primary-600) !important;
    color: var(--white, #ffffff) !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid transparent;
}

#loginButton:hover {
    background-color: var(--primary-700) !important;
}

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

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

/* Forgot password submit button fallback when Tailwind utility tokens are missing */
#submitButton {
    background-color: var(--primary-600, #2563eb) !important;
    color: var(--white, #ffffff) !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid transparent;
}

#submitButton:hover {
    background-color: var(--primary-700, #1d4ed8) !important;
}

#submitButton,
#submitButton *,
#buttonText,
#buttonLoader {
    color: var(--white, #ffffff) !important;
    -webkit-text-fill-color: #ffffff !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: 16px 20px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 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 rgba(0, 0, 0, 0.05);
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.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;
    }
}
