/* MRM Passkeys – mobile first, erbt Farben/Radien vom Woodmart-Theme */
.mrm-pk {
	--mrm-pk-primary: var(--wd-primary-color, #6b8f3a);
	--mrm-pk-text: var(--wd-text-color, #333);
	--mrm-pk-muted: #6f6f6f;
	--mrm-pk-border: var(--brdcolor-gray-300, rgba(0, 0, 0, .12));
	--mrm-pk-bg: var(--bgcolor-gray-100, #f7f7f5);
	--mrm-pk-radius: var(--wd-brd-radius, 8px);
	--mrm-pk-danger: #b42318;
	--mrm-pk-success: #2e7d32;
	color: var(--mrm-pk-text);
}

.mrm-pk[hidden],
.mrm-pk [hidden] { display: none !important; }

.mrm-pk-icon { flex: none; width: 20px; height: 20px; }

/* ---------- Buttons ---------- */
.mrm-pk .mrm-pk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 48px;          /* gut tippbar */
	padding: 12px 20px;
	line-height: 1.2;
	text-transform: none;
}
.mrm-pk .mrm-pk-btn--primary {
	background-color: var(--mrm-pk-primary);
	border-color: var(--mrm-pk-primary);
	color: #fff;
}
.mrm-pk .mrm-pk-btn--primary:hover,
.mrm-pk .mrm-pk-btn--primary:focus-visible { filter: brightness(.93); color: #fff; }
.mrm-pk .mrm-pk-btn--danger { background-color: var(--mrm-pk-danger); border-color: var(--mrm-pk-danger); color: #fff; }
.mrm-pk .mrm-pk-btn--small { width: auto; min-height: 40px; padding: 8px 16px; }
.mrm-pk .mrm-pk-btn.is-busy { opacity: .7; cursor: progress; }
.mrm-pk .mrm-pk-btn.is-busy .mrm-pk-icon { animation: mrm-pk-pulse 1s ease-in-out infinite; }
@keyframes mrm-pk-pulse { 50% { opacity: .35; } }

.mrm-pk .mrm-pk-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 4px;
	background: none;
	border: 0;
	box-shadow: none;
	color: var(--mrm-pk-text);
	font-size: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.mrm-pk .mrm-pk-link--danger { color: var(--mrm-pk-danger); }

/* ---------- Meldungen ---------- */
.mrm-pk-msg { margin: 0; font-size: .92em; line-height: 1.45; }
.mrm-pk-msg.is-visible { margin-top: 12px; padding: 10px 12px; border-radius: var(--mrm-pk-radius); background: var(--mrm-pk-bg); }
.mrm-pk-msg--error { color: var(--mrm-pk-danger); background: #fdf1f0 !important; }
.mrm-pk-msg--success { color: var(--mrm-pk-success); background: #eef6ee !important; }

/* ---------- Login ---------- */
.mrm-pk-login { margin-top: 16px; clear: both; }
.mrm-pk-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 4px 0 16px;
	color: var(--mrm-pk-muted);
	font-size: .9em;
}
.mrm-pk-divider::before,
.mrm-pk-divider::after { content: ""; flex: 1; height: 1px; background: var(--mrm-pk-border); }
.mrm-pk-hint { margin: 8px 0 0; color: var(--mrm-pk-muted); font-size: .88em; text-align: center; }

/* ---------- Mein Konto → Passkeys ---------- */
.mrm-pk-account { max-width: 680px; }
.mrm-pk-intro { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.mrm-pk-intro__icon,
.mrm-pk-nudge__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--mrm-pk-bg);
	color: var(--mrm-pk-primary);
}
.mrm-pk-intro__icon .mrm-pk-icon,
.mrm-pk-nudge__icon .mrm-pk-icon { width: 24px; height: 24px; }
.mrm-pk-intro__title,
.mrm-pk-nudge__title { margin: 0 0 4px; font-weight: 700; font-size: 1.05em; }
.mrm-pk-intro__text,
.mrm-pk-nudge__text { margin: 0; line-height: 1.5; }

.mrm-pk-benefits { list-style: none; margin: 0 0 20px; padding: 0; }
.mrm-pk-benefits li { position: relative; padding: 4px 0 4px 26px; line-height: 1.45; }
.mrm-pk-benefits li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: .7em;
	width: 10px;
	height: 6px;
	border-left: 2px solid var(--mrm-pk-primary);
	border-bottom: 2px solid var(--mrm-pk-primary);
	transform: rotate(-45deg);
}

.mrm-pk-list-title { margin: 28px 0 10px; font-size: 1.1em; }
.mrm-pk-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--mrm-pk-border); }
.mrm-pk-item { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--mrm-pk-border); }
.mrm-pk-item--empty { color: var(--mrm-pk-muted); }
.mrm-pk-item__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mrm-pk-item__name { font-weight: 600; overflow-wrap: anywhere; }
.mrm-pk-item__meta { color: var(--mrm-pk-muted); font-size: .88em; }
.mrm-pk-item__badge { align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--mrm-pk-bg); color: var(--mrm-pk-muted); font-size: .78em; }
.mrm-pk-item__actions { display: flex; gap: 16px; margin-left: -4px; }

