/* Authentication UI Styles */
/* Modern authentication dropdown and status styling */

/* Profile button and container styling */
.profile-container {
    position: relative;
    display: inline-block;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.profile-btn:hover {
    background: rgba(220, 20, 60, 0.1);
    border-color: rgba(220, 20, 60, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(220, 20, 60, 0.2);
}

.profile-btn:active {
    transform: translateY(0);
}

/* Profile avatar styling */
.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(220, 20, 60, 0.3);
    object-fit: cover;
    transition: border-color 0.3s ease;
}

.profile-btn:hover .profile-avatar {
    border-color: rgba(220, 20, 60, 0.6);
}

/* Profile name */
.profile-name {
    font-weight: 500;
    font-size: 14px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown arrow */
.dropdown-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.profile-btn[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Profile dropdown menu */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: rgba(30, 30, 35, 0.95);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-radius: 16px;
    padding: 16px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(220, 20, 60, 0.1);
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Dropdown header */
.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(220, 20, 60, 0.3);
    object-fit: cover;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-name {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-email {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown divider */
.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

/* Dropdown items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(220, 20, 60, 0.1);
    color: #ffffff;
    transform: translateX(4px);
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-width: 2;
}

/* Logout item special styling */
.dropdown-item.logout-item {
    color: #ff6b6b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
}

.dropdown-item.logout-item:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff8a8a;
}

/* Login/Signup button styling */
.auth-button-container {
    display: flex;
    align-items: center;
}

.login-signup-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, 
        rgba(220, 20, 60, 0.8) 0%, 
        rgba(139, 0, 139, 0.8) 100%);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-decoration: none;
}

.login-signup-btn:hover {
    background: linear-gradient(135deg, 
        rgba(220, 20, 60, 1) 0%, 
        rgba(139, 0, 139, 1) 100%);
    border-color: rgba(220, 20, 60, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(220, 20, 60, 0.3);
}

.login-signup-btn:active {
    transform: translateY(-1px);
}

.login-signup-btn .auth-icon {
    font-size: 18px;
}

/* Authentication status indicator */
.auth-status-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #1a1a1f;
    z-index: 1;
}

.auth-status-indicator.online {
    background: #00d4aa;
    box-shadow: 0 0 8px rgba(0, 212, 170, 0.5);
}

.auth-status-indicator.offline {
    background: #666;
}

/* Notification styles */
.auth-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    background: rgba(30, 30, 35, 0.95);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    max-width: 320px;
}

.auth-notification.show {
    transform: translateX(0);
}

.auth-notification.success {
    border-color: rgba(0, 212, 170, 0.5);
    background: rgba(0, 212, 170, 0.1);
}

.auth-notification.error {
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.1);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .profile-dropdown {
        width: 260px;
        right: -20px;
    }
    
    .profile-name {
        display: none;
    }
    
    .login-signup-btn .auth-text {
        display: none;
    }
    
    .login-signup-btn {
        padding: 10px;
        min-width: 44px;
        justify-content: center;
    }
    
    .auth-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .auth-notification.show {
        transform: translateY(0);
    }
}

/* Loading state */
.auth-loading {
    opacity: 0.7;
    pointer-events: none;
}

.auth-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #dc143c;
    border-radius: 50%;
    animation: auth-spin 1s linear infinite;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Focus styles for accessibility */
.profile-btn:focus,
.login-signup-btn:focus,
.dropdown-item:focus {
    outline: 2px solid rgba(220, 20, 60, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .profile-btn,
    .login-signup-btn {
        border-width: 2px;
    }
    
    .profile-dropdown {
        border-width: 2px;
        background: #000;
    }
    
    .dropdown-item:hover {
        background: #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .profile-btn,
    .login-signup-btn,
    .profile-dropdown,
    .dropdown-arrow,
    .auth-notification {
        transition: none;
    }
}
