/**
 * Home hero Share QR button + modal.
 */

button.hero-cta-qr {
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
	line-height: 1.2;
	-webkit-appearance: none;
	appearance: none;
}

.hero-cta-qr .fa-qrcode {
	margin-right: 0.4em;
	font-size: 0.95em;
	vertical-align: -0.05em;
}

button.hero-cta-qr:focus-visible {
	outline: 2px solid #c5942a;
	outline-offset: 3px;
}

/* Kumkum, same red as the hero figures, so this sits apart from gold Book a Seva and the white Donate button. */
body.home .header-promo--split button.hero-cta-qr,
.page-template-homepage .header-promo--split button.hero-cta-qr,
html.ry-lean body.home .header-promo--split button.hero-cta-qr {
	color: #fff !important;
	background: #8b1a1a !important;
	border: 1px solid #8b1a1a !important;
}

body.home .header-promo--split button.hero-cta-qr:active,
.page-template-homepage .header-promo--split button.hero-cta-qr:active,
html.ry-lean body.home .header-promo--split button.hero-cta-qr:active {
	color: #fff !important;
	background: #6e1414 !important;
	border-color: #6e1414 !important;
}

@media (hover: hover) and (pointer: fine) {
	body.home .header-promo--split button.hero-cta-qr:hover,
	.page-template-homepage .header-promo--split button.hero-cta-qr:hover,
	html.ry-lean body.home .header-promo--split button.hero-cta-qr:hover {
		color: #fff !important;
		background: #6e1414 !important;
		border-color: #6e1414 !important;
	}
}

html.hsq-open,
html.hsq-open body {
	overflow: hidden;
}

/* The sticky View cart bar sits in the same band as the dialog. */
html.hsq-open .ms-added-toast,
html.hsq-open .rya-cart__fab {
	visibility: hidden;
}

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

.hsq:not([hidden]) {
	position: fixed;
	/* Above the sticky View cart bar (100100). */
	z-index: 100160;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
	box-sizing: border-box;
}

.hsq__scrim {
	position: absolute;
	inset: 0;
	background: rgba(20, 12, 8, 0.55);
}

.hsq__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(100%, 26rem);
	max-height: 100dvh;
	min-height: 0;
	overflow: hidden;
	margin: 0;
	padding: 1.25rem 1.25rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
	background: #fffdf8;
	color: #2c1810;
	border-radius: 1.25rem 1.25rem 0 0;
	box-shadow: 0 -12px 40px rgba(20, 12, 8, 0.18);
	box-sizing: border-box;
	text-align: center;
}

.hsq__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

@media (min-width: 40em) {
	.hsq:not([hidden]) {
		align-items: center;
		padding: 1.25rem;
	}

	.hsq__panel {
		max-height: calc(100dvh - 2.5rem);
		border-radius: 1.25rem;
		padding: 1.35rem 1.35rem 1.2rem;
		box-shadow: 0 18px 50px rgba(20, 12, 8, 0.22);
	}
}

.hsq__close,
#hero-share-qr button.hsq__close:hover,
#hero-share-qr button.hsq__close:focus,
#hero-share-qr button.hsq__close:active,
#hero-share-qr button.hsq__close:focus:not(:focus-visible) {
	position: absolute;
	top: 0.65rem;
	right: 0.65rem;
	/* Above .hsq__scroll — otherwise taps on the X hit the kicker/lead. */
	z-index: 2;
	width: 2.75rem;
	height: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #2c1810;
	font-size: 1.15rem;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.hsq__close:focus-visible {
	outline: 2px solid #c5942a;
	outline-offset: 2px;
}

.hsq__kicker {
	margin: 0.15rem 0 0.35rem;
	/* Clear the absolute close control in the top-right. */
	padding-right: 2.75rem;
	font-family: "Lato", sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #c5942a;
}

.hsq__title {
	margin: 0;
	padding-right: 2.75rem;
	font-family: "Lato", sans-serif;
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: #14110e;
}

.hsq__lead {
	margin: 0.45rem auto 0.9rem;
	max-width: 20rem;
	font-family: "Lato", sans-serif;
	font-size: 0.975rem;
	line-height: 1.45;
	color: #7c766b;
}

.hsq__card {
	margin: 0 auto 0.85rem;
	padding: 0.65rem;
	background: #fff;
	border: 1px solid #efe4d4;
	border-radius: 1rem;
}

.hsq__img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: min(38vh, 18rem);
	height: auto;
	margin: 0 auto;
	border-radius: 0.35rem;
	-webkit-touch-callout: default;
}

.hsq__linkrow code {
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	color: #2c1810;
}

.hsq:not(.is-ready) .hsq__card {
	min-height: 16rem;
	background: linear-gradient(90deg, #f6f1ea 25%, #fff 50%, #f6f1ea 75%);
	background-size: 200% 100%;
	animation: hsq-shimmer 1.1s ease-in-out infinite;
}

@keyframes hsq-shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
	.hsq:not(.is-ready) .hsq__card {
		animation: none;
		background: #f6f1ea;
	}
}

