/**
 * HOAPOST FORMS - Professional Login Page Styles
 * Modern, clean authentication interface with premium feel
 */

/* Login Page Layout */
.login-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 480px;
    position: relative;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 15px 15px -5px rgba(0, 0, 0, 0.06);
}

/* Logo Section - Centered branding */
.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-name {
    font-size: 2rem;
    font-weight: 800;
    color: #1e40af;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 0.75rem 0;
}

.welcome-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.profile-info {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.profile-info small {
    font-size: 0.875rem;
    color: #475569;
    font-weight: 500;
}

/* Brand Header - Legacy support */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: 0 12px 32px rgba(30, 64, 175, 0.25);
    transition: all 0.3s ease;
}

.logo-icon:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 16px 48px rgba(30, 64, 175, 0.35);
}

.logo-icon svg {
    width: 32px;
    height: 32px;
}

.brand-text h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0;
    letter-spacing: -0.02em;
}

.brand-text p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
    font-weight: 500;
}

.welcome-text h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.01em;
}

.welcome-text p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* Form Styling */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin: 0;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 400;
    color: #1f2937;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-input:hover:not(:focus) {
    border-color: #d1d5db;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-icon svg {
    width: 18px;
    height: 18px;
}

.input-wrapper:focus-within .input-icon {
    color: #3b82f6;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.5rem 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkmark::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.checkbox-container input:checked ~ .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-container input:checked ~ .checkmark::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-text {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 400;
}

.forgot-link {
    font-size: 0.875rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Login Button */
.login-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
    overflow: hidden;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.login-button:hover:not(:disabled)::before {
    left: 100%;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-text {
    display: inline-block;
}

.button-loading {
    display: none !important;
}

.login-button.loading {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none !important;
    animation: none !important;
}

.login-button.loading::before {
    display: none;
}

.login-button.loading .button-text {
    opacity: 1;
    visibility: visible;
    transform: none !important;
    animation: none !important;
}

@keyframes spinner-rotation {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Password Requirements */
.password-requirements {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 400;
}

/* Footer */
.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

/* Auth Links Container */
.auth-links {
    margin-top: 2rem;
    text-align: center;
}

.signup-text {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 1rem 0;
}

.signup-text:last-child {
    margin-bottom: 0;
}

.signup-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.signup-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 640px) {
    .login-page {
        padding: 1rem 0.5rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
        margin: 1rem 0;
    }
    
    .brand-text h1 {
        font-size: 1.5rem;
    }
    
    .welcome-text h2 {
        font-size: 1.25rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus and Error States */
.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-group .error-message {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Success state */
.form-input.success {
    border-color: #2563eb;
}

.form-input.success:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Enhanced Checkbox Styling */
.checkbox-container {
    padding: 1rem 0;
    margin: 0.5rem 0;
    transition: all 0.2s ease;
}

.checkbox-container:hover .checkmark {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.checkbox-text {
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Terms and Privacy Policy Links */
.terms-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.terms-link:hover {
    color: #1e40af;
    border-bottom-color: #1e40af;
    text-decoration: none;
}

.terms-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Desktop optimizations for larger screens */
@media (min-width: 768px) {
    .checkbox-text {
        font-size: 0.85rem;
    }
}