// Code block copy button — positioned at top-right of code block
.code-block-copy-btn {
	position: absolute;
	top: var(--padding-extra-small);
	right: var(--padding-extra-small);
	z-index: 1;

	.code-block-copy-trigger {
		padding: var(--padding-extra-small);
		border: none;
		border-radius: var(--radius-small);
		background-color: var(--action-tertiary);
		cursor: pointer;
		transition: background-color var(--transition-fast);

		// Reset tooltip base styles that conflict with this button
		box-shadow: none;

		// Override t-left tooltip so it slides in from the button, not the container edge
		&::before {
			transform: translate(calc(-100% + 0.375rem));
		}

		&::after {
			transform: translate(calc(-100% - 0.25rem));
		}

		.general-icon {
			color: var(--color-white);
		}

		&:hover,
		&:focus {
			background-color: var(--action-secondary);
			box-shadow: none;
		}

		&:focus-visible {
			outline: var(--action-outline) solid 0.1875rem;
		}
	}
}

.code-block-scrollbar-corner {
	::-webkit-scrollbar-corner {
		background: black;
	}
}
