/*
 * HappyOnline Page Kits — bridge for OpenCart blocks the kit has no design for
 * (cart total modules: coupon, voucher, reward, shipping estimate). Only the kit's tokens are used,
 * so the blocks follow whatever kit is installed. Loaded after the kit CSS.
 */

/* The store theme CSS is in the cascade layer "ho-store" on kit pages (see layerStoreStyles). Inside the kit
   area (.ho-pk-root) it is undone back to browser defaults plus a Bootstrap-like reboot, the base the kit was
   designed on; the kit CSS itself is not layered, so it wins over both. */
@layer ho-pk-reset {
/* SVG keeps its own attributes (fill="none", stroke="currentColor"): reverting them would blank every line icon */
:where(.ho-pk-root, .ho-pk-root *:not(svg, svg *), .ho-pk-root *:not(svg, svg *)::before, .ho-pk-root *:not(svg, svg *)::after) { all: revert; }
:where(.ho-pk-root, .ho-pk-root *, .ho-pk-root *::before, .ho-pk-root *::after) { box-sizing: border-box; }
:where(body.ho-pk-root) { margin: 0; line-height: 1.5; -webkit-text-size-adjust: 100%; }
:where(.ho-pk-root) :where(h1, h2, h3, h4, h5, h6) { margin-top: 0; margin-bottom: .5rem; font-weight: 500; line-height: 1.2; }
:where(.ho-pk-root) :where(h1) { font-size: calc(1.375rem + 1.5vw); }
:where(.ho-pk-root) :where(h2) { font-size: calc(1.325rem + .9vw); }
:where(.ho-pk-root) :where(h3) { font-size: calc(1.3rem + .6vw); }
:where(.ho-pk-root) :where(h4) { font-size: calc(1.275rem + .3vw); }
@media (min-width: 1200px) {
  :where(.ho-pk-root) :where(h1) { font-size: 2.5rem; }
  :where(.ho-pk-root) :where(h2) { font-size: 2rem; }
  :where(.ho-pk-root) :where(h3) { font-size: 1.75rem; }
  :where(.ho-pk-root) :where(h4) { font-size: 1.5rem; }
}
:where(.ho-pk-root) :where(h5) { font-size: 1.25rem; }
:where(.ho-pk-root) :where(h6) { font-size: 1rem; }
:where(.ho-pk-root) :where(p) { margin-top: 0; margin-bottom: 1rem; }
:where(.ho-pk-root) :where(ol, ul) { padding-left: 2rem; }
:where(.ho-pk-root) :where(ol, ul, dl) { margin-top: 0; margin-bottom: 1rem; }
:where(.ho-pk-root) :where(ol ol, ul ul, ol ul, ul ol) { margin-bottom: 0; }
:where(.ho-pk-root) :where(dt) { font-weight: 700; }
:where(.ho-pk-root) :where(dd) { margin-bottom: .5rem; margin-left: 0; }
:where(.ho-pk-root) :where(b, strong) { font-weight: bolder; }
:where(.ho-pk-root) :where(small) { font-size: .875em; }
:where(.ho-pk-root) :where(a) { color: inherit; }
:where(.ho-pk-root) :where(img, svg) { vertical-align: middle; }
:where(.ho-pk-root) :where(table) { caption-side: bottom; border-collapse: collapse; }
:where(.ho-pk-root) :where(th) { text-align: inherit; }
:where(.ho-pk-root) :where(label) { display: inline-block; }
:where(.ho-pk-root) :where(button) { border-radius: 0; }
:where(.ho-pk-root) :where(input, button, select, optgroup, textarea) { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; }
:where(.ho-pk-root) :where(button, select) { text-transform: none; }
:where(.ho-pk-root) :where(button, [type=button], [type=reset], [type=submit]) { -webkit-appearance: button; }
:where(.ho-pk-root) :where(button:not(:disabled), [type=button]:not(:disabled), [type=submit]:not(:disabled), [role=button]) { cursor: pointer; }
:where(.ho-pk-root) :where(textarea) { resize: vertical; }
:where(.ho-pk-root) :where(fieldset) { min-width: 0; padding: 0; margin: 0; border: 0; }
:where(.ho-pk-root) :where(legend) { float: left; width: 100%; padding: 0; margin-bottom: .5rem; font-size: 1.5rem; line-height: inherit; }
:where(.ho-pk-root) :where(legend + *) { clear: left; }
:where(.ho-pk-root) :where(hr) { margin: 1rem 0; color: inherit; border: 0; border-top: 1px solid; opacity: .25; }
:where(.ho-pk-root) :where([hidden]) { display: none; }
}
.ho-layout-aside__aside .card {
	margin: 0 0 var(--ho-space-2, 8px);
	border: 1px solid var(--ho-border, #E2E6E8);
	border-radius: var(--ho-radius-sm, 12px);
	background: var(--ho-bg, #FFFFFF);
	overflow: hidden;
}

.ho-layout-aside__aside .card-header {
	padding: 0;
	border: 0;
	background: transparent;
}

.ho-layout-aside__aside .card-title {
	margin: 0;
	font: var(--ho-weight-semibold, 600) var(--ho-text-sm, 14px)/1.3 var(--ho-font-body);
}

.ho-layout-aside__aside .card-title a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ho-space-2, 8px);
	padding: 14px 16px;
	color: var(--ho-ink);
}

