/*
 * Matrix-Rechner
 *
 * Alle Regeln gelten nur innerhalb von .mxr, damit nichts anderes auf der
 * Seite verändert wird (das alte Plugin hat mit Tailwind u. a. den Shop und
 * alle Eingabefelder der Seite umgestylt).
 *
 * :where(.mxr) hält die Spezifität so niedrig wie bei den alten Tailwind-Klassen.
 * So greifen Theme-Stile und eigenes CSS der Seiten weiterhin wie bisher.
 */

.mxr {
	--mxr-radius: 15px;
	--mxr-btn-bg: #f2bcbc;
	--mxr-btn-color: #000;
	--mxr-sahasrara: #f298f2;
	--mxr-ajna: #beccf7;
	--mxr-vishuddha: #d1f1fc;
	--mxr-anahata: #ceedce;
	--mxr-manipura: #fcfce8;
	--mxr-svadhisthana: #fce0b5;
	--mxr-muladhara: #f2bcbc;
	display: block;
	width: 100%;
}

.mxr,
.mxr *,
.mxr *::before,
.mxr *::after {
	box-sizing: border-box;
}

.mxr [hidden] {
	display: none !important;
}

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

/* ---------- Rahmen ---------- */

:where(.mxr) .container-matrix {
	display: block;
	width: 1380px;
	max-width: 100%;
	margin: 3rem auto 0;
}

:where(.mxr) .mxr-cols {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	margin-top: 3rem;
}

:where(.mxr) .container-matrix.mxr-cols {
	flex-direction: row;
	align-items: flex-start;
	margin-top: 3rem;
}

:where(.mxr) .mxr-cols--reverse {
	flex-direction: row-reverse;
}

:where(.mxr) .mxr-col {
	width: 100%;
}

@media (min-width: 1024px) {
	:where(.mxr) .mxr-col {
		width: 50%;
	}
}

/* ---------- Formular ---------- */

:where(.mxr) .mxr-form {
	margin: 0;
}

:where(.mxr) .mxr-form__row {
	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 1rem;
}

@media (min-width: 768px) {
	:where(.mxr) .mxr-form__row {
		flex-direction: row;
	}
}

@media (min-width: 1024px) {
	:where(.mxr) .mxr-form__row {
		align-items: flex-end;
	}

	:where(.mxr--layout-3) .mxr-form__row {
		justify-content: flex-start;
	}
}

:where(.mxr) .mxr-form__date {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

:where(.mxr) .mxr-form__selects {
	display: flex;
	gap: 8px;
}

/* Wie im alten Plugin: Datumsfelder und Button höchstens 120 px breit. */
:where(.mxr) .birthdate-item {
	display: flex;
	flex-direction: column;
	gap: 3px;
	max-width: 120px;
}

:where(.mxr) .mxr-select {
	height: 48px;
	margin: 0;
	padding: 8px;
	border: 2px solid #4b5563;
	border-radius: var(--mxr-radius);
	background-color: #fff;
	color: inherit;
	font: inherit;
	width: auto;
	max-width: 100%;
}

:where(.mxr) .mxr-input {
	height: 48px;
	width: 20rem;
	max-width: 100%;
	margin: 0 5px 0 0;
	padding: 12px;
	border: 2px solid #4b5563;
	border-radius: var(--mxr-radius);
	background: #f8f8f8;
	color: inherit;
	font: inherit;
}

:where(.mxr) .mxr-form__label {
	display: block;
}

:where(.mxr) .mxr-gender {
	display: flex;
	gap: 4px;
}

:where(.mxr) .mxr-gender__btn {
	height: 48px;
	padding: 8px 12px;
	border: 0;
	border-radius: var(--mxr-radius);
	background: #f3f4f6;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

:where(.mxr) .mxr-gender__btn.active {
	background: #d8ef7b;
}

:where(.mxr) .mxr-form__submit {
	display: flex;
	flex-direction: column;
	margin-top: 1rem;
}

@media (min-width: 768px) {
	:where(.mxr) .mxr-form__submit {
		margin-top: 0;
	}
}

:where(.mxr) .mxr-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 16px;
	border: 0;
	border-radius: var(--mxr-radius);
	background: var(--mxr-btn-bg);
	color: var(--mxr-btn-color);
	font-family: inherit;
	font-size: inherit;
	font-weight: 700;
	cursor: pointer;
}

/* E-Mail für den Download nach dem Kauf */
:where(.mxr) .mxr-email {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 0 auto 1.5rem;
	text-align: center;
}

:where(.mxr) .mxr-email__label {
	display: block;
}

:where(.mxr) .mxr-email__input {
	width: 300px;
	max-width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 14px;
	border: 2px solid var(--mxr-btn-bg);
	border-radius: var(--mxr-radius);
	background: #fff;
	color: inherit;
	font: inherit;
}

:where(.mxr) .mxr-email__hint {
	max-width: 420px;
	margin: 0;
	padding: 0;
	font-size: 0.85em;
	opacity: 0.75;
}

:where(.mxr) .mxr-unlock {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 1.5rem auto 0;
	text-align: center;
}

:where(.mxr) .mxr-unlock__msg {
	max-width: 520px;
	margin: 0;
	padding: 0;
}

:where(.mxr) .mxr-unlock.is-error .mxr-unlock__msg {
	color: #b42318;
}

/* Höhere Spezifität: Themes stylen Links sonst um (z. B. unterstrichen). */
.mxr .mxr-unlock__btn,
.mxr .mxr-unlock__btn:hover,
.mxr .mxr-unlock__btn:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-height: 48px;
	height: auto;
	padding: 10px 24px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none !important;
	box-shadow: none;
}

