/* Living Influence — gift form.
   Lives inside the white card in the Support Us hero, so every colour here
   assumes a white ground. Tokens mirror the Elementor global kit. */

/* Hello Elementor's reset.css styles bare `button`, `[type=submit]`, `input` and `a`
   at the same specificity as a single class, and loads after this file — so every
   rule below is scoped under `.li-gift` to win on specificity rather than order. */

.li-gift {
	--li-primary: #0b3d3c;
	--li-secondary: #266363;
	--li-sage: #6e9c99;
	--li-cream: #f9f4eb;
	--li-ink: #1a1a1a;
	--li-line: rgba(11, 61, 60, 0.22);
	--li-tint: rgba(110, 156, 153, 0.14);
	--li-tint-strong: rgba(110, 156, 153, 0.24);
	--li-muted: rgba(11, 61, 60, 0.62);

	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	color: var(--li-primary);
	width: 100%;
	scroll-margin-top: 120px;
}

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

.li-gift__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
}

.li-gift__title {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 150%;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--li-sage);
}

/* --- amount presets --- */

.li-gift__values {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
	gap: 10px;
}

.li-gift .li-gift__target,
.li-gift .li-gift__other {
	appearance: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 500;
	line-height: 130%;
	letter-spacing: 0.5px;
	color: var(--li-primary);
	background: #fff;
	border: 2px solid var(--li-line);
	border-radius: 8px;
	padding: 14px 12px;
	transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

/* The theme's reset.css paints every button crimson on :hover AND :focus, so each
   property it touches has to be answered here — overriding border-color alone
   leaves the crimson background behind. */
.li-gift .li-gift__target:hover,
.li-gift .li-gift__target:focus,
.li-gift .li-gift__other:hover,
.li-gift .li-gift__other:focus {
	background: var(--li-tint);
	border-color: var(--li-sage);
	color: var(--li-primary);
}

.li-gift .li-gift__target.is-selected,
.li-gift .li-gift__target.is-selected:focus {
	background: var(--li-primary);
	border-color: var(--li-primary);
	color: var(--li-cream);
}

.li-gift .li-gift__target.is-selected:hover {
	background: var(--li-secondary);
	border-color: var(--li-secondary);
	color: var(--li-cream);
}

/* "Other amount" opens a field — it is a disclosure, not a fifth amount, so it
   never fills solid the way a chosen amount does. */
.li-gift .li-gift__other {
	width: 100%;
	text-transform: none;
}

.li-gift .li-gift__other.is-selected,
.li-gift .li-gift__other.is-selected:hover,
.li-gift .li-gift__other.is-selected:focus {
	background: var(--li-tint-strong);
	border-color: var(--li-primary);
	color: var(--li-primary);
	font-weight: 600;
}

.li-gift .li-gift__target:focus-visible,
.li-gift .li-gift__other:focus-visible,
.li-gift .li-gift__submit:focus-visible,
.li-gift .li-gift__input:focus-visible {
	outline: 2px solid var(--li-sage);
	outline-offset: 2px;
}

/* --- custom amount --- */

.li-gift__custom {
	display: flex;
	align-items: stretch;
	border: 2px solid var(--li-primary);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.li-gift__custom-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--li-sage);
	margin-bottom: -6px;
}

.li-gift__custom-label[hidden] { display: none; }

.li-gift__custom[hidden] {
	display: none;
}

.li-gift__currency {
	display: flex;
	align-items: center;
	padding: 0 4px 0 16px;
	font-size: 1.125rem;
	font-weight: 500;
	color: var(--li-primary);
}

.li-gift .li-gift__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 1.125rem;
	font-weight: 500;
	color: var(--li-primary);
	padding: 14px 16px 14px 4px;
}

.li-gift .li-gift__input::placeholder {
	color: var(--li-muted);
	font-weight: 400;
}

.li-gift .li-gift__input:focus {
	outline: none;
}

/* --- helper copy --- */

.li-gift__min {
	margin: -4px 0 0;
	font-size: 0.75rem;
	line-height: 150%;
	color: var(--li-muted);
}

.li-gift__error {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 150%;
	font-weight: 500;
	color: #a4342b;
}

.li-gift__error[hidden] {
	display: none;
}

/* --- submit --- */

.li-gift .li-gift__submit {
	appearance: none;
	cursor: pointer;
	width: 100%;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 500;
	line-height: 130%;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--li-cream);
	background: var(--li-primary);
	border: 2px solid var(--li-primary);
	border-radius: 8px;
	padding: 20px 40px;
	transition: background-color 0.18s ease, border-color 0.18s ease;
}

