/* File: src/Presentation/PSM.Web/wwwroot/css/login.css - Centered Single Column Login Design */

/* ===== CORE LAYOUT ===== */
/* Login container - with background image support */
.login-page-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    font-family: 'Lexend', sans-serif;
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    /* Background image will be set dynamically via JavaScript */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

/* Background overlay for better text readability */
.login-page-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(3px);
    z-index: 0;
}

/* Ensure content is above the overlay */
.login-page-container > * {
    position: relative;
    z-index: 1;
}

/* Main login card - centered single column */
.login-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border: none; /* Remove subtle border that creates faint outline */
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

/* ===== BRAND SECTION ===== */
.brand-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo {
    height: 2.2rem;
    width: auto;
}

.brand-name {
    font-family: 'Lexend', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #1f2937;
}

.brand-tagline {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.15rem;
    font-style: italic;
}

/* ===== LOGIN FORM SECTION ===== */
.login-header-text {
    margin-bottom: 2rem;
    text-align: center;
}

.login-header-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-family: 'Lexend', sans-serif;
}

.login-header-text p {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}

/* ===== SUBDOMAIN NOTICE ===== */
.subdomain-notice {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 0.25rem 0.15rem 0.25rem 0.45rem;
    margin: 1.5rem -1.75rem -1.75rem -1.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
}

.notice-content p {
    color: #1e40af;
    font-size: 0.7rem;
}

.notice-content p:first-child {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.notice-content notice-link {
    color: #6b7280;
    font-weight: 400;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 0.75rem;
    text-align: left;
}

.form-group:last-of-type {
    margin-bottom: 1rem;
}

/* Form options - remember me and forgot password */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.remember-me .dx-checkbox-text {
    color: #374151;
    font-size: 12px;
}

.forgot-password a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* ===== FOOTER SECTION ===== */
.login-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.login-footer p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.login-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #f0f9ff;
    border: 1px solid #c7d2fe;
    color: #1e40af;
}

.alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-info {
    background-color: #f0f9ff;
    border: 1px solid #c7d2fe;
    color: #1e40af;
}

.alert-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-header strong {
    font-size: 0.875rem;
    font-weight: 600;
}

.alert-icon {
    font-weight: bold;
    font-size: 0.875rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
    .login-page-container {
        padding: 1rem 0.5rem;
        background-attachment: scroll; /* Fixed attachment can cause issues on mobile */
    }
    
    /* Slightly stronger overlay on small screens for better readability */
    .login-page-container::before {
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(4px);
    }
    
    .login-card {
        padding: 2rem 1.5rem;
        max-width: none;
        margin: 0 0.5rem;
    }
    
    .brand-name {
        font-size: 1.75rem;
    }
    
    .login-header-text h2 {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .subdomain-notice {
        margin: 1.5rem -1.5rem -1.5rem -1.5rem;
    }
    
    .notice-icon {
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 1.5rem 1rem;
    }
    
    .brand-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
}

/* ===== DEVEXTREME OVERRIDES ===== */
/* Ensure DevExtreme controls fit the new design */
.dx-textbox,
.dx-checkbox {
    font-family: 'Lexend', sans-serif;
}

.dx-textbox-label {
    font-weight: 500;
}

.dx-button {
    font-family: 'Lexend', sans-serif;
}

/* Loading spinner in button */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.1em;
}