/*
 * Pojo Accessibility — custom layer
 * wp-float-buttons-a11y-cookies 1.2.0
 * Hides the original toggle; floating round button + toolbar close (×).
 * Background matches the site dark button (.my-account, #383838).
 */

:root {
	--float-btn-bg: #383838;
	--float-btn-color: #ffffff;
}

.pojo-a11y-toolbar-toggle {
	display: none !important;
}

.pojo-a11y-float-btn {
	position: fixed;
	bottom: var(--float-btn-offset-bottom, 20px);
	/* LTR: bottom-right. RTL: bottom-left (see rule below). */
	right: var(--float-btn-side, 16px);
	left: auto;
	z-index: 99999;
	width: var(--float-btn-size, 44px);
	height: var(--float-btn-size, 44px);
	border-radius: 50%;
	background-color: var(--float-btn-bg, #383838);
	color: var(--float-btn-color, #ffffff);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
	padding: 0;
}

/* WordPress marks RTL pages with dir="rtl" / body.rtl only; LTR pages have no marker. */
html[dir="rtl"] .pojo-a11y-float-btn,
body.rtl .pojo-a11y-float-btn {
	left: var(--float-btn-side, 16px);
	right: auto;
}

.pojo-a11y-float-btn:hover,
.pojo-a11y-float-btn:focus {
	transform: scale(1.05);
}

.pojo-a11y-float-btn svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	pointer-events: none;
}

.pojo-a11y-toolbar-close {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	padding: 2px 6px;
	color: inherit;
	opacity: 0.75;
	border-radius: 4px;
	transition: opacity 0.15s ease;
}

.pojo-a11y-toolbar-close:hover,
.pojo-a11y-toolbar-close:focus {
	opacity: 1;
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Pojo's own rule is more specific (display:block). Match it so the × sits on the row. */
#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay p.pojo-a11y-toolbar-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

html[dir="rtl"] #pojo-a11y-toolbar .pojo-a11y-toolbar-overlay p.pojo-a11y-toolbar-title,
body.rtl #pojo-a11y-toolbar .pojo-a11y-toolbar-overlay p.pojo-a11y-toolbar-title {
	flex-direction: row-reverse;
}

html[dir="ltr"] #pojo-a11y-toolbar .pojo-a11y-toolbar-overlay p.pojo-a11y-toolbar-title,
body.ltr #pojo-a11y-toolbar .pojo-a11y-toolbar-overlay p.pojo-a11y-toolbar-title {
	flex-direction: row;
}

@media (max-width: 950px) {
	.pojo-a11y-float-btn {
		width: 48px;
		height: 48px;
	}

	.pojo-a11y-float-btn svg {
		width: 20px;
		height: 20px;
	}
}
