/* WP Accessibility Suite — widget frontend */

#was-widget-root {
	position: fixed;
	bottom: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.was-position-bottom-right {
	right: 20px;
}

.was-position-bottom-left {
	left: 20px;
}

/* Tutto quello che si vede del widget va scritto per esteso: i temi colorano
   i `button` a modo loro (GeneratePress li fa bianchi) e un pannello di
   accessibilita' con il testo illeggibile e' il peggio che possa capitare. */
#was-widget-root button {
	font-family: inherit;
	font-size: 15px;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
}

#was-toggle-btn {
	width: 56px;
	height: 56px;
	border-radius: 0;
	border: none;
	padding: 0;
	background-color: var(--was-primary-color, #2563eb);
	color: var(--was-icon-color, #ffffff);
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Forma: quadrata di base, tonda se il sito la vuole tonda. */
.was-shape-round #was-toggle-btn {
	border-radius: 50%;
}

.was-shape-round #was-panel,
.was-shape-round #was-panel .was-toggle-option,
.was-shape-round #was-panel .was-button-row button,
.was-shape-round #was-reset-btn {
	border-radius: 8px;
}

#was-toggle-btn .was-icon {
	display: block;
	width: 30px;
	height: 30px;
}

#was-toggle-btn .was-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

#was-toggle-btn:hover {
	filter: brightness(0.9);
}

#was-panel {
	position: absolute;
	bottom: 66px;
	width: 300px;
	max-width: calc(100vw - 40px);
	background: #ffffff;
	color: #111111;
	border-radius: 0;
	border: 1px solid #d7d7d7;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
	overflow: hidden;
}

.was-position-bottom-right #was-panel {
	right: 0;
}

.was-position-bottom-left #was-panel {
	left: 0;
}

#was-panel[hidden] {
	display: none;
}

.was-panel-header {
	background-color: var(--was-primary-color, #2563eb);
	color: var(--was-icon-color, #ffffff);
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.was-panel-header h2 {
	font-size: 16px;
	margin: 0;
}

#was-close-btn {
	background: transparent;
	border: none;
	color: inherit;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
}

.was-panel-body {
	padding: 16px;
	max-height: 70vh;
	overflow-y: auto;
}

.was-control-group {
	margin-bottom: 14px;
}

.was-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
}

.was-button-row {
	display: flex;
	gap: 6px;
}

.was-button-row button {
	flex: 1;
	padding: 11px 0;
	border: 1px solid #8a8a8a;
	background: #f2f2f2;
	color: #111111;
	border-radius: 0;
	cursor: pointer;
	font-size: 16px;
	font-weight: 700;
}

.was-button-row button:hover {
	background: #e6e6e6;
}

.was-toggle-option {
	display: block;
	width: 100%;
	text-align: left;
	padding: 11px 13px;
	margin-bottom: 8px;
	border: 1px solid #8a8a8a;
	border-radius: 0;
	background: #f2f2f2;
	/* scritto per esteso: senza questo il tema lo lascia bianco su grigio */
	color: #111111;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
}

.was-toggle-option:hover {
	background: #e6e6e6;
}

.was-toggle-option[aria-pressed="true"] {
	background-color: var(--was-primary-color, #2563eb);
	color: var(--was-icon-color, #ffffff);
	border-color: var(--was-primary-color, #2563eb);
}

#was-reset-btn {
	width: 100%;
	padding: 11px 12px;
	margin-top: 6px;
	border: 1px solid #8a1717;
	color: #8a1717;
	background: #fff;
	border-radius: 0;
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
}

#was-reset-btn:hover {
	background: #fee2e2;
}

/* ---------- Stati applicati al sito (html.was-*) ---------- */

/* Dimensione del testo.
   Mancava: il JavaScript scriveva --was-font-scale e metteva la classe, ma
   nessuna regola le usava e i tasti A- / A+ non facevano niente.
   La scala agisce sulla radice, quindi sul sito vale per tutto cio' che e'
   scritto in rem o em. Un tema con le misure in px non si ingrandisce: e' il
   tema che va convertito, non il widget. */
html.was-font-scaled {
	font-size: var(--was-font-scale, 100%);
}

/* Il pannello del widget resta della sua misura: chi ingrandisce il testo
	 vuole leggere il sito, non ritrovarsi i comandi fuori schermo. */
html.was-font-scaled #was-widget {
	font-size: 16px;
}


html.was-contrast body {
	background: #000 !important;
	color: #fff !important;
}

html.was-contrast body a {
	color: #ffff00 !important;
}

html.was-contrast body * {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
}

html.was-dyslexia body,
html.was-dyslexia body * {
	font-family: "Comic Sans MS", "Comic Sans", sans-serif !important;
	letter-spacing: 0.03em !important;
	line-height: 1.6 !important;
}

html.was-pause-animations *,
html.was-pause-animations *::before,
html.was-pause-animations *::after {
	animation-play-state: paused !important;
	transition: none !important;
}

html.was-highlight-links a {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
}

html.was-highlight-links a:focus,
html.was-highlight-links button:focus,
html.was-highlight-links input:focus,
html.was-highlight-links select:focus,
html.was-highlight-links textarea:focus {
	outline: 3px solid #ff0000 !important;
	outline-offset: 2px !important;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute !important;
	width: 1px;
}