.ho-layout-aside__aside .card-title a .fa {
	transition: transform var(--ho-t, 200ms) linear;
}

.ho-layout-aside__aside .card-title a[aria-expanded="true"] .fa {
	transform: rotate(180deg);
}

.ho-layout-aside__aside .collapse:not(.show) {
	display: none;
}

.ho-layout-aside__aside .card-body {
	padding: 0 16px 16px;
}

.ho-layout-aside__aside .col-form-label,
.ho-layout-aside__aside .control-label {
	display: block;
	flex: none;
	width: auto;
	max-width: none;
	padding: 0 0 6px;
	color: var(--ho-ink-muted, var(--ho-ink));
	font-size: var(--ho-text-sm, 14px);
}

.ho-layout-aside__aside .input-group {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--ho-space-2, 8px);
}

.ho-layout-aside__aside .input-group-btn {
	display: flex;
	width: auto;
}

.ho-layout-aside__aside .form-control,
.ho-layout-aside__aside .form-select {
	flex: 1 1 auto;
	min-width: 0;
	height: var(--ho-input-h, 48px);
	padding: 0 12px;
	border: 1px solid var(--ho-input-border, var(--ho-border-strong, #CCD1D3));
	border-radius: var(--ho-input-radius, var(--ho-radius-sm, 12px));
	background: var(--ho-input-bg, #FFFFFF);
	color: var(--ho-ink);
	font: var(--ho-text-md, 15px)/1.2 var(--ho-font-body);
}

.ho-layout-aside__aside .btn {
	height: var(--ho-input-h, 48px);
	padding: 0 16px;
	border: 0;
	border-radius: var(--ho-btn-radius, var(--ho-radius-sm, 12px));
	background: var(--ho-primary);
	color: var(--ho-on-primary, #FFFFFF);
	font: var(--ho-btn-weight, 600) var(--ho-text-sm, 14px)/1 var(--ho-font-body);
	white-space: nowrap;
	cursor: pointer;
}

.ho-layout-aside__aside .btn:hover {
	background: var(--ho-primary-hover, var(--ho-primary));
}

.ho-layout-aside__aside .form-group,
.ho-layout-aside__aside .mb-3 {
	margin-bottom: var(--ho-space-3, 12px);
}

/* checkout: the payment extension's confirm block */
.ho-pk-payment-step {
	margin-top: var(--ho-space-4, 16px);
}

.ho-pk-payment-step .buttons,
.ho-pk-payment-step .pull-right,
.ho-pk-payment-step .float-end {
	float: none;
	text-align: left;
}

.ho-pk-payment-step input[type="button"],
.ho-pk-payment-step button,
.ho-pk-payment-step input[type="submit"] {
	width: 100%;
	height: var(--ho-btn-h, 52px);
	border: 0;
	border-radius: var(--ho-btn-radius, var(--ho-radius-sm, 12px));
	background: var(--ho-primary);
	color: var(--ho-on-primary, #FFFFFF);
	font: var(--ho-btn-weight, 600) var(--ho-btn-font-size, 15px)/1 var(--ho-font-body);
	cursor: pointer;
}

/* checkout header (zip's checkout-header.twig): logo + phone + "secure checkout" do not fit on a phone;
   the badge goes, the phone stays */
@media (max-width: 575.98px) {
	.ho-header--checkout .ho-header__secure { display: none; }
	.ho-header--checkout .ho-header__logo img { max-width: 50vw; height: auto; max-height: var(--ho-logo-h, 36px); }
}

/* the store's mini cart on kit pages: a kit's own "a { color }" must not darken its buttons */
.offcanvas a.btn-primary,
.offcanvas a.btn-primary:hover,
.offcanvas a.btn-primary:focus {
	color: var(--ho-on-primary, #fff);
}

/* checkout: amounts turn into grey pulsing boxes while the totals are recalculated (kits without their own rule) */
[data-ho-pk-block="totals"].is-updating .ho-summary__value { color: transparent; border-radius: 4px; background: var(--ho-border, #e5e7eb); animation: ho-pk-pulse .8s ease-in-out infinite alternate; }
@keyframes ho-pk-pulse { to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { [data-ho-pk-block="totals"].is-updating .ho-summary__value { animation: none; } }

/* cart "You may also like": as wide as the cart rows above it (the export caps it at 922px) */
.ho-cart__more [data-m="ymal"] { max-width: none !important; }

/* Builder rows of a field and a button (thank-you "save your details", ...): top-aligned, so with the label
   above the field (--ho-input-float: 0) the button sat a label higher than the input. Bottom-aligned with the
   field instead (on its own line when the row wraps, nothing changes). */
:is(form, div)[style*="flex-wrap:wrap"][style*="align-items:flex-start"]:has(> .ho-field, > * > .ho-field) > .ho-btn {
  align-self: flex-end;
}

/* The builder's header keeps room for a scrollbar on every page (scrollbar-gutter: stable): on a page that does
   not scroll it shows as an empty strip on the right. */
html:root { scrollbar-gutter: auto; }

/* The store's terms / privacy text in the design: its headings are the contents list's anchors, clear of a sticky header */
.ho-prose :is(h2, h3)[id] { scroll-margin-top: 112px; }

/* A policy page (terms, privacy, ...) in the kit's modal: wider, its text scrolls inside */
.ho-pk-policy .ho-modal__dialog { display: flex; flex-direction: column; max-width: 760px !important; max-height: min(86vh, 900px); text-align: left; }
.ho-pk-policy .ho-pk-policy__text { flex: 1 1 auto; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; }
.ho-pk-policy .ho-pk-policy__text :is(h2, h3) { margin: 1.4em 0 .5em; font-size: 1.05rem; }
.ho-pk-policy .ho-pk-policy__text > :first-child { margin-top: 0; }
.ho-pk-policy__loading { height: 120px; margin: 0; border-radius: 12px; background: linear-gradient(90deg, rgba(0,0,0,.04), rgba(0,0,0,.08), rgba(0,0,0,.04)); background-size: 200% 100%; animation: ho-pk-shimmer 1.2s linear infinite; }
@keyframes ho-pk-shimmer { to { background-position: -200% 0; } }
/* long text: an opaque card (the kit's glass dialog lets the page show through), tighter rhythm, aligned with the title */
.ho-pk-policy .ho-modal__dialog { background: var(--ho-bg, #FFFFFF) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.ho-pk-policy .ho-pk-policy__text { margin: 0; padding-left: 0; padding-top: 0; }
.ho-pk-policy .ho-pk-policy__text p { margin: 0 0 .75em; }
.ho-pk-policy .ho-pk-policy__text :is(h2, h3) { margin: 1.2em 0 .4em; }
.ho-pk-policy .ho-modal__title { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--ho-border, #E4E5EB); }

/* fields with a show-password button: the error / valid icon sits left of the eye, not under it */
.ho-field:has(> button:not(.ho-field__clear)) > .ho-field__input { background-position: right 52px center !important; }
.ho-field--error:has(> button:not(.ho-field__clear)) > .ho-field__input,
.ho-field--valid:has(> button:not(.ho-field__clear)) > .ho-field__input,
.ho-field[data-err="1"]:has(> button:not(.ho-field__clear)) > .ho-field__input,
.ho-field:has(> button:not(.ho-field__clear)) > .ho-field__input[aria-invalid="true"] { padding-right: 84px !important; }

/* the store's reCAPTCHA inside the design's own captcha box: the box spaces it */
.ho-captcha > .ho-recaptcha { margin: 0 !important; }

/* receipt / invoice: the tax details under the kit's choice (extension/module/ho_invoice) */
.ho-invoice { margin: 14px 0 6px; }
.ho-invoice[hidden] { display: none !important; }
.ho-invoice__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ho-invoice__cell--wide { grid-column: 1 / -1; }
@media (max-width: 575.98px) { .ho-invoice__grid { grid-template-columns: minmax(0, 1fr); } }
