/* Vend Gift Cards — Frontend Styles */

.woocommerce td.product-name dl.variation dd,
.woocommerce td.product-name dl.variation dt {
	margin-bottom: 0px !important;
}

/* ------------------------------------------------------------------ */
/*  Gift Card Checkout Form                                           */
/* ------------------------------------------------------------------ */

.wpr-giftcard-checkout-form {
	--wpr-gc-accent: #4a6cf7;
	--wpr-gc-radius: 6px;
	margin: 0 0 24px;
}

.wpr-giftcard-checkout-form .wpr-gc-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: #1a1a2e;
}

.wpr-giftcard-checkout-form .checkout_giftcard {
	display: flex;
	gap: 10px;
	align-items: stretch;
	flex-wrap: wrap;
}

.wpr-giftcard-checkout-form .checkout_giftcard .wpr-gc-input-wrap {
	flex: 1 1 200px;
	min-width: 0;
}

.wpr-giftcard-checkout-form .checkout_giftcard .wpr-gc-input-wrap input[type="text"] {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	margin: 0;
	font-size: 14px;
	line-height: 44px;
	color: #333;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: var(--wpr-gc-radius);
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.wpr-giftcard-checkout-form .checkout_giftcard .wpr-gc-input-wrap input[type="text"]:focus {
	border-color: var(--wpr-gc-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wpr-gc-accent) 15%, transparent);
}

.wpr-giftcard-checkout-form .checkout_giftcard .wpr-gc-btn-wrap {
	flex: 0 0 auto;
}

.wpr-giftcard-checkout-form .wpr-gc-btn-wrap button,
.wpr-giftcard-checkout-form .wpr-gc-btn-wrap input[type="submit"] {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	height: 44px !important;
	padding: 0 24px !important;
	margin: 0 !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	color: #fff !important;
	background: var(--wpr-gc-accent) !important;
	border: none !important;
	border-radius: var(--wpr-gc-radius) !important;
	cursor: pointer;
	transition: background 0.2s, box-shadow 0.2s;
	white-space: nowrap;
}

.wpr-giftcard-checkout-form .wpr-gc-btn-wrap button:hover,
.wpr-giftcard-checkout-form .wpr-gc-btn-wrap input[type="submit"]:hover {
	background: color-mix(in srgb, var(--wpr-gc-accent) 85%, #000) !important;
	box-shadow: 0 2px 6px color-mix(in srgb, var(--wpr-gc-accent) 30%, transparent);
}

.wpr-giftcard-checkout-form .wpr-gc-btn-wrap button:active,
.wpr-giftcard-checkout-form .wpr-gc-btn-wrap input[type="submit"]:active {
	background: color-mix(in srgb, var(--wpr-gc-accent) 75%, #000) !important;
}

/* ------------------------------------------------------------------ */
/*  Skeleton / Loading State                                           */
/* ------------------------------------------------------------------ */

@keyframes wpr-gc-shimmer {
	0%   { background-position: -400px 0; }
	100% { background-position: 400px 0; }
}

.wpr-giftcard-checkout-form.wpr-gc-loading .checkout_giftcard {
	position: relative;
	pointer-events: none;
}

.wpr-giftcard-checkout-form.wpr-gc-loading .checkout_giftcard::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--wpr-gc-radius);
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.6) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	background-color: rgba(245, 245, 245, 0.7);
	background-size: 400px 100%;
	animation: wpr-gc-shimmer 1.4s ease-in-out infinite;
	z-index: 2;
}

.wpr-giftcard-checkout-form.wpr-gc-loading .wpr-gc-input-wrap input[type="text"] {
	color: transparent !important;
}

.wpr-giftcard-checkout-form.wpr-gc-loading .wpr-gc-btn-wrap button,
.wpr-giftcard-checkout-form.wpr-gc-loading .wpr-gc-btn-wrap input[type="submit"] {
	opacity: 0.6 !important;
	cursor: default;
}

/* Hide old layout elements */
.wpr-giftcard-checkout-form .checkout_giftcard .clear,
.wpr-giftcard-checkout-form .checkout_giftcard .form-row {
	margin: 0;
	padding: 0;
}

/* Nonce field — always hidden */
.wpr-giftcard-checkout-form .checkout_giftcard .wpr-gc-nonce {
	display: none;
}

/* ------------------------------------------------------------------ */
/*  Cart Form (inline with coupon row)                                */
/* ------------------------------------------------------------------ */

.wpr-giftcard-cart-form {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.wpr-giftcard-cart-form input[type="text"] {
	height: 38px;
	padding: 0 12px;
	font-size: 14px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	outline: none;
	transition: border-color 0.2s;
}

.wpr-giftcard-cart-form input[type="text"]:focus {
	border-color: var(--wpr-gc-accent, #4a6cf7);
}

.wpr-giftcard-cart-form input[type="submit"] {
	height: 38px;
	padding: 0 16px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: var(--wpr-gc-accent, #4a6cf7);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}

.wpr-giftcard-cart-form input[type="submit"]:hover {
	background: color-mix(in srgb, var(--wpr-gc-accent, #4a6cf7) 85%, #000);
}

/* ------------------------------------------------------------------ */
/*  Responsive                                                        */
/* ------------------------------------------------------------------ */

@media (max-width: 480px) {
	.wpr-giftcard-checkout-form .checkout_giftcard {
		flex-direction: column;
	}

	.wpr-giftcard-checkout-form .checkout_giftcard .wpr-gc-btn-wrap button,
	.wpr-giftcard-checkout-form .checkout_giftcard .wpr-gc-btn-wrap input[type="submit"] {
		width: 100%;
	}
}