.mxr .mxr-unlock__confirm,
.mxr .mxr-unlock__mail {
	border: 0;
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
}

.mxr .mxr-unlock__mail:disabled {
	opacity: 0.6;
	cursor: default;
}

.mxr .mxr-unlock__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

:where(.mxr) .mxr-error {
	margin: 12px 0 0;
	color: #b42318;
	font-weight: 600;
	text-align: center;
}

/* ---------- Diagramm ---------- */

:where(.mxr) .mxr-chart-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 3rem;
}

/* Quadratisch, damit nichts springt, solange das Bild lädt. */
:where(.mxr) .obch {
	position: relative;
	width: 550px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
}

@media (max-width: 1200px) {
	:where(.mxr) .obch {
		padding: 2px;
	}
}

:where(.mxr) .transimage {
	position: relative;
	z-index: 0;
	right: 3px;
	bottom: 5px;
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
}

@media (max-width: 600px) {
	:where(.mxr) .transimage {
		bottom: 0;
	}
}

:where(.mxr) .trans {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

:where(.mxr) .matrix .trans {
	border: 1px solid #262538;
}

:where(.mxr) .trans > div {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
}

:where(.mxr) .mxr-age {
	width: 5%;
	height: 3%;
}

:where(.mxr) .mxr-ex__in {
	border: 1px solid #111827;
	background: #fff;
	color: #111827;
}

:where(.mxr) .trans span {
	font-size: 16px;
}

@media (max-width: 1335px) {
	:where(.mxr) .trans span {
		font-size: 15px;
	}
}

@media (max-width: 1200px) {
	:where(.mxr) .trans span {
		font-size: 16px;
	}

	:where(.mxr) .trans > div {
		overflow: hidden;
	}

	:where(.mxr) .trans > div > span {
		display: block;
	}
}

@media (max-width: 600px) {
	:where(.mxr) .trans span {
		position: relative;
		font-size: 15px;
	}

	:where(.mxr) .obch .trans span {
		top: 0;
		font-size: 12px;
	}
}

@media (max-width: 470px) {
	:where(.mxr) .obch .trans span {
		font-size: 13px;
	}
}

/* ---------- Tabelle (Gesundheitskarte) ---------- */

:where(.mxr) .mxr-table-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

:where(.mxr) .mxr-table-box {
	width: fit-content;
	max-width: 100%;
	margin-top: 2.5rem;
	color: #111827;
}

:where(.mxr) .mxr-table__title {
	margin: 0 0 0.75rem;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 2rem;
	text-align: center;
}

:where(.mxr) .mxr-table__sub {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	line-height: 1.75rem;
	text-align: center;
}

@media (min-width: 1024px) {
	:where(.mxr) .mxr-table__title,
	:where(.mxr) .mxr-table__sub {
		text-align: left;
	}
}

:where(.mxr) .mxr-table {
	width: 500px;
	max-width: 100%;
	margin: 0;
	border-collapse: collapse;
}

:where(.mxr) .mxr-table tr {
	border: 2px solid #374151;
}

:where(.mxr) .mxr-table thead tr,
:where(.mxr) .mxr-table .mxr-table__total {
	background: #c6c8d4;
}

:where(.mxr) .mxr-table th,
:where(.mxr) .mxr-table td {
	padding: 8px;
	border: 0;
	vertical-align: middle;
}

:where(.mxr) .mxr-table thead th,
:where(.mxr) .mxr-table thead td {
	height: 56px;
	color: #6b7280;
	font-weight: 700;
	text-align: left;
}

:where(.mxr) .mxr-table__num {
	padding: 0 5px;
	color: #fff;
	text-align: center;
}

:where(.mxr) .mxr-table__num--manipura {
	color: inherit;
}

:where(.mxr) .mxr-table__num img {
	display: block;
	max-width: 40px;
	height: auto;
}

:where(.mxr) .mxr-table__name strong,
:where(.mxr) .mxr-table__name span {
	display: block;
	text-align: left;
}

:where(.mxr) .mxr-table__name strong {
	font-size: 16px;
}

:where(.mxr) .mxr-table__name span {
	margin-top: 5px;
	font-size: 13px;
}

:where(.mxr) .mxr-table__val {
	text-align: center;
}

/* ---------- Bestimmungen und Programme ---------- */

:where(.mxr) .proposals {
	margin: 1.25rem auto 0;
	padding: 0 3rem;
}

@media (min-width: 1024px) {
	:where(.mxr) .proposals {
		margin-top: 3rem;
	}
}

:where(.mxr) .mxr-purposes__row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: center;
	gap: 1rem;
	width: 100%;
	margin-top: 3rem;
}