.hsq__btn--save,
#hero-share-qr button.hsq__btn--save:hover,
#hero-share-qr button.hsq__btn--save:focus,
#hero-share-qr button.hsq__btn--save:active,
#hero-share-qr button.hsq__btn--save:focus:not(:focus-visible) {
	flex: 0 0 auto;
	min-height: 3rem;
	width: 100%;
	margin: 0.75rem 0 0;
	color: #fff;
	background: #8b1a1a;
	border: 1px solid #8b1a1a;
}

.hsq__btn--save:active,
#hero-share-qr button.hsq__btn--save:active {
	background: #6e1414;
	border-color: #6e1414;
}

.hsq__hold {
	display: none;
	margin: -0.15rem 0 0.85rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: #7c766b;
}

@media (pointer: coarse) {
	.hsq__hold {
		display: block;
	}
}

.hsq__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6rem;
}

.hsq__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 3rem;
	padding: 0.7rem 0.75rem;
	border-radius: 999px;
	font-family: inherit;
	font-size: 0.975rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.hsq__btn:disabled {
	opacity: 0.55;
	cursor: wait;
}

.hsq__btn:focus-visible {
	outline: 2px solid #c5942a;
	outline-offset: 2px;
}

.hsq__btn--copy,
#hero-share-qr button.hsq__btn--copy:hover,
#hero-share-qr button.hsq__btn--copy:focus,
#hero-share-qr button.hsq__btn--copy:active,
#hero-share-qr button.hsq__btn--copy:focus:not(:focus-visible) {
	color: #2c1810;
	background: #fff;
	border: 1px solid #e6ddd2;
}

.hsq__btn--wa,
#hero-share-qr button.hsq__btn--wa:hover,
#hero-share-qr button.hsq__btn--wa:focus,
#hero-share-qr button.hsq__btn--wa:active,
#hero-share-qr button.hsq__btn--wa:focus:not(:focus-visible) {
	color: #fff;
	background: #128c7e;
	border: 1px solid #128c7e;
}

@media (hover: hover) and (pointer: fine) {
	#hero-share-qr button.hsq__btn--copy:hover {
		background: #f6f1ea;
		border-color: #d9cfc2;
	}

	#hero-share-qr button.hsq__btn--wa:hover {
		background: #0e7368;
		border-color: #0e7368;
	}

	#hero-share-qr button.hsq__btn--save:hover {
		background: #6e1414;
		border-color: #6e1414;
	}

	#hero-share-qr button.hsq__close:hover {
		background: #f6f1ea;
	}
}

.hsq__btn .fa-whatsapp {
	width: 1.15em;
	height: 1.15em;
}

.hsq__more,
#hero-share-qr button.hsq__more:hover,
#hero-share-qr button.hsq__more:focus,
#hero-share-qr button.hsq__more:active,
#hero-share-qr button.hsq__more:focus:not(:focus-visible) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 0.55rem;
	min-height: 2.75rem;
	padding: 0.45rem 0.75rem;
	border: 0;
	background: transparent;
	color: #2c1810;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.18em;
	cursor: pointer;
}

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

.hsq__more:focus-visible {
	outline: 2px solid #c5942a;
	outline-offset: 2px;
}

.hsq__status {
	min-height: 0;
	margin: 0;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.35;
	color: #1a6b45;
}

.hsq__status:not(:empty) {
	min-height: 1.35em;
	margin: 0.55rem 0 0;
}

.hsq__linkrow {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	margin-top: 0.35rem;
	color: #7c766b;
	font-size: 0.8125rem;
}

.hsq__linkrow button,
#hero-share-qr .hsq__linkrow button:hover,
#hero-share-qr .hsq__linkrow button:focus,
#hero-share-qr .hsq__linkrow button:active,
#hero-share-qr .hsq__linkrow button:focus:not(:focus-visible) {
	border: 0;
	background: transparent;
	padding: 0.35rem 0.15rem;
	color: #2c1810;
	font-family: inherit;
	font-size: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	cursor: pointer;
}

.hsq__linkrow button:focus-visible {
	outline: 2px solid #c5942a;
	outline-offset: 2px;
}

/* Triggers outside the hero — drawer, header, menus, footer, All Sevas sheet. */

.ms-drawer-qr,
.ms-header-qr {
	display: none;
}

