/* Enhanced Auth Component Styles */

/* Auth Actions (Unauthenticated) */
.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.auth-actions .btn-outline-primary {
    border: 1px solid #007bff;
    color: #007bff;
    background: transparent;
}

.auth-actions .btn-outline-primary:hover {
    background: #007bff;
    color: white;
}

/* Auth Dropdown (Authenticated) */
.auth-dropdown {
    position: relative;
    display: inline-block;
}

.auth-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
}

.auth-user-btn:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.auth-user-btn[aria-expanded="true"] {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

/* User Avatar */
.user-avatar, .user-avatar-large {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

.user-avatar {
    width: 32px;
    height: 32px;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    font-size: 16px;
}

.user-avatar::after, .user-avatar-large::after {
    content: attr(data-initials);
}

/* User Info */
.user-info {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    font-size: 10px;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.auth-user-btn[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.auth-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1050;
    min-width: 280px;
    margin-top: 4px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.auth-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Header */
.dropdown-header {
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px 8px 0 0;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info-detailed {
    flex: 1;
    min-width: 0;
}

.user-name-large {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.user-email {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 4px;
    word-break: break-all;
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #007bff;
    color: white;
    font-size: 11px;
    font-weight: 500;
    border-radius: 12px;
}

/* Dropdown Sections */
.dropdown-section {
    padding: 8px 0;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: #2c3e50;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: #6c757d;
}

.dropdown-item.logout-item:hover {
    background: #fff3cd;
    color: #856404;
}

.dropdown-item.logout-item:hover i {
    color: #856404;
}

.dropdown-item.danger-item:hover {
    background: #f8d7da;
    color: #721c24;
}

.dropdown-item.danger-item:hover i {
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-user-btn {
        min-width: 120px;
    }
    
    .user-name, .user-role {
        font-size: 13px;
    }
    
    .auth-dropdown-menu {
        min-width: 250px;
        right: -10px;
    }
    
    .user-name-large {
        font-size: 15px;
    }
    
    .dropdown-header {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .auth-user-btn .user-info {
        display: none;
    }
    
    .auth-user-btn {
        min-width: auto;
        padding: 6px 8px;
    }
    
    .auth-dropdown-menu {
        right: 0;
        min-width: 200px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auth-user-btn {
        border-color: #444;
        color: #e9ecef;
    }
    
    .auth-user-btn:hover {
        border-color: #0d6efd;
    }
    
    .user-name {
        color: #e9ecef;
    }
    
    .auth-dropdown-menu {
        background: #2b2b2b;
        border-color: #444;
    }
    
    .dropdown-header {
        background: linear-gradient(135deg, #3c3c3c 0%, #2b2b2b 100%);
    }
    
    .user-name-large {
        color: #e9ecef;
    }
    
    .dropdown-divider {
        background: #444;
    }
    
    .dropdown-item {
        color: #e9ecef;
    }
    
    .dropdown-item:hover {
        background: #3c3c3c;
    }
}

/* Animation for better UX */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-dropdown-menu.show {
    animation: fadeInUp 0.2s ease;
}

/* Focus States for Accessibility */
.auth-user-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.dropdown-item:focus {
    background: #e7f3ff;
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

/* Loading States */
.auth-user-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-user-btn.loading .dropdown-arrow {
    animation: spin 1s linear infinite;
}

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