/**
 * Login Page Styles
 * 
 * Styles for custom login, registration, and password reset pages
 * 
 * @package MarketDope
 * @since 1.0.0
 */

/* ==========================================================================
   Login Page Wrapper
   ========================================================================== */

.login-page-wrapper {
    padding: 60px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.login-page-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.login-page-header {
    text-align: center;
    margin-bottom: 40px;
    color: #ffffff;
}

.login-page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-page-header p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* ==========================================================================
   Form Container
   ========================================================================== */

.login-register-container {
    max-width: 500px;
    margin: 0 auto;
}

.login-form-wrapper,
.register-form-wrapper,
.reset-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.login-form-wrapper h2,
.register-form-wrapper h2,
.reset-form-wrapper h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a202c;
}

.login-form-wrapper p,
.register-form-wrapper p,
.reset-form-wrapper p {
    color: #718096;
    margin-bottom: 25px;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
    font-size: 0.875rem;
}

.form-group label .required {
    color: #e53e3e;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    line-height: 1.5;
    color: #2d3748;
    background-color: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #a0aec0;
}

.form-control.error {
    border-color: #e53e3e;
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: #718096;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 20px;
    }
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.form-check label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background-color: #fed7d7;
    color: #c53030;
}

.password-strength.medium {
    background-color: #feebc8;
    color: #c05621;
}

.password-strength.strong {
    background-color: #c6f6d5;
    color: #2f855a;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 2px solid transparent;
    padding: 12px 24px;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   Form Links
   ========================================================================== */

.form-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.form-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.form-links .separator {
    margin: 0 10px;
    color: #cbd5e0;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 0.9375rem;
}

.alert-error {
    background-color: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.alert-success {
    background-color: #c6f6d5;
    color: #2f855a;
    border: 1px solid #68d391;
}

.alert-info {
    background-color: #bee3f8;
    color: #2c5282;
    border: 1px solid #90cdf4;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .login-page-wrapper {
        padding: 40px 20px;
    }
    
    .login-page-header h1 {
        font-size: 2rem;
    }
    
    .login-page-header p {
        font-size: 1rem;
    }
    
    .login-form-wrapper,
    .register-form-wrapper,
    .reset-form-wrapper {
        padding: 30px 20px;
    }
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Dark Mode Support (Optional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .login-form-wrapper,
    .register-form-wrapper,
    .reset-form-wrapper {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .login-form-wrapper h2,
    .register-form-wrapper h2,
    .reset-form-wrapper h2 {
        color: #f7fafc;
    }
    
    .form-group label {
        color: #e2e8f0;
    }
    
    .form-control {
        background-color: #4a5568;
        border-color: #4a5568;
        color: #f7fafc;
    }
    
    .form-control:focus {
        background-color: #2d3748;
        border-color: #667eea;
    }
    
    .form-links {
        border-top-color: #4a5568;
    }
}
