/* Header Improvements for Motoristi.EU */

/* User Dropdown Menu */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-avatar-btn,
.user-info-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.user-avatar-btn:hover,
.user-info-trigger:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.15);
    transform: translateY(-1px);
}

.user-avatar-img,
.user-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-avatar-img img,
.user-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name-header {
    color: var(--theme-text);
    font-size: 14px;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    color: var(--theme-text);
    opacity: 0.7;
}

.dropdown-arrow::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
}

.user-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

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

.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--theme-surface);
    border-left: 1px solid var(--theme-border);
    border-top: 1px solid var(--theme-border);
    transform: rotate(45deg);
}

.dropdown-user-info {
    padding: 15px;
    border-bottom: 1px solid var(--theme-border);
    background: rgba(255, 107, 53, 0.05);
}

.dropdown-user-name {
    font-weight: 600;
    color: var(--theme-text);
    font-size: 14px;
    margin-bottom: 4px;
}

.dropdown-user-email {
    font-size: 12px;
    color: var(--theme-text-secondary);
    opacity: 0.8;
}

.dropdown-admin-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 10px;
    margin-top: 5px;
}

.dropdown-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--theme-text);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.dropdown-menu-item:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--theme-primary);
}

.dropdown-menu-item svg,
.dropdown-menu-item .icon {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.dropdown-divider {
    height: 1px;
    background: var(--theme-border);
    margin: 5px 0;
}

.dropdown-menu-item.danger {
    color: #ef4444;
}

.dropdown-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Admin Menu Badge */
.admin-menu-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Improved Chat Input Container */
.chat-input-container {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    padding: 0.8rem 1rem !important;
    background: var(--theme-surface) !important;
    border-top: 1px solid var(--theme-border) !important;
    flex-shrink: 0 !important;
    margin-top: auto !important;
    height: auto !important;
    min-height: 60px !important;
    max-height: 60px !important;
}

.chat-input {
    flex: 1 !important;
    padding: 0.8rem 1rem !important;
    border: 2px solid var(--theme-border) !important;
    border-radius: 25px !important;
    background: var(--theme-background) !important;
    color: var(--theme-text) !important;
    font-size: 0.95rem !important;
    outline: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.chat-send-btn {
    padding: 0.8rem 1.5rem !important;
    background: var(--theme-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.chat-send-btn:hover {
    background: var(--theme-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3) !important;
}

/* Fix chat messages area to take remaining space */
.chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 1rem !important;
    min-height: 0 !important;
}

.chat-main {
    flex: 4 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
}

/* Modern Button Styles */
.modern-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modern-btn-primary {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.modern-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.modern-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--theme-text);
    border: 1px solid var(--theme-border);
}

.modern-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--theme-primary);
}

/* Notification Badges */
.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dc2626;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    text-align: center;
    flex-shrink: 0;
}

.dropdown-menu-item {
    position: relative;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .user-name-header {
        display: none;
    }
    
    .user-dropdown-menu {
        right: -10px;
        min-width: 180px;
    }
    
    .chat-input-container {
        padding: 0.6rem !important;
    }
    
    .chat-input {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.9rem !important;
    }
    
    .chat-send-btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
    }
}