.li-gift .li-gift__submit:hover,
.li-gift .li-gift__submit:focus {
	background: var(--li-secondary);
	border-color: var(--li-secondary);
	color: var(--li-cream);
}

.li-gift--error {
	font-size: 0.9375rem;
	color: var(--li-muted);
}

/* --- checkout step --- */

.li-gift__summary {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px 12px;
	padding-bottom: 16px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--li-line);
}

.li-gift__summary-label {
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--li-sage);
}

.li-gift__summary-amount {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 120%;
	color: var(--li-primary);
}

.li-gift__summary-amount .woocommerce-Price-amount {
	color: inherit;
}

.li-gift .li-gift__change {
	margin-left: auto;
	font-size: 0.875rem;
	color: var(--li-secondary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.li-gift .li-gift__change:hover {
	color: var(--li-primary);
}

/* Woo's classic checkout, restrained to fit inside the card. */

.li-gift__checkout .woocommerce-billing-fields > h3,
.li-gift__checkout #order_review_heading {
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--li-sage);
	margin: 0 0 12px;
}

.li-gift__checkout .form-row {
	padding: 0 0 14px;
	margin: 0;
}

.li-gift__checkout .form-row label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 500;
	margin-bottom: 6px;
	color: var(--li-primary);
}

.li-gift__checkout .input-text,
.li-gift__checkout select,
.li-gift__checkout .select2-container .select2-selection--single {
	width: 100%;
	font-family: inherit;
	font-size: 1rem;
	color: var(--li-primary);
	background: #fff;
	border: 2px solid var(--li-line);
	border-radius: 8px;
	padding: 13px 16px;
	height: auto;
	line-height: 1.3;
}

.li-gift__checkout .select2-container .select2-selection--single .select2-selection__rendered {
	padding: 0;
	line-height: 1.3;
	color: var(--li-primary);
}

.li-gift__checkout .select2-container .select2-selection--single .select2-selection__arrow {
	top: 50%;
	transform: translateY(-50%);
	right: 10px;
}

.li-gift__checkout .input-text:focus,
.li-gift__checkout select:focus {
	border-color: var(--li-primary);
	outline: none;
}

.li-gift__checkout .woocommerce-checkout-review-order-table {
	width: 100%;
	margin: 0 0 20px;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.li-gift__checkout .woocommerce-checkout-review-order-table th,
.li-gift__checkout .woocommerce-checkout-review-order-table td {
	padding: 10px 0;
	border-bottom: 1px solid var(--li-line);
	text-align: left;
}

.li-gift__checkout .woocommerce-checkout-review-order-table td:last-child,
.li-gift__checkout .woocommerce-checkout-review-order-table th:last-child {
	text-align: right;
}

.li-gift__checkout #payment {
	background: transparent;
	border-radius: 0;
}

.li-gift__checkout #payment ul.payment_methods {
	padding: 0;
	margin: 0 0 16px;
	border: 0;
	list-style: none;
}

.li-gift__checkout #payment div.form-row.place-order {
	padding: 0;
	margin: 0;
}

.li-gift__checkout #place_order {
	appearance: none;
	cursor: pointer;
	width: 100%;
	float: none;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--li-cream);
	background: var(--li-primary);
	border: 2px solid var(--li-primary);
	border-radius: 8px;
	padding: 20px 40px;
}

.li-gift__checkout #place_order:hover {
	background: var(--li-secondary);
	border-color: var(--li-secondary);
}

.li-gift__checkout .woocommerce-privacy-policy-text,
.li-gift__checkout .woocommerce-terms-and-conditions-wrapper {
	font-size: 0.75rem;
	line-height: 150%;
	color: var(--li-muted);
}

/* The narrow hero column cannot hold a checkout — give it the full row.
   A boxed Elementor container lays out its children in `.e-con-inner`, not on
   the element carrying the class, so both are targeted. `!important` is what
   beats Elementor's per-element `--flex-direction` rule, which is written with
   a three-class selector. */

body.li-gift-checkout .li-gift-hero,
body.li-gift-checkout .li-gift-hero > .e-con-inner {
	--flex-direction: column !important;
	--align-items: center !important;
	flex-direction: column !important;
	align-items: center !important;
}

body.li-gift-checkout .li-gift-slot {
	width: 100%;
	max-width: 720px;
	margin-inline: auto;
	padding: 32px;
}

@media (max-width: 767px) {
	body.li-gift-checkout .li-gift-slot {
		padding: 24px;
	}

	/* Four presets across a phone-width card leaves 3 + 1 orphan — pair them up. */
	.li-gift__values {
		grid-template-columns: repeat(2, 1fr);
	}

	.li-gift .li-gift__submit {
		padding: 18px 24px;
	}
}
