/*
 * NLM Login Animated Background - Simple Version
 */

/* Override authentication-bg default image */
body.authentication-bg,
body.authentication-bg.pb-0 {
    background-image: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* Hide any bg-auth or background image */
.authentication-bg::before,
.authentication-bg::after,
.auth-fluid::before,
.auth-fluid::after {
    display: none !important;
    background: none !important;
}

/* Remove old background from auth-fluid-right */
.auth-fluid .auth-fluid-right,
.auth-fluid-right {
    background-image: none !important;
    background-color: transparent !important;
    background: transparent !important;
}

.auth-fluid {
    background: transparent !important;
    background-image: none !important;
}

/* Force everything to be transparent */
.auth-fluid-form-box,
.auth-fluid-right {
    position: relative;
    z-index: 10;
    background: transparent !important;
    background-image: none !important;
}

.nlm-login-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    background: #f6f7fb;
    overflow: hidden;
    min-height: 100vh;
}

.nlm-login-bands {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.nlm-login-band {
    position: absolute;
    left: 0;
    display: flex;
    gap: 10px;
    will-change: transform;
}

/* Article link styling */
.nlm-article-link {
    display: inline-block;
    text-decoration: none;
    border: none;
    padding: 0;
    margin: 0;
    background: none;
    cursor: pointer;
    pointer-events: auto;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nlm-article-link:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.nlm-article-link img {
    height: 120px;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    border: none;
    padding: 0;
    margin: 0;
}

@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes scroll-right {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

/* Different speeds (slower - 2x slower) and positions for each band */
.nlm-login-band-1 { 
    top: 3%; 
    animation: scroll-left 240s linear infinite; 
    opacity: 1;
}

.nlm-login-band-2 { 
    top: 18%; 
    animation: scroll-left 200s linear infinite; 
    opacity: 1;
}

.nlm-login-band-3 { 
    top: 33%; 
    animation: scroll-right 220s linear infinite; 
    opacity: 1;
}

.nlm-login-band-4 { 
    top: 48%; 
    animation: scroll-left 180s linear infinite; 
    opacity: 1;
}

.nlm-login-band-5 { 
    top: 63%; 
    animation: scroll-right 190s linear infinite; 
    opacity: 1;
}

.nlm-login-band-6 { 
    top: 78%; 
    animation: scroll-left 160s linear infinite; 
    opacity: 1;
}

.nlm-login-band-7 { 
    top: 93%; 
    animation: scroll-right 210s linear infinite; 
    opacity: 1;
}

/* Hide extra bands if they were defined */
.nlm-login-band-8,
.nlm-login-band-9 {
    display: none !important;
}

/* Overlay to darken the background */
.nlm-login-bg .bg-overlay {
    display: none !important;
}

/* Make login form stand out */
.auth-fluid-form-box {
    position: relative;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

/* Loading overlay */
.nlm-login-bg .loading-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    z-index: 1000;
    text-align: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', Arial, sans-serif;
}

.nlm-login-bg .loading-overlay .progress-bar {
    width: 200px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin: 10px auto 0;
}

.nlm-login-bg .loading-overlay .progress-bar .fill {
    height: 100%;
    background: #173751;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Photo credit */
.nlm-login-bg .photo-credit {
    display: none !important;
}

.nlm-login-bg .photo-credit a {
    color: #ddc2b5;
    text-decoration: none;
}

/* Controls hint */
.nlm-login-bg .controls-hint {
    display: none !important;
}

/* Override body background */
body.authentication-bg,
body.authentication-bg.pb-0 {
    background: transparent !important;
}