/* ==========================================================================
   The gift-card page, dressed as the rest of the site.

   `inc/gift-cards.php`, section 7b. Ryan, 28 September 2026, of the page on
   Sonora: "It's ugly in lots of ways." What he was looking at was
   WooCommerce's single-product form as the vendor leaves it: the amount in a
   two-cell table, grey filled inputs at 95% width, a quantity box, a "Clear"
   link and the theme's square grey button.

   THE MEASUREMENTS ARE THE CHECKOUT'S, read off the checkout with
   getComputedStyle on bench-a, 28 September 2026, so a customer who goes from
   this form to the checkout meets the same fields and the same button:

     a text field   43px tall, 10px 12px padding, 1px #dad9dd, 3px corners,
                    16px type, no fill
     the note       120px tall
     Place order    60px tall, 30px corners, 18px type, filled with the ink
     Apply (coupon) 2px ink outline, 24px corners -- the shape the amount
                    choices take, filled with the ink once chosen

   Everything is scoped to `.oo-giftcards`, the shortcode's own wrapper, and
   carries that class plus the element it styles, which is (0,2,0) or more:
   GeneratePress styles bare controls at (0,1,1) and the vendor's inline block
   at (0,1,0), and neither may win here.
   ========================================================================== */

.oo-giftcards {
	--oo-gc-field-line: #dad9dd;
	--oo-gc-field-radius: 3px;
	--oo-gc-field-height: 43px;
	--oo-gc-gap: var(--oo-s5, 20px);
	max-width: 36rem;
	color: var(--oo-ink, #16181c);
}

/* The rule, said first, and the closed-page sentence. The glyph's column is
   `.oo-notice--glyphline` in `notices.css`. */
.oo-giftcards .oo-giftcards__rule,
.oo-giftcards .oo-giftcards__closed {
	margin: 0 0 var(--oo-gc-gap);
	line-height: 1.5;
}

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

/* The vendor's select stays in the form for WooCommerce's variation script
   (`assets/giftcards.js` sets it); the choices above it are what a person
   presses. */
.oo-giftcards table.variations,
.oo-giftcards .reset_variations {
	display: none;
}

.oo-giftcards .oo-giftcard-amounts {
	margin: 0 0 var(--oo-gc-gap);
	padding: 0;
	border: 0;
	min-width: 0;
}

.oo-giftcards .oo-giftcard-amounts__legend,
.oo-giftcards .pwgc-label {
	display: block;
	margin: 0 0 var(--oo-s2, 8px);
	padding: 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--oo-ink, #16181c);
}

.oo-giftcards .oo-giftcard-amounts__row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--oo-s2, 8px);
}

.oo-giftcards .oo-giftcard-amount {
	position: relative;
	margin: 0;
	cursor: pointer;
}

/* The radio is the control and stays in the accessibility tree; it is only
   drawn by the pill beside it. */
.oo-giftcards .oo-giftcard-amount input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.oo-giftcards .oo-giftcard-amount span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 5.5rem;
	min-height: 48px;
	padding: 0 var(--oo-s5, 20px);
	border: 2px solid var(--oo-action, var(--oo-ink, #16181c));
	border-radius: 24px;
	background: transparent;
	color: var(--oo-action, var(--oo-ink, #16181c));
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
}

.oo-giftcards .oo-giftcard-amount input:checked + span {
	background: var(--oo-action, var(--oo-ink, #16181c));
	color: var(--oo-ground, #fff);
}

.oo-giftcards .oo-giftcard-amount input:focus-visible + span {
	outline: 2px solid var(--oo-focus-ring, #16181c);
	outline-offset: 2px;
}

/* ----------------------------------------------------------------- fields */

.oo-giftcards .woocommerce-variation-add-to-cart {
	display: block;
}

.oo-giftcards .pwgc-field-container {
	margin: 0 0 var(--oo-gc-gap);
}

.oo-giftcards .pwgc-input-text,
.oo-giftcards input.pwgc-input-text,
.oo-giftcards textarea#pwgc-message {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: var(--oo-gc-field-height);
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--oo-gc-field-line);
	border-radius: var(--oo-gc-field-radius);
	background: var(--oo-ground, #fff);
	color: var(--oo-ink, #16181c);
	font: inherit;
	font-size: 16px;
	line-height: 1.3;
}

.oo-giftcards textarea#pwgc-message {
	height: 120px;
	resize: vertical;
}

.oo-giftcards .pwgc-input-text::placeholder,
.oo-giftcards textarea#pwgc-message::placeholder {
	color: var(--oo-muted, #565c66);
}

.oo-giftcards .pwgc-input-text:focus-visible,
.oo-giftcards textarea#pwgc-message:focus-visible {
	outline: 2px solid var(--oo-focus-ring, #16181c);
	outline-offset: -1px;
}

/* The help under its field: a line of its own, in the page's muted ink, at a
   size a phone can read (the vendor's 11px is not). */
.oo-giftcards .pwgc-subtitle {
	display: block;
	margin: var(--oo-s1, 4px) 0 0;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--oo-muted, #565c66);
}

/* One card per recipient: the vendor counts the addresses, so no box. */
.oo-giftcards .quantity:not(:has(input[type=number])) {
	display: none;
}

/* ----------------------------------------------------------------- button */

.oo-giftcards form.cart .single_add_to_cart_button.button,
.oo-giftcards form.cart button.single_add_to_cart_button {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 60px;
	margin: var(--oo-s2, 8px) 0 0;
	padding: 0 var(--oo-s6, 24px);
	border: 2px solid var(--oo-action, var(--oo-ink, #16181c));
	border-radius: 30px;
	background: var(--oo-action, var(--oo-ink, #16181c));
	color: var(--oo-ground, #fff);
	font-size: 18px;
	font-weight: 400;
	line-height: 56px;
	text-align: center;
	cursor: pointer;
	opacity: 1;
}

.oo-giftcards form.cart .single_add_to_cart_button.button:hover,
.oo-giftcards form.cart .single_add_to_cart_button.button:focus {
	background: var(--oo-action, var(--oo-ink, #16181c));
	color: var(--oo-ground, #fff);
	opacity: .88;
}

.oo-giftcards form.cart .single_add_to_cart_button.button:focus-visible {
	outline: 2px solid var(--oo-focus-ring, #16181c);
	outline-offset: 2px;
}

/* WooCommerce greys the button until a variation is found; with an amount
   chosen from the start that is only ever the first frame. */
.oo-giftcards form.cart .single_add_to_cart_button.button.disabled {
	opacity: .5;
}
