/*
 * Elderella Authentication Component Styles
 * Bootstrap-compatible, conflict-free authentication UI
 */

/* Auth Links */
.auth-link {
    text-decoration: none;
    color: #667eea;
    font-weight: 500;
}

.auth-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Modal Header Styling */
.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Form Layout */
.auth-form {
    padding: 20px 0;
}

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

/* Password Input Container */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}

/* Message Styles */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.success-message {
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Auth Status Display */
.auth-anonymous {
    text-align: right;
}

.auth-anonymous .auth-links {
    margin-top: 2px;
}

.auth-logged-in {
    text-align: right;
}

/* Modal Z-Index Management - Ensure modals appear above all content */
.modal {
    z-index: 99999 !important;
}

.modal-backdrop {
    z-index: 99998 !important;
}

/* Specific auth modal z-index with maximum priority */
.modal#loginModal,
.modal#registerModal {
    z-index: 99999 !important;
}

/* Ensure proper modal positioning and display */
.modal-dialog {
    position: relative;
    margin: 1.75rem auto;
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-form {
        padding: 10px 0;
    }
    
    .password-toggle {
        right: 5px;
    }
}

/* Loading State for Auth Buttons */
.auth-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-loading::after {
    content: "...";
    animation: loading 1s infinite;
}

@keyframes loading {
    0%, 20%, 50%, 80%, 100% {
        opacity: 1;
    }
    40%, 60% {
        opacity: 0.5;
    }
}

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

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #dee2e6;
}

.divider span {
    position: relative;
    background-color: white;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}