/* Enhanced Authentication Styles */

/* Auth Container */
.auth-container {
    background: linear-gradient(135deg, 
        rgba(26, 35, 126, 0.1) 0%, 
        rgba(21, 101, 192, 0.1) 25%,
        rgba(3, 155, 229, 0.1) 50%,
        rgba(0, 188, 212, 0.1) 75%,
        rgba(0, 150, 136, 0.1) 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

/* Glass Card Effect */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

.auth-card-body {
    padding: 3rem 2.5rem;
}

/* Auth Icon */
.auth-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.auth-icon i {
    font-size: 1.8rem;
    color: white;
}

/* Auth Typography */
.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Social Authentication */
.social-auth-section {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-divider {
    text-align: center;
    position: relative;
    margin: 1rem 0;
}

.social-divider span {
    background: rgba(255, 255, 255, 0.9);
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Vertical social buttons layout */
.social-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Full width social buttons */
.btn-social-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-social-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: white;
}

.btn-social-full i {
    font-size: 1.1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: #374151;
}

.btn-social:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: #374151;
}

.btn-social:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-social i {
    font-size: 1.1rem;
}

/* Social Button Colors */
.btn-google:hover:not(:disabled) {
    border-color: #ea4335;
    color: #ea4335;
}

.btn-github:hover:not(:disabled) {
    border-color: #24292e;
    color: #24292e;
}

.btn-microsoft:hover:not(:disabled) {
    border-color: #0078d4;
    color: #0078d4;
}

.btn-linkedin:hover:not(:disabled) {
    border-color: #0077b5;
    color: #0077b5;
}

/* Facebook button filled */
.btn-facebook {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.btn-facebook:hover:not(:disabled) {
    background: #166fe5;
    border-color: #166fe5;
    color: white;
}

/* Google button filled */
.btn-google {
    background: #4285f4;
    border-color: #4285f4;
    color: white;
}

.btn-google:hover:not(:disabled) {
    background: #357ae8;
    border-color: #357ae8;
    color: white;
}

/* LinkedIn button filled */
.btn-linkedin {
    background: #0a66c2;
    border-color: #0a66c2;
    color: white;
}

.btn-linkedin:hover:not(:disabled) {
    background: #004182;
    border-color: #004182;
    color: white;
}

/* Auth Divider */
.auth-divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
}

.auth-divider span {
    background: rgba(255, 255, 255, 0.9);
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Form Styles */
.auth-form {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-icon {
    color: #6b7280;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.auth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

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

.auth-input::placeholder {
    color: #9ca3af;
}

/* Input Feedback */
.input-feedback {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    min-height: 1.2rem;
    transition: all 0.3s ease;
}

.input-feedback.error {
    color: #ef4444;
}

.input-feedback.success {
    color: #10b981;
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-input:checked + .checkbox-label .checkbox-checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-checkmark i {
    color: white;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox-input:checked + .checkbox-label .checkbox-checkmark i {
    opacity: 1;
}

.checkbox-text {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.4;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Auth Button */
.btn-auth {
    position: relative;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
}

.btn-auth:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-auth.btn-ready {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-auth.loading .btn-icon,
.btn-auth.loading span {
    opacity: 0;
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-auth.loading .btn-loading {
    opacity: 1;
}

.btn-icon {
    margin-right: 0.5rem;
    transition: opacity 0.3s ease;
}

/* Auth Footer */
.auth-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1.5rem;
}

.auth-switch-text {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

.auth-switch-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-switch-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Forgot Password */
.forgot-password-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.forgot-password-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dark Mode Support */
[data-theme="dark"] .auth-container {
    background: linear-gradient(135deg, 
        rgba(26, 35, 126, 0.2) 0%, 
        rgba(21, 101, 192, 0.2) 25%,
        rgba(3, 155, 229, 0.2) 50%,
        rgba(0, 188, 212, 0.2) 75%,
        rgba(0, 150, 136, 0.2) 100%);
}

[data-theme="dark"] .auth-card {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .auth-title {
    color: #f9fafb;
}

[data-theme="dark"] .auth-subtitle {
    color: #9ca3af;
}

[data-theme="dark"] .social-divider span,
[data-theme="dark"] .auth-divider span {
    background: rgba(30, 30, 30, 0.9);
    color: #9ca3af;
}

[data-theme="dark"] .btn-social {
    background: rgba(55, 65, 81, 0.8);
    color: #f9fafb;
    border-color: rgba(75, 85, 99, 0.5);
}

[data-theme="dark"] .form-label {
    color: #f3f4f6;
}

[data-theme="dark"] .input-icon {
    color: #9ca3af;
}

[data-theme="dark"] .auth-input {
    background: rgba(55, 65, 81, 0.8);
    border-color: rgba(75, 85, 99, 0.5);
    color: #f9fafb;
}

[data-theme="dark"] .auth-input:focus {
    background: rgba(55, 65, 81, 0.95);
    border-color: #667eea;
}

[data-theme="dark"] .auth-input::placeholder {
    color: #6b7280;
}

[data-theme="dark"] .checkbox-checkmark {
    border-color: rgba(75, 85, 99, 0.8);
    background: rgba(55, 65, 81, 0.8);
}

[data-theme="dark"] .checkbox-text {
    color: #f3f4f6;
}

[data-theme="dark"] .auth-switch-text {
    color: #9ca3af;
}

[data-theme="dark"] .social-auth-section {
    border-color: rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] .auth-footer {
    border-color: rgba(75, 85, 99, 0.3);
}

/* RTL Support */
[dir="rtl"] .form-label {
    flex-direction: row-reverse;
}

[dir="rtl"] .custom-checkbox {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .btn-icon {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .social-buttons {
    direction: ltr; /* Keep social buttons in consistent order */
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card-body {
        padding: 2rem 1.5rem;
    }
    
    .auth-icon {
        width: 60px;
        height: 60px;
    }
    
    .auth-icon i {
        font-size: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem 0;
    }
    
    .auth-card-body {
        padding: 1.5rem 1rem;
    }
    
    .auth-title {
        font-size: 1.3rem;
    }
    
    .btn-social {
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }
}