/* Authentication Modal Styles */

.auth-modal {
    z-index: 9999 !important;
}

.auth-modal .modal-backdrop {
    z-index: 9998 !important;
}

.auth-modal .modal-dialog {
    max-width: 500px;
    margin: 1.75rem auto;
}

.auth-modal .modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.2);
}

.auth-modal .modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 1rem 1rem 0 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.auth-modal .modal-header .modal-title {
    font-weight: 600;
    margin: 0;
}

.auth-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.auth-modal .modal-header .btn-close:hover {
    opacity: 1;
}

.auth-modal .modal-body {
    padding: 2rem;
}

.auth-modal .modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 1rem 1rem;
    padding: 1rem 1.5rem;
}

/* Auth step containers */
.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
}

/* Form styling */
.auth-modal .form-floating {
    margin-bottom: 1rem;
}

.auth-modal .form-floating .form-control {
    border-radius: 0.75rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.auth-modal .form-floating .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.auth-modal .form-control, 
.auth-modal .form-select {
    border-radius: 0.75rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.auth-modal .form-control:focus, 
.auth-modal .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Button styling */
.auth-modal .btn {
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
}

.auth-modal .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
}

.auth-modal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.auth-modal .btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
}

.auth-modal .btn-info {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    border: none;
}

.auth-modal .btn-warning {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    border: none;
}

/* Microsoft button */
.auth-modal .btn-microsoft {
    background: #00a1f1;
    border: none;
    color: white;
}

.auth-modal .btn-microsoft:hover {
    background: #0078d4;
    color: white;
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dee2e6;
}

.auth-divider-text {
    background: white;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Navigation links */
.auth-nav-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.auth-nav-link:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Password strength indicators */
.password-strength-weak { 
    color: #dc3545; 
}

.password-strength-medium { 
    color: #ffc107; 
}

.password-strength-strong { 
    color: #28a745; 
}

/* Input group styling */
.auth-modal .input-group .btn-outline-secondary {
    border-left: 0;
    border-radius: 0 0.75rem 0.75rem 0;
    border-color: #e9ecef;
}

.auth-modal .input-group .form-control:focus + .btn-outline-secondary {
    border-color: #667eea;
}

/* Alert styling */
.auth-modal .alert {
    border-radius: 0.75rem;
    border: none;
    margin-bottom: 1rem;
}

/* Terms modal specific styling */
#termsModal .modal-dialog {
    max-width: 700px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .auth-modal .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .auth-modal .modal-body {
        padding: 1.5rem;
    }
    
    .auth-modal .modal-header,
    .auth-modal .modal-footer {
        padding: 1rem 1.5rem;
    }
}

/* Loading states */
.auth-modal .btn.loading {
    position: relative;
}

.auth-modal .btn.loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error result styling */
.auth-result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.auth-result-success {
    color: #28a745;
}

.auth-result-error {
    color: #dc3545;
}

/* Login options grid */
.auth-login-options {
    gap: 1rem;
}

.auth-login-option {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.auth-login-option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.auth-login-option i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Back navigation */
.auth-back-nav {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.auth-back-nav:hover {
    color: #667eea;
    text-decoration: none;
}