/*
 * Ruleezy sign-in transitions
 * Load after the LOGIN_TEMPLATE's inline styles so these focused overrides win.
 */

.splash-screen,
#splashScreen {
    display: none !important;
}

.login-container {
    animation: ruleezy-login-arrive 360ms cubic-bezier(.2, .75, .25, 1) both;
}

.login-container .logo-container {
    animation: ruleezy-mark-arrive 420ms cubic-bezier(.2, .75, .25, 1) both;
}

.login-container .card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 44px rgba(0, 45, 86, .09), 0 2px 8px rgba(0, 45, 86, .05);
    animation: ruleezy-card-arrive 460ms 60ms cubic-bezier(.2, .75, .25, 1) both;
}

.login-container .btn-primary {
    min-height: 46px;
    border-radius: 9px;
    font-weight: 650;
    letter-spacing: .01em;
    transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.login-container .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 45, 86, .18);
}

.login-container .btn-primary:focus-visible,
.login-container a:focus-visible,
.login-container input:focus-visible {
    outline: 3px solid rgba(18, 180, 166, .55);
    outline-offset: 3px;
}

#submitOverlay.submit-overlay {
    --ruleezy-ink: #002d56;
    --ruleezy-mint: #ccf5e1;
    background: radial-gradient(ellipse at 50% 42%, #0a5374 0%, var(--ruleezy-ink) 68%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none !important;
    transition: opacity 150ms ease, visibility 150ms ease;
}

#submitOverlay.submit-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: none !important;
}

#submitOverlay > img {
    width: min(190px, 46vw);
    max-height: 72px;
    object-fit: contain;
    padding: 12px 16px;
    margin-bottom: 22px;
    border-radius: 12px;
    background: var(--ruleezy-mint);
    filter: none;
}

#submitOverlay .submit-overlay-msg {
    margin: 0;
    color: #e8fff1;
    font-size: 1rem;
    font-weight: 550;
    letter-spacing: .01em;
}

#submitOverlay .submit-overlay-dots {
    height: 20px;
    margin-top: 20px;
    align-items: center;
    gap: 7px;
}

#submitOverlay .submit-overlay-dots span {
    width: 6px;
    height: 6px;
    background: var(--ruleezy-mint);
    animation: ruleezy-progress 850ms ease-in-out infinite;
}

#submitOverlay .submit-overlay-dots span:nth-child(2) { animation-delay: 110ms; }
#submitOverlay .submit-overlay-dots span:nth-child(3) { animation-delay: 220ms; }

@keyframes ruleezy-login-arrive {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ruleezy-mark-arrive {
    from { opacity: .65; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ruleezy-card-arrive {
    from { opacity: .6; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ruleezy-progress {
    0%, 70%, 100% { opacity: .45; transform: scale(.78); }
    35% { opacity: 1; transform: scale(1); }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.25rem;
    }

    .login-container .logo-container img {
        margin-bottom: 1.25rem !important;
    }

    #submitOverlay .submit-overlay-msg {
        font-size: .95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-container,
    .login-container .logo-container,
    .login-container .card {
        animation: none !important;
    }

    .login-container .btn-primary,
    #submitOverlay.submit-overlay {
        transition: none !important;
    }

    #submitOverlay .submit-overlay-dots span {
        animation: none !important;
        opacity: .75;
        transform: none;
    }
}