@media all and (max-width: 74.999em) {
	#mobile-menu-container .ms-drawer-qr {
		order: 2;
		display: flex;
		align-items: center;
		gap: 0.75rem;
		width: auto;
		margin: 0.75rem 1rem 0.35rem;
		padding: 0.85rem 1rem;
		border: 1px solid #ebe3d6;
		border-radius: 12px;
		background: #f7f2ea;
		color: #2c1810;
		font-family: inherit;
		font-size: inherit;
		text-align: left;
		cursor: pointer;
		-webkit-appearance: none;
		appearance: none;
		touch-action: manipulation;
	}

	#mobile-menu-container .ms-drawer-qr__icon {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 2.1rem;
		height: 2.1rem;
		border-radius: 50%;
		background: #fff;
		color: #c5942a;
		flex: 0 0 auto;
		font-size: 1rem;
	}

	#mobile-menu-container .ms-drawer-qr__copy {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		min-width: 0;
	}

	#mobile-menu-container .ms-drawer-qr__label {
		font-size: 0.8125rem;
		font-weight: 700;
		line-height: 1.2;
	}

	#mobile-menu-container .ms-drawer-qr__hint {
		font-size: 0.75rem;
		font-weight: 600;
		line-height: 1.3;
		color: #5c4a3a;
	}
}

@media (min-width: 75em) {
	.header-actions .ms-header-qr {
		display: inline-flex;
	}
}

html.ry-lean .header-actions .ms-header-qr {
	display: inline-flex !important;
}

html.ry-lean #mobile-menu-container .ms-drawer-qr {
	display: none !important;
}

.ms-header-qr {
	align-items: center;
	gap: 0.35rem;
	margin: 0;
	padding: 0.4rem 0.7rem;
	border: 1px solid #e6ddd2;
	border-radius: 999px;
	background: #fff;
	color: #2c1810;
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	touch-action: manipulation;
}

.ms-header-qr:focus-visible,
.ms-drawer-qr:focus-visible,
.ms-nav-qr:focus-visible,
.ms-footer-qr:focus-visible,
.ms-sevas-qr:focus-visible {
	outline: 2px solid #c5942a;
	outline-offset: 2px;
}

#menu-primary-items ul.sub-menu button.ms-nav-qr,
.header-nav .menu-primary ul.sub-menu button.ms-nav-qr {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	width: 100%;
	margin: 0;
	padding: 0.5rem 0.75rem;
	border: 0;
	border-radius: 0.875rem;
	background: transparent;
	color: #1b1a17;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

#menu-primary-items ul.sub-menu button.ms-nav-qr .ms-sub-copy,
.header-nav .menu-primary ul.sub-menu button.ms-nav-qr .ms-sub-copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.1rem;
	min-width: 0;
}

#menu-primary-items ul.sub-menu button.ms-nav-qr .ms-sub-title,
.header-nav .menu-primary ul.sub-menu button.ms-nav-qr .ms-sub-title {
	font-weight: 700;
	line-height: 1.3;
}

#menu-primary-items ul.sub-menu button.ms-nav-qr .ms-sub-desc,
.header-nav .menu-primary ul.sub-menu button.ms-nav-qr .ms-sub-desc {
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.4;
	color: #7c766b;
}

#menu-primary-items ul.sub-menu button.ms-nav-qr i,
.header-nav .menu-primary ul.sub-menu button.ms-nav-qr i {
	flex: 0 0 auto;
	width: 1.2em;
	margin-top: 0.15rem;
	text-align: center;
	color: #c5942a;
}

@media (hover: hover) and (pointer: fine) {
	#menu-primary-items ul.sub-menu button.ms-nav-qr:hover,
	.header-nav .menu-primary ul.sub-menu button.ms-nav-qr:hover {
		background: #f6f1e8;
	}

	.header-nav .menu-primary ul.sub-menu button.ms-nav-qr:hover .ms-sub-title {
		color: #8b1a1a;
	}
}

@media all and (max-width: 74.999em) {
	#menu-primary-items ul.sub-menu button.ms-nav-qr {
		align-items: center;
		min-height: 44px;
		padding: 0.45rem 1.25rem 0.45rem 1.75rem;
		border-radius: 0;
		font-size: 0.8125rem;
		color: #3d2e22;
	}
}

.footer-link-list button.ms-footer-qr {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, 0.65);
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: inherit;
	line-height: inherit;
	text-align: left;
	cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
	.footer-link-list button.ms-footer-qr:hover {
		color: #c5942a;
	}
}

.ms-sevas-qr {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	flex: 0 0 auto;
	width: calc(100% - 2rem);
	margin: 0.35rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
	padding: 0.7rem 0.9rem;
	border: 1px solid rgba(139, 26, 26, 0.35);
	border-radius: 8px;
	background: #fff;
	color: #8b1a1a;
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.ms-sevas-qr small {
	margin-left: auto;
	font-size: 0.75rem;
	font-weight: 600;
	color: #5c4a3a;
}

.hsq__safety {
	margin: 0.85rem 0 0;
	padding: 0.75rem 0.85rem;
	border: 1px solid rgba(92, 58, 32, 0.16);
	border-radius: 10px;
	background: rgba(255, 252, 246, 0.9);
	color: #4a3728;
	text-align: left;
}

.hsq__safety p {
	margin: 0 0 0.4rem;
	font-size: 0.82rem;
	line-height: 1.45;
}

.hsq__safety p:last-child {
	margin-bottom: 0;
}