@media (min-width: 1024px) {
	:where(.mxr) .mxr-purposes__row {
		gap: 1.5rem;
	}

	:where(.mxr--layout-1, .mxr--layout-2) .mxr-purposes__row {
		flex-wrap: nowrap;
		gap: 0;
	}

	:where(.mxr--layout-1, .mxr--layout-2) .mxr-purpose {
		width: 33.333%;
	}
}

:where(.mxr) .mxr-purpose {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	width: 100%;
}

:where(.mxr) .mxr-purpose__head {
	display: flex;
	flex-direction: column;
	align-items: center;
}

:where(.mxr) .mxr-purpose__title {
	margin-bottom: 5px;
	font-size: 17px;
	font-weight: 700;
	text-align: center;
}

:where(.mxr) .mxr-purpose__desc {
	margin: 0;
	font-size: 13px;
	text-align: center;
}

:where(.mxr) .mxr-purpose__body {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

:where(.mxr) .mxr-purpose__pair > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

:where(.mxr) .mxr-purpose__pair p,
:where(.mxr) .mxr-programs__row p {
	margin: 0;
	padding: 0;
}

:where(.mxr) .mxr-purpose__brace {
	display: block;
	max-width: 40px;
	height: auto;
}

:where(.mxr) .mxr-circle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 2px solid #111827;
	border-radius: 50%;
}

:where(.mxr) .mxr-programs {
	width: fit-content;
	margin: 3rem auto 0;
}

:where(.mxr) .mxr-programs__row {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

:where(.mxr) .mxr-programs__nums {
	display: flex;
	gap: 2px;
}

/* ---------- Deutungstexte ---------- */

:where(.mxr) .mxr-results {
	display: flex;
	flex-direction: column;
	margin: 0 0 2rem;
}

:where(.mxr) .mxr-results__heading {
	margin: 2rem 0 0;
}

:where(.mxr) .tabs-content-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	width: 100%;
	margin-top: 2rem;
}

@media (min-width: 1024px) {
	:where(.mxr) .tabs-content-wrapper {
		margin-top: 3rem;
	}
}

:where(.mxr) .mxr-result {
	padding: 1.25rem;
	border: 1px solid #3d3d3d;
	border-radius: var(--mxr-radius);
}

:where(.mxr) .mxr-result__title {
	margin: 0;
	padding: 0;
	font-size: 1.5rem;
	line-height: 2rem;
}

.mxr .mxr-result__toggle,
.mxr .mxr-result__toggle:hover,
.mxr .mxr-result__toggle:focus {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

.mxr .mxr-result__toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.mxr .mxr-result__toggle::after {
	content: "";
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	margin-right: 4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	opacity: 0.5;
	transform: rotate(45deg);
	transition: transform 0.3s;
}

.mxr .mxr-result.active .mxr-result__toggle::after {
	transform: rotate(225deg);
}

:where(.mxr) .tabs-content-text {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: grid-template-rows 0.4s, opacity 0.3s, margin-top 0.4s;
}

:where(.mxr) .mxr-result.active > .tabs-content-text {
	grid-template-rows: 1fr;
	margin-top: 0.75rem;
	opacity: 1;
}

:where(.mxr) .list-content {
	min-height: 0;
	overflow: hidden;
}

/* Kürzt eigenes CSS den Text auf eine Zeile, erscheint wie früher "..." am Ende. */
:where(.mxr) .mxr-result__body p {
	overflow: hidden;
	overflow-wrap: anywhere;
	text-overflow: ellipsis;
}

:where(.mxr) .mxr-result__body > :first-child {
	margin-top: 0;
}

:where(.mxr) .mxr-result__body > :last-child {
	margin-bottom: 0;
	padding-bottom: 0;
}

:where(.mxr) .mxr-results__empty {
	margin: 0;
}

/* Nach bestätigtem Kauf: Texte ganz zeigen, auch wenn eigenes CSS sie sonst auf eine Zeile kürzt. */
.mxr.mxr--unlocked .tabs-content-text .list-content div,
.mxr.mxr--unlocked .mxr-result__body p {
	height: auto !important;
	overflow: visible !important;
	white-space: normal !important;
	text-overflow: clip !important;
}

@media (prefers-reduced-motion: reduce) {
	:where(.mxr) .tabs-content-text,
	.mxr .mxr-result__toggle::after {
		transition: none;
	}
}
