.menu-item-bar .menu-item-handle:has(.menuitem-copy-paste-buttons) {
	max-width: min(584px, calc(100% - 160px));
	overflow: visible;
}

/* .copied */
.copied-menu-item .menu-item-bar .menu-item-handle {
	border-color: #2271b1;
	background: hsl(207, 68%, 93%);
}

.menuitem-copy-paste-buttons {
	position: absolute;
	z-index: 10;
	top: 0px;
	bottom: 0px;
	left: 100%;
	margin: auto;
	display: flex;
	place-content: center;
	align-content: center;
	width: auto;
	height: calc(100% + 2px);
	padding-inline: 0.25pc;
	border-top: 1px solid #dcdcde;
	border-right: 1px solid #dcdcde;
	border-bottom: 1px solid #dcdcde;
}

.menuitem-copy-paste-buttons button {
	background: none;
	border: none;
	cursor: pointer;
	padding-inline: 0.25pc;
	color: #72777c;
	transition: color 0.2s ease;
}

.menuitem-copy-paste-buttons button:hover {
	color: #0073aa;
}

/* Delete - 赤色 */
.menuitem-copy-paste-buttons button.button-delete:hover {
	color: #d63638;
}

.menuitem-copy-paste-buttons .dashicons {
	font-size: 16px;
	height: 16px;
	width: 16px;
}

/* .disabled */
.menuitem-copy-paste-buttons .button-paste.is-disabled,
	.menuitem-copy-paste-buttons .button-paste.is-disabled:hover {
	cursor: not-allowed;
	color: #72777c;
	opacity: 0.5;
}

/* === Collapse feature (Task 0520.1) === */

/* Hide items whose ancestor is collapsed */
.menu-item.menuitem-hidden-by-collapse {
	display: none !important;
}

/* Visual indicator for a collapsed parent */
.menu-item.menuitem-collapsed > .menu-item-bar .menu-item-handle {
	border-left: 3px solid #2271b1;
}

/* Toggle-collapse button: only visible when item has children (controlled via inline style by JS) */
.menuitem-copy-paste-buttons .button-toggle-collapse:hover {
	color: #2271b1;
}
