/**
 * Gift card form - The Watering Can brand styling.
 *
 * Scoped to .woocommerce_gc_giftcard_form so the whole gift card form (the
 * plugin's To / From / Message / Delivery fields plus our Delivery-method
 * control and phone field) shares one cohesive, on-brand look. !important is
 * used on the input visuals because Avada styles form inputs aggressively.
 */
.woocommerce_gc_giftcard_form {
	--twc-indigo: #2b3e59;
	--twc-camel: #b1955d;
	--twc-bg: #faf7f2;
	--twc-ink: #1a2535;
	--twc-white: #ffffff;
	--twc-radius: 6px;
	--twc-font-display: "Lora", Georgia, serif;
	--twc-font-body: "Inter", sans-serif;
}

/* Field spacing. */
.woocommerce_gc_giftcard_form .wc_gc_field,
.woocommerce_gc_giftcard_form .twc-gc-delivery {
	margin-bottom: 1.25rem;
}

/* Labels (plugin fields + ours). Excludes the segmented-control pills, which
   are <label> elements with their own styling below. */
.woocommerce_gc_giftcard_form label:not(.twc-gc-segmented__option),
.woocommerce_gc_giftcard_form .twc-gc-delivery__label {
	display: block;
	margin-bottom: 0.4rem;
	font-family: var(--twc-font-display);
	font-size: 16px;
	color: var(--twc-indigo);
}

.woocommerce_gc_giftcard_form .required {
	color: var(--twc-camel);
	border: 0;
	text-decoration: none;
}

/* Text inputs, textareas and the datepicker field. */
.woocommerce_gc_giftcard_form .input-text {
	width: 100%;
	padding: 0.6rem 0.75rem !important;
	font-family: var(--twc-font-body) !important;
	font-size: 16px !important;
	line-height: 1.6 !important;
	color: var(--twc-ink) !important;
	background: var(--twc-bg) !important;
	border: 1px solid var(--twc-indigo) !important;
	border-radius: var(--twc-radius) !important;
	box-shadow: none !important;
}

.woocommerce_gc_giftcard_form textarea.input-text {
	min-height: 5rem;
}

.woocommerce_gc_giftcard_form .input-text:focus {
	outline: none !important;
	border-color: var(--twc-indigo) !important;
	box-shadow: 0 0 0 2px rgba(43, 62, 89, 0.25) !important;
}

.woocommerce_gc_giftcard_form .input-text::placeholder {
	color: var(--twc-ink);
	opacity: 0.5;
}

/* Links inside the form (e.g. "Clear" on the delivery date) - camel, brand. */
.woocommerce_gc_giftcard_form a {
	color: var(--twc-camel);
	text-decoration: none;
}

.woocommerce_gc_giftcard_form a:hover {
	text-decoration: underline;
}

/* Delivery-method segmented control. */
.twc-gc-segmented {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	background: var(--twc-bg);
	border: 1px solid var(--twc-indigo);
	border-radius: var(--twc-radius);
}

.twc-gc-segmented__option {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.twc-gc-segmented__option input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.twc-gc-segmented__option span {
	display: block;
	padding: 0.5rem 1.1rem;
	font-family: var(--twc-font-body);
	font-size: 16px;
	line-height: 1.4;
	color: var(--twc-indigo);
	border-radius: 4px;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.twc-gc-segmented__option:hover span {
	background: rgba(177, 149, 93, 0.14);
}

.twc-gc-segmented__option.is-active span {
	background: var(--twc-indigo);
	color: var(--twc-white);
}

/* Keyboard focus ring (camel accent). */
.twc-gc-segmented__option input:focus-visible + span {
	outline: 2px solid var(--twc-camel);
	outline-offset: 2px;
}

/* Recipient phone field visibility + hint (input styling is shared above). */
.twc-gc-phone[hidden] {
	display: none;
}

/* Avada sets display on form rows, so the hidden attribute needs reinforcing. */
.woocommerce_gc_giftcard_form .wc_gc_field[hidden] {
	display: none !important;
}

.twc-gc-phone__hint {
	display: block;
	margin-top: 0.35rem;
	font-family: var(--twc-font-body);
	font-size: 13px;
	line-height: 1.6;
	color: var(--twc-ink);
	opacity: 0.7;
}
