/* ============================================================ */
/* Texas Accessibility Widget - Standalone Styles              */
/* Version: 1.0 | April 2026                                    */
/* ============================================================ */

#txa-widget, #txa-widget * {
	font-family: 'Assistant', 'Arial', sans-serif !important;
	font-size: 15px;
	box-sizing: border-box;
	line-height: 1.4;
}

#txa-widget {
	position: fixed;
	bottom: 20px;
	left: 0;
	z-index: 999990;
	direction: rtl;
}

#txa-open {
	display: block;
	width: 40px;
	height: 40px;
	background: #2c2c2c;
	border: 2px solid #fff;
	border-top-right-radius: 90%;
	border-bottom-right-radius: 50%;
	box-shadow: 0 0 7px rgba(0,0,0,0.5);
	cursor: pointer;
	position: relative;
	outline: none;
	transition: background 0.2s;
}

#txa-open::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 22px;
	height: 22px;
	margin: -11px 0 0 -11px;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><circle cx='12' cy='4' r='2'/><path d='M15 8h-6c-.55 0-1 .45-1 1v5c0 .55.45 1 1 1h1v7c0 .55.45 1 1 1s1-.45 1-1v-3h2v3c0 .55.45 1 1 1s1-.45 1-1v-7h1c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1z'/></svg>") no-repeat center;
	background-size: contain;
}

#txa-open:hover,
#txa-open:focus {
	background: #000;
}

#txa-box {
	display: none;
	position: absolute;
	bottom: 0;
	left: 44px;
	width: 260px;
	background: #fff;
	border: 2px solid #2c2c2c;
	border-radius: 0 6px 6px 0;
	box-shadow: 0 0 7px rgba(0,0,0,0.4);
	overflow: hidden;
}

#txa-box.txa-open {
	display: block;
}

.txa-header {
	background: #2c2c2c;
	color: #fff;
	padding: 10px;
	text-align: center;
	font-weight: bold;
	position: relative;
}

.txa-close {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	padding: 0 8px;
	line-height: 1;
}

.txa-close:hover,
.txa-close:focus {
	color: #FFD700;
	outline: 2px solid #fff;
}

.txa-buttons {
	max-height: 400px;
	overflow-y: auto;
}

.txa-btn {
	display: block;
	width: 100%;
	padding: 10px 14px;
	border: none;
	border-bottom: 1px solid #eee;
	background: #fff;
	color: #000;
	text-align: right;
	cursor: pointer;
	font-weight: normal;
	transition: background 0.15s;
}

.txa-btn::before {
	content: "";
	display: inline-block;
	width: 20px;
	margin-left: 8px;
	text-align: center;
	font-weight: bold;
}

.txa-btn[data-action="font-up"]::before { content: "A+"; color: #2c2c2c; }
.txa-btn[data-action="font-down"]::before { content: "A-"; color: #2c2c2c; }
.txa-btn[data-action="font-bold"]::before { content: "B"; font-weight: 900; }
.txa-btn[data-action="font-reset"]::before { content: "A"; }
.txa-btn[data-action="contrast"]::before { content: "\25D0"; font-size: 18px; }
.txa-btn[data-action="invert"]::before { content: "\25D1"; font-size: 18px; }
.txa-btn[data-action="mono"]::before { content: "\25CD"; font-size: 18px; }
.txa-btn[data-action="links"]::before { content: "\1F517"; }
.txa-btn[data-action="keyboard"]::before { content: "\2328"; }
.txa-btn[data-action="disc"]::before { content: "\2139"; }
.txa-btn[data-action="reset"]::before { content: "\21BA"; }

.txa-btn:hover,
.txa-btn:focus {
	background: #f0f0f0;
	outline: 2px solid #2c2c2c;
	outline-offset: -2px;
}

.txa-btn[aria-pressed="true"] {
	background: #FFEB3B;
	box-shadow: inset 0 0 0 2px #000;
	text-decoration: underline;
	font-weight: bold;
}

.txa-reset {
	background: #d32f2f !important;
	color: #fff !important;
	border-bottom: 2px solid #fff;
}

.txa-reset:hover,
.txa-reset:focus {
	background: #b71c1c !important;
}

.txa-disc-btn {
	background: #000 !important;
	color: #fff !important;
}

.txa-disc-btn:hover,
.txa-disc-btn:focus {
	background: #333 !important;
}

.txa-footer {
	background: #2c2c2c;
	color: #fff;
	padding: 6px;
	text-align: center;
	font-size: 12px;
}

.txa-footer a {
	color: #fff;
}

/* Disclaimer modal */
#txa-disc {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.7);
	z-index: 999999999;
}

#txa-disc.txa-open {
	display: block;
}

.txa-disc-inner {
	position: relative;
	margin: 60px auto;
	max-width: 720px;
	max-height: 80vh;
	overflow-y: auto;
	background: #fff;
	padding: 30px;
	border: 3px solid #2c2c2c;
	border-radius: 8px;
	box-shadow: 0 5px 15px rgba(0,0,0,0.5);
	text-align: right;
	direction: rtl;
	color: #000;
}

.txa-disc-close {
	position: absolute;
	left: 10px;
	top: 10px;
	background: #2c2c2c;
	color: #fff;
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
	font-weight: bold;
}

.txa-disc-close:hover,
.txa-disc-close:focus {
	background: #000;
}

.txa-disc-inner h3 {
	font-size: 22px;
	font-weight: bold;
	margin: 0 0 15px;
	color: #2c2c2c;
}

.txa-disc-inner p {
	margin: 0 0 15px;
	line-height: 1.6;
}

.txa-disc-inner ul {
	list-style: disc;
	padding-right: 25px;
	margin: 0 0 15px;
}

.txa-disc-inner li {
	margin-bottom: 6px;
}

/* Accessibility filters - applied to <html> */
html.txa-bold,
html.txa-bold * {
	font-weight: bold !important;
}

html.txa-contrast {
	filter: saturate(250%) !important;
}

html.txa-invert {
	filter: invert(100%) hue-rotate(180deg) !important;
}

html.txa-invert img,
html.txa-invert video {
	filter: invert(100%) hue-rotate(180deg) !important;
}

html.txa-mono {
	filter: grayscale(100%) !important;
}

html.txa-links a {
	text-decoration: underline !important;
	color: #0000EE !important;
	font-weight: bold !important;
}

html.txa-keyboard a:focus,
html.txa-keyboard button:focus,
html.txa-keyboard input:focus,
html.txa-keyboard select:focus,
html.txa-keyboard textarea:focus {
	background: yellow !important;
	color: #000 !important;
	outline: 3px solid #000 !important;
	box-shadow: 0 0 0 3px yellow !important;
}

/* Mobile */
@media (max-width: 768px) {
	#txa-widget {
		bottom: 15px;
		left: 0;
	}
	#txa-open {
		width: 32px;
		height: 32px;
		border-width: 1px;
	}
	#txa-open::before {
		width: 18px;
		height: 18px;
		margin: -9px 0 0 -9px;
	}
	#txa-box {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
	}
	.txa-buttons {
		max-height: calc(100vh - 120px);
	}
	.txa-disc-inner {
		margin: 0;
		max-height: 100vh;
		height: 100vh;
		border-radius: 0;
	}
}
