/*!
 * RadioPlan24 Screenreader & Vorlesefunktion
 * Paket: de.radioplan24.screenreader
 * Version: 1.0.0
 */

.rp24srSrOnly {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---------------------------------------------------------------- Sprunglinks */

.rp24srSkipLinks {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1000;
	width: 100%;
}

.rp24srSkipLinks a {
	position: absolute;
	top: -100vh;
	left: 8px;
	display: inline-block;
	padding: 12px 20px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wcfButtonPrimaryText, #fff);
	text-decoration: none;
	background-color: var(--wcfButtonPrimaryBackground, #1a3a5c);
	border: 2px solid var(--wcfButtonPrimaryText, #fff);
	border-radius: 0 0 4px 4px;
}

.rp24srSkipLinks a:focus {
	top: 0;
	outline: 3px solid #ffb400;
	outline-offset: 2px;
}

/* ---------------------------------------------------------------- Panel */

.rp24srPanel {
	position: fixed;
	z-index: 900;
	display: flex;
	flex-direction: column;
	width: 340px;
	max-width: calc(100vw - 24px);
	font-size: 14px;
	line-height: 1.45;
	color: var(--wcfContentText, #2b2b2b);
	background-color: var(--wcfContentBackground, #fff);
	border: 1px solid var(--wcfContentBorderInner, rgba(0, 0, 0, .15));
	border-radius: 10px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
	transition: bottom .18s ease;
}

/* --rp24srShift wird per JS gesetzt und haelt das Bedienfeld frei von
   WoltLabs eigenen Schaltflaechen unten rechts (".pageAction"). */
.rp24srPanel[data-position="bottomRight"] { right: 16px; bottom: calc(16px + var(--rp24srShift, 0px)); }
.rp24srPanel[data-position="bottomLeft"]  { left: 16px;  bottom: calc(16px + var(--rp24srShift, 0px)); }
.rp24srPanel[data-position="topRight"]    { right: 16px; top: 90px; }
.rp24srPanel[data-position="topLeft"]     { left: 16px;  top: 90px; }

.rp24srPanel.rp24srCollapsed .rp24srPanelBody,
.rp24srPanel.rp24srCollapsed .rp24srPanelActions {
	display: none;
}

.rp24srPanel.rp24srCollapsed {
	width: auto;
}

.rp24srPanelHeader {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 10px 12px;
	background-color: var(--wcfHeaderBackground, #24303c);
	color: var(--wcfHeaderText, #fff);
	border-radius: 9px 9px 0 0;
	cursor: pointer;
}

.rp24srPanel.rp24srCollapsed .rp24srPanelHeader {
	border-radius: 9px;
}

.rp24srPanelHeader .rp24srPanelTitle {
	flex: 1 1 auto;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rp24srPanelHeader .rp24srIcon {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.rp24srPanelToggle {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	padding: 0;
	color: inherit;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 50%;
	cursor: pointer;
}

.rp24srPanelToggle .rp24srIcon {
	width: 18px;
	height: 18px;
	fill: currentColor;
	transition: transform .18s ease;
}

/* Pfeil zeigt eingeklappt nach oben, ausgeklappt nach unten. */
.rp24srPanel.rp24srCollapsed .rp24srPanelToggle .rp24srIcon {
	transform: rotate(180deg);
}

.rp24srPanelBody {
	padding: 12px;
	overflow-y: auto;
	max-height: min(52vh, 420px);
}

.rp24srPanelActions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 10px 12px;
	border-top: 1px solid var(--wcfContentBorderInner, rgba(0, 0, 0, .12));
}

.rp24srBtn {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	min-width: 44px;
	padding: 6px 12px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--wcfButtonText, #2b2b2b);
	background-color: var(--wcfButtonBackground, #eceff1);
	border: 1px solid var(--wcfContentBorderInner, rgba(0, 0, 0, .15));
	border-radius: 6px;
	cursor: pointer;
}

.rp24srBtn:hover {
	color: var(--wcfButtonTextActive, #2b2b2b);
	background-color: var(--wcfButtonBackgroundActive, #dfe4e7);
}

.rp24srBtn:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.rp24srBtn.rp24srBtnPrimary {
	color: var(--wcfButtonPrimaryText, #fff);
	background-color: var(--wcfButtonPrimaryBackground, #1a3a5c);
	border-color: transparent;
}

.rp24srBtn.rp24srBtnPrimary:hover {
	background-color: var(--wcfButtonPrimaryBackgroundActive, #24506f);
}

.rp24srBtn .rp24srIcon {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.rp24srField {
	margin-bottom: 12px;
}

.rp24srField > label {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	font-weight: 600;
}

.rp24srField input[type="range"] {
	width: 100%;
	min-height: 28px;
}

.rp24srField select {
	width: 100%;
	min-height: 34px;
	padding: 4px 6px;
	font-family: inherit;
	font-size: 14px;
	color: var(--wcfInputText, #2b2b2b);
	background-color: var(--wcfInputBackground, #fff);
	border: 1px solid var(--wcfInputBorder, rgba(0, 0, 0, .25));
	border-radius: 4px;
}

.rp24srFieldValue {
	float: right;
	font-weight: 400;
	font-variant-numeric: tabular-nums;
}

.rp24srStatus {
	margin-bottom: 10px;
	padding: 6px 8px;
	font-size: 13px;
	background-color: var(--wcfContentContainerBackground, rgba(0, 0, 0, .04));
	border-radius: 4px;
	min-height: 30px;
}

.rp24srStatus.rp24srStatusError {
	color: #a01f1f;
	background-color: rgba(200, 40, 40, .12);
}

.rp24srTranscript {
	max-height: 180px;
	margin-top: 10px;
	padding: 8px;
	overflow-y: auto;
	font-size: 14px;
	line-height: 1.6;
	background-color: var(--wcfContentContainerBackground, rgba(0, 0, 0, .035));
	border: 1px solid var(--wcfContentBorderInner, rgba(0, 0, 0, .1));
	border-radius: 4px;
}

.rp24srTranscript span {
	padding: 1px 0;
	border-radius: 2px;
}

.rp24srTranscript span.rp24srActive {
	color: #111;
	background-color: #ffe066;
	box-shadow: 0 0 0 2px #ffe066;
}

/* ---------------------------------------------------------------- Beitrags-Buttons */

.rp24srMessageButton {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	min-height: 32px;
	padding: 4px 10px;
	font-family: inherit;
	font-size: 13px;
	color: inherit;
	background: transparent;
	border: 1px solid var(--wcfContentBorderInner, rgba(0, 0, 0, .2));
	border-radius: 4px;
	cursor: pointer;
}

.rp24srMessageButton:hover {
	background-color: var(--wcfContentContainerBackground, rgba(0, 0, 0, .05));
}

.rp24srMessageButton .rp24srIcon {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.rp24srMessageButton[aria-pressed="true"] {
	color: var(--wcfButtonPrimaryText, #fff);
	background-color: var(--wcfButtonPrimaryBackground, #1a3a5c);
	border-color: transparent;
}

.rp24srReadingSource {
	outline: 3px dashed #ffb400;
	outline-offset: 4px;
}

/* ---------------------------------------------------------------- Barrierefreiheit */

html.rp24srFocus *:focus-visible,
html.rp24srFocus a:focus,
html.rp24srFocus button:focus,
html.rp24srFocus input:focus,
html.rp24srFocus select:focus,
html.rp24srFocus textarea:focus,
html.rp24srFocus [tabindex]:focus {
	outline: 3px solid #ffb400 !important;
	outline-offset: 2px !important;
}

html.rp24srContrast body {
	background: #000 !important;
	color: #fff !important;
}

html.rp24srContrast a,
html.rp24srContrast a * {
	color: #ffe066 !important;
}

html.rp24srContrast .rp24srPanel,
html.rp24srContrast .messageBody,
html.rp24srContrast .section,
html.rp24srContrast .box,
html.rp24srContrast .container,
html.rp24srContrast .messageGroupList,
html.rp24srContrast .tabularBox {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
}

html.rp24srContrast .rp24srBtn,
html.rp24srContrast .button,
html.rp24srContrast button {
	color: #000 !important;
	background-color: #ffe066 !important;
	border-color: #fff !important;
}

html.rp24srContrast img,
html.rp24srContrast video {
	filter: contrast(1.15);
}

html.rp24srFont110 body { font-size: 110% !important; }
html.rp24srFont125 body { font-size: 125% !important; }
html.rp24srFont150 body { font-size: 150% !important; }

@media (max-width: 640px) {
	.rp24srPanel {
		width: calc(100vw - 20px);
		left: 10px;
		right: 10px;
	}

	.rp24srPanel[data-position="topRight"],
	.rp24srPanel[data-position="topLeft"] {
		top: 70px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rp24srPanel,
	.rp24srBtn,
	.rp24srPanelToggle .rp24srIcon {
		transition: none !important;
	}
}

@media print {
	.rp24srPanel,
	.rp24srSkipLinks,
	.rp24srMessageButton {
		display: none !important;
	}
}