.mrm-pk-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.mrm-pk-inline .input-text { flex: 1 1 100%; min-height: 44px; }
.mrm-pk-inline--confirm { display: block; padding: 12px; border-radius: var(--mrm-pk-radius); background: #fdf1f0; }
.mrm-pk-inline__title { margin: 0 0 4px; font-weight: 700; color: var(--mrm-pk-danger); }
.mrm-pk-inline__hint { margin: 0 0 8px; font-size: .9em; line-height: 1.45; }
.mrm-pk-inline__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mrm-pk-footnote { margin-top: 16px; color: var(--mrm-pk-muted); font-size: .88em; }

/* ---------- Hinweis-Karte ---------- */
.mrm-pk-nudge {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin: 0 0 24px;
	padding: 16px;
	border: 1px solid var(--mrm-pk-border);
	border-left: 4px solid var(--mrm-pk-primary);
	border-radius: var(--mrm-pk-radius);
	background: #fff;
	transition: opacity .2s ease;
}
.mrm-pk-nudge.is-leaving { opacity: 0; }
.mrm-pk-nudge__body { flex: 1; min-width: 0; }
.mrm-pk-nudge__actions { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin-top: 12px; }
.mrm-pk-nudge__actions .mrm-pk-link { justify-content: center; }

/* ---------- Abfrage nach dem Login: Bottom-Sheet (mobil) / Dialog (Desktop) ---------- */
html.mrm-pk-noscroll { overflow: hidden; }
.mrm-pk-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-end; justify-content: center; }
.mrm-pk-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s ease; }
.mrm-pk-modal__sheet {
	position: relative;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 28px 20px calc(20px + env(safe-area-inset-bottom));
	border-radius: 16px 16px 0 0;
	background: #fff;
	box-shadow: 0 -8px 30px rgba(0, 0, 0, .15);
	transform: translateY(100%);
	transition: transform .22s ease;
}
.mrm-pk-modal.is-open .mrm-pk-modal__backdrop { opacity: 1; }
.mrm-pk-modal.is-open .mrm-pk-modal__sheet { transform: none; }
.mrm-pk-modal__sheet::before { /* Griff-Andeutung */
	content: "";
	position: absolute;
	top: 10px;
	left: 50%;
	width: 40px;
	height: 4px;
	margin-left: -20px;
	border-radius: 2px;
	background: var(--mrm-pk-border);
}
.mrm-pk-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--mrm-pk-muted);
	cursor: pointer;
}
.mrm-pk-modal__body { text-align: center; }
.mrm-pk-modal__body .mrm-pk-nudge__icon { width: 56px; height: 56px; margin-bottom: 12px; }
.mrm-pk-modal__body .mrm-pk-nudge__icon .mrm-pk-icon { width: 28px; height: 28px; }
.mrm-pk-modal__title { margin: 0 0 8px; font-weight: 700; font-size: 1.2em; line-height: 1.3; }
.mrm-pk-modal__text { margin: 0 0 20px; line-height: 1.5; }
.mrm-pk-modal__actions { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.mrm-pk-modal__actions .mrm-pk-link { justify-content: center; }
.mrm-pk-modal__foot { margin: 12px 0 0; color: var(--mrm-pk-muted); font-size: .85em; }

/* ---------- ab Tablet ---------- */
@media (min-width: 600px) {
	.mrm-pk-account .mrm-pk-btn,
	.mrm-pk-nudge .mrm-pk-btn { width: auto; }
	.mrm-pk-item { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
	.mrm-pk-item__actions { flex: none; }
	.mrm-pk-inline { flex-basis: 100%; }
	.mrm-pk-inline .input-text { flex: 1 1 220px; }
	.mrm-pk-item { flex-wrap: wrap; }
	.mrm-pk-nudge__actions { flex-direction: row; align-items: center; gap: 12px; }
	.mrm-pk-modal { align-items: center; padding: 24px; }
	.mrm-pk-modal__sheet { max-width: 440px; padding: 32px 28px 24px; border-radius: 16px; transform: translateY(16px); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
	.mrm-pk-modal.is-open .mrm-pk-modal__sheet { opacity: 1; }
	.mrm-pk-modal__sheet::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.mrm-pk .mrm-pk-btn.is-busy .mrm-pk-icon { animation: none; }
	.mrm-pk-nudge,
	.mrm-pk-modal__backdrop,
	.mrm-pk-modal__sheet { transition: none; }
}

/* =====================================================================
 * Login-/Registrierungsseite im MRM-Design (mobile first)
 * ===================================================================== */
.mrm-auth {
	--mrm-auth-ink: var(--wd-title-color, #272f38);
	--mrm-auth-soft: #f4f1ea;
	box-sizing: border-box;
	width: 100%;
	max-width: 500px;
	margin: 8px auto 32px;
	padding: 20px 18px 24px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .06);
}
.mrm-auth *,
.mrm-auth *::before,
.mrm-auth *::after { box-sizing: border-box; }

/* Tabs als Segment-Schalter */
.mrm-auth__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	margin: 0 0 22px;
	padding: 4px;
	border-radius: 12px;
	background: var(--mrm-auth-soft);
}
.mrm-auth .mrm-auth__tab {
	min-height: 44px;
	margin: 0;
	padding: 8px 10px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	box-shadow: none;
	color: var(--mrm-pk-muted);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.mrm-auth .mrm-auth__tab[aria-selected="true"] {
	background: #fff;
	color: var(--mrm-auth-ink);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.mrm-auth .mrm-auth__tab:focus-visible { outline: 2px solid var(--mrm-pk-primary); outline-offset: 2px; }

/* Ohne JS: beide Bereiche untereinander */
.mrm-auth.is-ready .mrm-auth__panel:not(.is-active) { display: none; }
.mrm-auth:not(.is-ready) .mrm-auth__tabs { display: none; }
.mrm-auth:not(.is-ready) .mrm-auth__panel + .mrm-auth__panel { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--mrm-pk-border); }

.mrm-auth .mrm-auth__title {
	margin: 0 0 6px;
	color: var(--mrm-auth-ink);
	font-size: 24px;
	line-height: 1.25;
	text-align: left;
}
.mrm-auth__lead { margin: 0 0 20px; line-height: 1.5; }

/* Formular */
.mrm-auth form.mrm-auth__form,
.woocommerce .mrm-auth form.mrm-auth__form { margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.mrm-auth .form-row { margin: 0 0 14px; padding: 0; }
.mrm-auth .form-row label { display: block; margin-bottom: 6px; color: var(--mrm-auth-ink); font-weight: 600; }
.mrm-auth .form-row label.checkbox,
.mrm-auth .form-row label.woocommerce-form__label-for-checkbox { display: inline; font-weight: 400; }
.mrm-auth input.input-text {
	width: 100%;
	min-height: 48px;
	font-size: 16px; /* verhindert Zoom auf iOS */
}

.mrm-auth__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 2px 0 18px;
}
.mrm-auth__row .woocommerce-form-login__rememberme {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	cursor: pointer;
}
.mrm-auth__row .woocommerce-form-login__rememberme input { width: 18px; height: 18px; margin: 0; }
.mrm-auth .mrm-auth__forgot { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

.mrm-auth .mrm-auth__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	margin: 0;
	border-color: var(--mrm-auth-ink);
	border-radius: 10px;
	background-color: var(--mrm-auth-ink);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-transform: none;
}
.mrm-auth .mrm-auth__btn:hover,
.mrm-auth .mrm-auth__btn:focus-visible { background-color: #3a4450; border-color: #3a4450; color: #fff; }
.mrm-auth .mrm-auth__submit { margin: 0 0 4px; }

/* Passkey ganz oben */
.mrm-pk-login--hero { margin: 0 0 4px; }
.mrm-pk .mrm-pk-btn--hero {
	min-height: 54px;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 700;
	box-shadow: 0 4px 14px color-mix(in srgb, var(--mrm-pk-primary) 35%, transparent);
}
.mrm-pk .mrm-pk-btn--hero .mrm-pk-icon { width: 22px; height: 22px; }
.mrm-pk-login--hero .mrm-pk-divider { margin: 22px 0 18px; }

/* Registrieren */
.mrm-auth__benefits { margin-bottom: 18px; }
.mrm-auth__note { margin: 0 0 14px; font-size: .92em; }
.mrm-auth .wlr-signup-message { display: block; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--mrm-auth-soft); color: var(--mrm-auth-ink); font-weight: 600; }
.mrm-auth .wlr-signup-message + br { display: none; }

.mrm-auth__switch { margin: 18px 0 0; text-align: center; }
.mrm-auth__switch a { font-weight: 700; }

@media (min-width: 600px) {
	.mrm-auth { margin-top: 16px; padding: 32px 36px 32px; }
	.mrm-auth .mrm-auth__title { font-size: 26px; }
}

/* Passwort anzeigen (Auge) – unabhängig vom Theme sauber im Feld */
.mrm-auth .password-input { position: relative; display: block; width: 100%; }
.mrm-auth .password-input input.input-text { padding-right: 52px; }
.mrm-auth .password-input .show-password-input {
	position: absolute;
	top: 50%;
	right: 4px;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
	box-shadow: none;
	transform: translateY(-50%);
	cursor: pointer;
}
.mrm-auth .password-input .show-password-input.display-password {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
}
.mrm-auth .password-input .show-password-input::before,
.mrm-auth .password-input .show-password-input::after { display: none !important; content: none !important; }
.mrm-auth .password-input .show-password-input:focus-visible { outline: 2px solid var(--mrm-pk-primary); outline-offset: -2px; }
