/**
 * My Treasure Heart privacy choices and cookie consent manager.
 */

.mth-consent-banner[hidden],
.mth-consent-modal[hidden] {
	display: none !important;
}

.mth-consent-banner {
	background: #fffdf9;
	border-top: 2px solid var(--mth-gold, #c9a84c);
	bottom: 0;
	box-shadow: 0 -18px 60px rgba(28, 23, 19, 0.16);
	color: var(--mth-charcoal, #2e2a26);
	font-family: var(--font-body, "Jost", sans-serif);
	left: 0;
	opacity: 0;
	padding: 24px 30px;
	position: fixed;
	right: 0;
	transform: translateY(30px);
	transition: opacity 0.28s ease, transform 0.28s ease;
	z-index: 10000;
}

.mth-consent-banner.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.mth-consent-banner__inner {
	align-items: center;
	display: grid;
	gap: clamp(28px, 5vw, 72px);
	grid-template-columns: minmax(0, 1fr) minmax(190px, 220px);
	margin: 0 auto;
	max-width: 1180px;
}

.mth-consent-banner__copy {
	max-width: 810px;
}

.mth-consent-eyebrow {
	color: var(--mth-gold-dark, #9a7928);
	font-size: 0.66rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	margin: 0 0 7px;
	text-transform: uppercase;
}

.mth-consent-banner h2,
.mth-consent-modal h2,
.mth-consent-modal h3 {
	color: var(--mth-warm-black, #1c1713);
	font-family: var(--font-display, "Cormorant Garamond", serif);
}

.mth-consent-banner h2 {
	font-size: clamp(1.75rem, 3vw, 2.45rem);
	font-weight: 500;
	line-height: 1.05;
	margin: 0 0 10px;
}

.mth-consent-banner__copy > p:not(.mth-consent-eyebrow) {
	font-size: 0.88rem;
	line-height: 1.65;
	margin: 0 0 10px;
}

.mth-site .mth-consent-banner a {
	color: var(--mth-gold-dark, #9a7928);
	font-weight: 500;
	text-decoration: underline;
	text-decoration-color: rgba(154, 121, 40, 0.4);
	text-underline-offset: 3px;
}

.mth-consent-california {
	background: var(--mth-soft, #f2ebe0);
	border-left: 3px solid var(--mth-gold, #c9a84c);
	color: var(--mth-stone, #7a706a);
	max-width: 760px;
	padding: 8px 12px;
}

.mth-consent-california strong {
	color: var(--mth-warm-black, #1c1713);
}

.mth-site .mth-consent-text-action,
.mth-site .mth-footer-privacy-action {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	font-family: var(--font-body, "Jost", sans-serif);
	height: auto;
	line-height: 1.45;
	margin: 0;
	padding: 0;
	text-align: left;
	text-transform: none;
}

.mth-site .mth-consent-text-action {
	color: var(--mth-gold-dark, #9a7928);
	font-size: 0.75rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mth-site .mth-consent-text-action:hover,
.mth-site .mth-consent-text-action:focus {
	background: transparent;
	color: var(--mth-warm-black, #1c1713);
}

.mth-consent-banner__actions {
	display: grid;
	gap: 9px;
}

.mth-consent-button {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	font-family: var(--font-body, "Jost", sans-serif);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.3;
	min-height: 44px;
	padding: 12px 18px;
	text-align: center;
	text-transform: uppercase;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.mth-consent-button--primary {
	background: var(--mth-warm-black, #1c1713);
	border-color: var(--mth-warm-black, #1c1713);
	color: #ffffff;
}

.mth-consent-button--primary:hover,
.mth-consent-button--primary:focus {
	background: var(--mth-gold-dark, #9a7928);
	border-color: var(--mth-gold-dark, #9a7928);
	color: #ffffff;
}

.mth-consent-button--secondary {
	background: var(--mth-soft, #f2ebe0);
	border-color: var(--mth-sand, #e2d8cc);
	color: var(--mth-warm-black, #1c1713);
}

.mth-consent-button--secondary:hover,
.mth-consent-button--secondary:focus {
	background: var(--mth-sand, #e2d8cc);
	border-color: var(--mth-sand, #e2d8cc);
	color: var(--mth-warm-black, #1c1713);
}

.mth-consent-button--outline {
	background: transparent;
	border-color: var(--mth-gold-dark, #9a7928);
	color: var(--mth-gold-dark, #9a7928);
}

.mth-consent-button--outline:hover,
.mth-consent-button--outline:focus {
	background: var(--mth-gold-dark, #9a7928);
	border-color: var(--mth-gold-dark, #9a7928);
	color: #ffffff;
}

.mth-consent-button:focus-visible,
.mth-consent-text-action:focus-visible,
.mth-consent-close:focus-visible,
.mth-consent-trigger:focus-visible,
.mth-footer-privacy-action:focus-visible,
.mth-consent-toggle input:focus-visible + .mth-consent-toggle__track {
	outline: 3px solid rgba(60, 188, 181, 0.6);
	outline-offset: 3px;
}

body.mth-consent-modal-open {
	overflow: hidden;
}

.mth-consent-modal {
	inset: 0;
	opacity: 0;
	position: fixed;
	transition: opacity 0.22s ease;
	z-index: 10020;
}

.mth-consent-modal.is-visible {
	opacity: 1;
}

.mth-consent-modal__backdrop {
	background: rgba(28, 23, 19, 0.66);
	inset: 0;
	position: absolute;
}

.mth-consent-modal__dialog {
	background: #fffdf9;
	box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
	display: flex;
	flex-direction: column;
	left: 50%;
	max-height: min(86vh, 780px);
	max-width: 680px;
	overflow: hidden;
	position: absolute;
	top: 50%;
	transform: translate(-50%, calc(-50% + 18px));
	transition: transform 0.22s ease;
	width: calc(100% - 40px);
}

.mth-consent-modal.is-visible .mth-consent-modal__dialog {
	transform: translate(-50%, -50%);
}

.mth-consent-modal__header {
	align-items: flex-start;
	border-bottom: 1px solid var(--mth-sand, #e2d8cc);
	display: flex;
	gap: 24px;
	justify-content: space-between;
	padding: 26px 30px 22px;
}

.mth-consent-modal__header h2 {
	font-size: 2.25rem;
	font-weight: 500;
	line-height: 1;
	margin: 0;
}

.mth-consent-close {
	align-items: center;
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: var(--mth-stone, #7a706a);
	cursor: pointer;
	display: flex;
	font-family: Arial, sans-serif;
	font-size: 2rem;
	font-weight: 300;
	height: 38px;
	justify-content: center;
	line-height: 1;
	margin: -5px -8px 0 0;
	padding: 0;
	width: 38px;
}

.mth-consent-close:hover,
.mth-consent-close:focus {
	background: transparent;
	color: var(--mth-warm-black, #1c1713);
}

.mth-consent-modal__body {
	overflow-y: auto;
	padding: 24px 30px 8px;
}

.mth-consent-modal__body > p {
	color: var(--mth-stone, #7a706a);
	font-size: 0.9rem;
	line-height: 1.65;
	margin: 0 0 20px;
}

.mth-consent-gpc {
	background: #edf7f0;
	border-left: 3px solid #3f8154;
	color: #2f6641 !important;
	padding: 11px 13px;
}

.mth-consent-categories {
	display: grid;
	gap: 12px;
}

.mth-consent-category {
	background: #ffffff;
	border: 1px solid var(--mth-sand, #e2d8cc);
	padding: 17px 18px;
}

.mth-consent-category__heading {
	align-items: center;
	display: flex;
	gap: 20px;
	justify-content: space-between;
}

.mth-consent-category h3 {
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.15;
	margin: 0;
}

.mth-consent-required {
	color: var(--mth-gold-dark, #9a7928);
	display: block;
	font-size: 0.58rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	margin-top: 3px;
	text-transform: uppercase;
}

.mth-consent-category p {
	color: var(--mth-stone, #7a706a);
	font-size: 0.78rem;
	line-height: 1.55;
	margin: 10px 70px 0 0;
}

.mth-consent-toggle {
	display: inline-flex;
	flex: 0 0 auto;
	position: relative;
}

.mth-consent-toggle input {
	height: 1px;
	opacity: 0;
	position: absolute;
	width: 1px;
}

.mth-consent-toggle__track {
	background: #b9b3ae;
	border-radius: 24px;
	cursor: pointer;
	display: block;
	height: 26px;
	position: relative;
	transition: background-color 0.2s ease;
	width: 50px;
}

.mth-consent-toggle__track::after {
	background: #ffffff;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.24);
	content: "";
	height: 20px;
	left: 3px;
	position: absolute;
	top: 3px;
	transition: transform 0.2s ease;
	width: 20px;
}

.mth-consent-toggle input:checked + .mth-consent-toggle__track {
	background: var(--mth-hero-teal-dark, #2a9f98);
}

.mth-consent-toggle input:checked + .mth-consent-toggle__track::after {
	transform: translateX(24px);
}

.mth-consent-toggle input:disabled + .mth-consent-toggle__track {
	cursor: not-allowed;
	opacity: 0.72;
}

.mth-consent-modal__actions {
	background: #fffdf9;
	border-top: 1px solid var(--mth-sand, #e2d8cc);
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	padding: 18px 30px 22px;
}

.mth-consent-trigger {
	appearance: none;
	background: var(--mth-warm-black, #1c1713);
	border: 1px solid rgba(201, 168, 76, 0.6);
	border-radius: 999px;
	bottom: 18px;
	box-shadow: 0 6px 22px rgba(28, 23, 19, 0.22);
	color: #ffffff;
	cursor: pointer;
	font-family: var(--font-body, "Jost", sans-serif);
	font-size: 0.62rem;
	font-weight: 600;
	left: 18px;
	letter-spacing: 0.1em;
	line-height: 1;
	min-height: 38px;
	opacity: 1;
	padding: 11px 16px;
	position: fixed;
	right: auto;
	text-transform: uppercase;
	transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
	z-index: 9990;
}

.mth-consent-trigger:hover,
.mth-consent-trigger:focus {
	background: var(--mth-gold-dark, #9a7928);
	border-color: var(--mth-gold, #c9a84c);
	color: #ffffff;
}

.mth-consent-trigger.is-obscured {
	opacity: 0;
	pointer-events: none;
	transform: translateY(10px);
}

.mth-consent-trigger.is-position-right {
	left: auto;
	right: 18px;
}

.mth-consent-toast {
	align-items: flex-start;
	background: var(--mth-warm-black, #1c1713);
	border-left: 3px solid var(--mth-gold, #c9a84c);
	box-shadow: 0 12px 35px rgba(28, 23, 19, 0.28);
	color: #ffffff;
	display: grid;
	font-family: var(--font-body, "Jost", sans-serif);
	gap: 3px 16px;
	grid-template-columns: 1fr auto;
	max-width: 390px;
	opacity: 0;
	padding: 16px 18px;
	position: fixed;
	right: 18px;
	top: 18px;
	transform: translateY(-10px);
	transition: opacity 0.22s ease, transform 0.22s ease;
	width: calc(100% - 36px);
	z-index: 10040;
}

.mth-consent-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.mth-consent-toast strong {
	font-size: 0.82rem;
	grid-column: 1;
}

.mth-consent-toast span {
	color: var(--mth-gold-pale, #ede0c3);
	font-size: 0.73rem;
	grid-column: 1;
	line-height: 1.45;
}

.mth-consent-toast button {
	appearance: none;
	background: transparent;
	border: 0;
	box-shadow: none;
	color: #ffffff;
	cursor: pointer;
	font-size: 1.3rem;
	grid-column: 2;
	grid-row: 1 / span 2;
	height: 28px;
	line-height: 1;
	padding: 0;
	width: 28px;
}

.mth-site .mth-footer-privacy-action {
	color: var(--mth-gold-pale, #ede0c3);
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
}

.mth-site .mth-footer-privacy-action:hover,
.mth-site .mth-footer-privacy-action:focus {
	background: transparent;
	color: var(--mth-gold, #c9a84c);
}

@media (max-width: 760px) {
	.mth-consent-banner {
		max-height: 92vh;
		overflow-y: auto;
		padding: 20px 22px;
	}

	.mth-consent-banner__inner {
		align-items: stretch;
		gap: 18px;
		grid-template-columns: 1fr;
	}

	.mth-consent-banner__actions {
		grid-template-columns: 1fr 1fr;
	}

	.mth-consent-banner__actions .mth-consent-button--outline {
		grid-column: 1 / -1;
	}

	.mth-consent-modal__dialog {
		max-height: calc(100vh - 24px);
		width: calc(100% - 24px);
	}

	.mth-consent-modal__header,
	.mth-consent-modal__body {
		padding-left: 20px;
		padding-right: 20px;
	}

	.mth-consent-modal__actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
		padding: 15px 20px 18px;
	}

	.mth-consent-modal__actions .mth-consent-button--primary {
		grid-column: 1 / -1;
		grid-row: 1;
	}
}

@media (max-width: 430px) {
	.mth-consent-banner__actions,
	.mth-consent-modal__actions {
		grid-template-columns: 1fr;
	}

	.mth-consent-banner__actions .mth-consent-button--outline,
	.mth-consent-modal__actions .mth-consent-button--primary {
		grid-column: auto;
		grid-row: auto;
	}

	.mth-consent-category p {
		margin-right: 0;
	}

	.mth-consent-trigger {
		bottom: 12px;
		left: 12px;
		right: auto;
	}

	.mth-consent-trigger.is-position-right {
		left: auto;
		right: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mth-consent-banner,
	.mth-consent-modal,
	.mth-consent-modal__dialog,
	.mth-consent-button,
	.mth-consent-trigger,
	.mth-consent-toast,
	.mth-consent-toggle__track,
	.mth-consent-toggle__track::after {
		transition: none;
	}
}

@media print {
	.mth-consent-banner,
	.mth-consent-modal,
	.mth-consent-trigger,
	.mth-consent-toast {
		display: none !important;
	}
}
