/**
 * Rainz Accessibility — toolbar UI.
 * Original design by Rainz.ai (https://rainz.ai). GPL-2.0-or-later.
 */

:root {
	--rnz-primary: #100E33;
	--rnz-accent: #05D89E;
	--rnz-text: #2B2A4A;
	--rnz-bg-soft: #F6F7FC;
	--rnz-border: #E3E4F2;
	--rnz-offset: 90px;
}

#rnz-a11y-root,
#rnz-a11y-root * {
	box-sizing: border-box;
	font-family: Assistant, Arial, sans-serif;
}

/* Floating trigger */
#rnz-a11y-root .rnz-trigger {
	position: fixed;
	bottom: var(--rnz-offset, 90px);
	z-index: 999990;
	width: 52px;
	height: 52px;
	border: 0;
	border-radius: 50%;
	background: var(--rnz-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(16, 14, 51, .35);
	transition: transform .15s ease;
}
#rnz-a11y-root .rnz-trigger:hover { transform: scale(1.06); }
#rnz-a11y-root .rnz-trigger:focus-visible {
	outline: 3px solid var(--rnz-accent);
	outline-offset: 2px;
}
#rnz-a11y-root.rnz-pos-right .rnz-trigger { right: 18px; }
#rnz-a11y-root.rnz-pos-left .rnz-trigger { left: 18px; }

/* Button sizes */
#rnz-a11y-root.rnz-size-sm .rnz-trigger { width: 42px; height: 42px; }
#rnz-a11y-root.rnz-size-sm .rnz-trigger svg { width: 34px; height: 34px; }
#rnz-a11y-root.rnz-size-lg .rnz-trigger { width: 62px; height: 62px; }
#rnz-a11y-root.rnz-size-lg .rnz-trigger svg { width: 52px; height: 52px; }

/* Panel */
#rnz-a11y-root .rnz-panel {
	position: fixed;
	bottom: calc(var(--rnz-offset, 90px) + 62px);
	z-index: 999991;
	width: 340px;
	max-width: calc(100vw - 28px);
	max-height: min(72vh, 640px);
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--rnz-border);
	border-radius: 18px;
	box-shadow: 0 14px 44px rgba(16, 14, 51, .2);
}
#rnz-a11y-root.rnz-pos-right .rnz-panel { right: 18px; }
#rnz-a11y-root.rnz-pos-left .rnz-panel { left: 18px; }

/* Header */
#rnz-a11y-root .rnz-head {
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	justify-content: space-between;
	background: var(--rnz-primary);
	padding: 14px 18px;
	position: sticky;
	top: 0;
	z-index: 5;
}
#rnz-a11y-root .rnz-title {
	margin: 0;
	color: #fff;
	font-size: 19px;
	font-weight: 700;
}
#rnz-a11y-root .rnz-close {
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 6px;
	border-radius: 6px;
}
#rnz-a11y-root .rnz-close:focus-visible { outline: 2px solid var(--rnz-accent); }

/* Body */
#rnz-a11y-root .rnz-body { padding: 10px 12px 14px; }

/* Highlighted accessible-version card */
#rnz-a11y-root .rnz-mode-card {
	background: var(--rnz-primary);
	border-radius: 14px;
	padding: 4px 6px;
	margin: 2px 2px 10px;
}
#rnz-a11y-root .rnz-mode-card .rnz-row-text { color: #fff; }
#rnz-a11y-root .rnz-mode-card strong {
	display: block;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
}
#rnz-a11y-root .rnz-mode-sub {
	display: block;
	font-size: 12px;
	color: var(--rnz-accent);
	margin-top: 2px;
}
#rnz-a11y-root .rnz-mode-card .rnz-switch { background: rgba(255, 255, 255, .28); }

/* Rows */
#rnz-a11y-root .rnz-row { border-bottom: 1px solid #F0F1F8; }
#rnz-a11y-root .rnz-row:last-of-type { border-bottom: 0; }
#rnz-a11y-root .rnz-row-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 8px;
	cursor: pointer;
	transition: background .15s;
	border-radius: 10px;
}
#rnz-a11y-root .rnz-row-label:hover { background: var(--rnz-bg-soft); }
#rnz-a11y-root .rnz-row-text {
	color: var(--rnz-text);
	font-size: 16px;
}

/* Switch */
#rnz-a11y-root .rnz-switch {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
	border-radius: 999px;
	background: #C9CBDD;
	transition: background .15s;
}
#rnz-a11y-root .rnz-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
#rnz-a11y-root .rnz-knob {
	position: absolute;
	top: 3px;
	inset-inline-start: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	transition: transform .15s;
	pointer-events: none;
}
#rnz-a11y-root .rnz-switch input:checked ~ .rnz-knob { transform: translateX(-20px); }
#rnz-a11y-root[dir="ltr"] .rnz-switch input:checked ~ .rnz-knob { transform: translateX(20px); }
#rnz-a11y-root .rnz-switch:has(input:checked) { background: var(--rnz-accent); }
#rnz-a11y-root .rnz-switch input:focus-visible ~ .rnz-knob {
	outline: 3px solid var(--rnz-accent);
	outline-offset: 2px;
}

/* Font size row */
#rnz-a11y-root .rnz-row-font {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 11px 8px;
}
#rnz-a11y-root .rnz-font-ctrls {
	display: flex;
	align-items: center;
	gap: 8px;
	direction: ltr;
}
#rnz-a11y-root .rnz-font-btn {
	width: 32px;
	height: 32px;
	border: 1px solid var(--rnz-border);
	border-radius: 50%;
	background: var(--rnz-bg-soft);
	color: var(--rnz-primary);
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
#rnz-a11y-root .rnz-font-btn:hover { background: var(--rnz-border); }
#rnz-a11y-root .rnz-font-btn:focus-visible { outline: 3px solid var(--rnz-primary); }
#rnz-a11y-root .rnz-font-level {
	min-width: 46px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--rnz-text);
}

/* Reset */
#rnz-a11y-root .rnz-reset {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 10px;
	border: 1px solid var(--rnz-border);
	border-radius: 10px;
	background: #fff;
	color: var(--rnz-primary);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
#rnz-a11y-root .rnz-reset:hover { background: var(--rnz-bg-soft); }
#rnz-a11y-root .rnz-reset:focus-visible { outline: 3px solid var(--rnz-primary); }

/* Footer */
#rnz-a11y-root .rnz-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 18px;
	background: var(--rnz-bg-soft);
	border-top: 1px solid var(--rnz-border);
	padding: 12px 16px;
}
#rnz-a11y-root .rnz-foot a {
	color: var(--rnz-primary);
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 2px;
}
#rnz-a11y-root .rnz-credit {
	flex-basis: 100%;
	text-align: center;
	font-size: 12px;
	opacity: .8;
	text-decoration: none;
}
#rnz-a11y-root .rnz-credit:hover { text-decoration: underline; }

/* Skip link */
#rnz-skip-link {
	position: fixed;
	top: -80px;
	right: 10px;
	z-index: 999999;
	background: var(--rnz-primary, #100E33);
	color: #fff;
	padding: 14px 24px;
	font-size: 18px;
	border-radius: 6px;
	text-decoration: underline;
	transition: top .15s;
}
#rnz-skip-link:focus { top: 10px; }

@media (max-width: 480px) {
	#rnz-a11y-root:not(.rnz-size-sm):not(.rnz-size-lg) .rnz-trigger { width: 48px; height: 48px; }
}

/* Hide on mobile (settings option) */
@media (max-width: 767px) {
	#rnz-a11y-root.rnz-hide-mobile { display: none !important; }
}
