/**
 * Login Page Specific Styles
 * Extracted from forms.css for better maintainability
 */

/* Login Container */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 1rem;
    min-height: 100vh;
}

/* Login Card */
.login-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    position: relative;
    animation: slideInUp 0.5s ease-out;
}

/* Animation for login card */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.login-header p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.4;
}

/* Login Footer */
.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.25rem 0;
}

.login-footer a:hover {
    text-decoration: underline;
    color: var(--primary-color-dark, #5a67d8);
}

/* Quick Accounts Section */
.accounts {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.accounts p {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

.accounts .gradlink {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.accounts .gradlink:hover {
    text-decoration: underline;
}

/* Quick Login Cards */
.quickLogin {
    background: #f9fafb;
    border: 2px solid #e5e7eb !important;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.quickLogin:hover {
    border-color: var(--primary-color) !important;
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quickLogin .quickAccountDelete {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background: rgba(239, 68, 68, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.quickLogin:hover .quickAccountDelete {
    opacity: 1;
}

.quickAccountDelete:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

.quickAccountDelete i {
    color: white;
    font-size: 0.75rem;
}

/* Blockie placeholder styling */
.blockie-placeholder {
    margin: 0 auto 0.5rem;
    border: 2px solid #e5e7eb;
    background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
}

.quickLogin:hover .blockie-placeholder {
    border-color: var(--primary-color);
}

/* Account name wrap */
.accountNameWrap {
    margin-top: 1rem;
}

.accountNameWrap .form-control {
    font-size: 0.875rem;
}

/* Save on device checkbox styling */
#saveOnDevice {
    margin-right: 0.5rem;
}

#saveOnDevice + label {
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

/* Loading states */
.login-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem 0.5rem;
        min-height: 100vh;
    }
    
    .login-card {
        padding: 1.5rem;
        margin: 0.5rem;
        max-width: none;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .login-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .login-footer a {
        text-align: center;
        padding: 0.5rem;
        background: #f9fafb;
        border-radius: 0.375rem;
        border: 1px solid #e5e7eb;
    }
    
    .quickLogin {
        width: calc(50% - 0.5rem) !important;
        margin: 0.25rem !important;
    }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    .login-container {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
    
    .login-card {
        background: #1f2937;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
    
    .login-header h2 {
        color: #60a5fa;
    }
    
    .login-header p {
        color: #9ca3af;
    }
    
    .login-footer a {
        color: #60a5fa;
    }
    
    .quickLogin {
        background: #374151;
        border-color: #4b5563 !important;
    }
    
    .quickLogin:hover {
        background: #1e40af;
        border-color: #60a5fa !important;
    }
}