/* Amazon Pay Pro Checkout Style */
:root { --apcs-accent: #5e7f62; }

/* =========================================================
   1. EXPRESS CHECKOUT CARD
   ========================================================= */
.woocommerce .apcs-card,
.apcs-card {
	position: relative;
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px 28px;
	margin: 0 0 22px !important;
	padding: 24px 28px 20px !important;
	background: #fff !important;
	border: 1px solid #e4e8e2 !important;
	border-radius: 14px !important;
	box-shadow: 0 1px 2px rgba(20,30,20,.04), 0 10px 28px rgba(20,30,20,.07) !important;
	color: #1f2a1f !important;
	text-align: left !important;
	font-size: 15px;
	line-height: 1.45;
	overflow: hidden;
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease;
}
.apcs-card.apcs-in { opacity: 1; transform: none; }
.apcs-card:hover { box-shadow: 0 1px 2px rgba(20,30,20,.04), 0 16px 36px rgba(20,30,20,.10) !important; }

/* Animated accent stripe on top */
.apcs-card::before {
	content: "" !important;
	display: block !important;
	position: absolute !important;
	inset: 0 0 auto 0 !important;
	height: 3px !important; width: auto !important;
	margin: 0 !important;
	background: linear-gradient(90deg, var(--apcs-accent) 0%, color-mix(in srgb, var(--apcs-accent) 45%, #fff) 50%, var(--apcs-accent) 100%) !important;
	background-size: 200% 100% !important;
	animation: apcs-stripe 4s linear infinite;
	transform: none !important;
}
.apcs-card::after, .apcs-host::before, .apcs-host::after { content: none !important; display: none !important; }

.apcs-host {
	display: contents !important;
	background: none !important; border: 0 !important;
	padding: 0 !important; margin: 0 !important; box-shadow: none !important;
}
.apcs-hidden { display: none !important; }

/* Header */
.apcs-head { display: flex; align-items: center; gap: 14px; flex: 1 1 300px; min-width: 0; }
.apcs-icon {
	position: relative;
	flex: 0 0 44px; height: 44px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 12px;
	color: var(--apcs-accent);
	background: color-mix(in srgb, var(--apcs-accent) 12%, #fff);
}
.apcs-icon::after {
	content: ""; position: absolute; inset: 0; border-radius: inherit;
	box-shadow: 0 0 0 0 color-mix(in srgb, var(--apcs-accent) 35%, transparent);
	animation: apcs-pulse 2.6s ease-out infinite;
}
.apcs-icon .apcs-shackle { transform-origin: 16px 11px; animation: apcs-lock 3.2s ease-in-out infinite; }
.apcs-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.apcs-text strong { font-size: 17px; font-weight: 700; letter-spacing: .2px; color: #16201a; }
.apcs-text span { font-size: 13.5px; color: #66706a; }

/* Amazon button */
.apcs-card .apcs-btn,
.apcs-card #pay_with_amazon {
	position: relative;
	flex: 0 0 280px;
	width: 280px !important; max-width: 100%;
	min-height: 48px;
	margin: 0 !important;
	border-radius: 8px;
	overflow: hidden;
	transition: transform .2s ease, filter .2s ease;
}
.apcs-card .apcs-btn:hover { transform: translateY(-2px); filter: drop-shadow(0 8px 14px rgba(0,0,0,.12)); }
.apcs-shine {
	position: absolute; top: 0; bottom: 0; left: -60%;
	width: 45%;
	pointer-events: none;
	background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%);
	animation: apcs-shine 3.5s ease-in-out 1.2s infinite;
	z-index: 2;
}
.apcs-card .wc-apa-button-separator { display: none !important; }

/* Badges */
.apcs-badges {
	flex: 1 1 100%;
	display: flex; flex-wrap: wrap; gap: 8px 22px;
	padding-top: 14px;
	border-top: 1px dashed #e4e8e2;
	font-size: 12.5px; color: #5c665f;
}
.apcs-badges span {
	display: inline-flex; align-items: center; gap: 6px;
	opacity: 0; transform: translateY(6px);
}
.apcs-in .apcs-badges span { animation: apcs-up .5s ease forwards; animation-delay: calc(.35s + var(--i) * .12s); }
.apcs-badges svg { color: var(--apcs-accent); }

/* =========================================================
   2. AMAZON PAY METHOD BOX (next to Place Order)
   ========================================================= */
#payment li.apcs-method {
	position: relative;
	list-style: none !important;
	margin: 0 0 14px !important;
	padding: 16px 18px !important;
	background: #fff !important;
	border: 1.5px solid #dfe4dd !important;
	border-radius: 12px !important;
	transition: border-color .3s ease, box-shadow .3s ease;
	animation: apcs-up .55s cubic-bezier(.2,.8,.2,1) both;
}
#payment li.apcs-method.apcs-active {
	border-color: var(--apcs-accent) !important;
	animation: apcs-up .55s cubic-bezier(.2,.8,.2,1) both, apcs-glow 2.8s ease-in-out .6s infinite;
}
#payment li.apcs-method > label {
	display: flex !important; align-items: center; justify-content: space-between; gap: 12px;
	margin: 0 !important;
	font-size: 15px !important; font-weight: 700 !important; color: #16201a !important;
	cursor: pointer;
}
#payment li.apcs-method > label img {
	order: 2; float: none !important;
	max-height: 26px !important; margin: 0 !important;
	padding: 4px 8px; background: #fff;
	border: 1px solid #e4e8e2; border-radius: 7px;
	transition: transform .25s ease;
}
#payment li.apcs-method:hover > label img { transform: scale(1.06); }
#payment li.apcs-method > input.input-radio { accent-color: var(--apcs-accent); }

#payment li.apcs-method .payment_box {
	margin: 12px 0 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	color: #3f4a43 !important;
	font-size: 13.5px !important;
}
#payment li.apcs-method .payment_box::before { display: none !important; content: none !important; }
#payment li.apcs-method .payment_box > p {
	display: flex !important; align-items: center; gap: 10px;
	margin: 0 !important;
	padding: 12px 14px !important;
	border-radius: 9px;
	background: color-mix(in srgb, var(--apcs-accent) 8%, #fff);
}
.apcs-shield { display: inline-flex; color: var(--apcs-accent); flex: 0 0 auto; }
.apcs-shield .apcs-draw { stroke-dasharray: 12; stroke-dashoffset: 12; animation: apcs-draw .6s ease .5s forwards; }

/* Why Amazon Pay */
.apcs-why { margin-top: 14px; }
.apcs-why-t {
	font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
	color: #7d877f; margin: 0 0 10px;
}
.apcs-why ul { list-style: none !important; margin: 0 !important; padding: 0 !important; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.apcs-why li {
	display: flex; gap: 10px; align-items: flex-start;
	margin: 0 !important; padding: 10px 12px !important;
	border: 1px solid #eef1ec; border-radius: 9px; background: #fff;
	opacity: 0; transform: translateY(6px);
	animation: apcs-up .45s ease forwards;
	animation-delay: calc(.4s + var(--i) * .1s);
	transition: border-color .2s ease, transform .2s ease;
}
.apcs-why li:hover { border-color: color-mix(in srgb, var(--apcs-accent) 40%, #fff); transform: translateY(-2px) !important; }
.apcs-why-i {
	flex: 0 0 30px; height: 30px; border-radius: 8px;
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--apcs-accent);
	background: color-mix(in srgb, var(--apcs-accent) 11%, #fff);
}
.apcs-why b { display: block; font-size: 13px; color: #16201a; line-height: 1.3; }
.apcs-why small { display: block; font-size: 12px; color: #6b746e; line-height: 1.35; margin-top: 2px; }


/* Amazon Pay logo in method label */
#payment li.apcs-method > label img.apcs-logo {
	order: 2; float: none !important;
	height: 22px !important; max-height: 22px !important; width: auto !important;
	margin: 0 0 0 auto !important; padding: 0 !important;
	background: none !important; border: 0 !important; border-radius: 0 !important;
	box-shadow: none !important;
}

/* =========================================================
   3. PRODUCT / CART PAGE BUTTON
   ========================================================= */
.apcs-or {
	display: flex !important; align-items: center; gap: 12px;
	margin: 18px 0 14px !important;
	font-size: 11.5px !important; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase;
	color: #8a938c !important; text-align: center;
}
.apcs-or::before, .apcs-or::after { content: ""; flex: 1; height: 1px; background: #e4e8e2; }

.apcs-phead, .apcs-pbtn, .apcs-pfoot {
	background: #fff;
	border: 1px solid #e4e8e2;
	box-sizing: border-box;
	max-width: 100%;
	animation: apcs-up .55s cubic-bezier(.2,.8,.2,1) both;
}
.apcs-phead {
	position: relative;
	display: flex; align-items: center; gap: 12px;
	margin: 0 !important;
	padding: 14px 16px 12px;
	border-bottom: 0;
	border-radius: 12px 12px 0 0;
	overflow: hidden;
	opacity: 0; transform: translateY(10px);
}
.apcs-phead::before {
	content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
	background: linear-gradient(90deg, var(--apcs-accent), color-mix(in srgb, var(--apcs-accent) 45%, #fff), var(--apcs-accent));
	background-size: 200% 100%;
	animation: apcs-stripe 4s linear infinite;
}
.apcs-pbolt {
	position: relative;
	flex: 0 0 34px; height: 34px; border-radius: 9px;
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--apcs-accent);
	background: color-mix(in srgb, var(--apcs-accent) 12%, #fff);
}
.apcs-pbolt::after {
	content: ""; position: absolute; inset: 0; border-radius: inherit;
	animation: apcs-pulse 2.6s ease-out infinite;
}
.apcs-ptitle { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.apcs-ptitle strong { font-size: 14.5px; color: #16201a; }
.apcs-ptitle small { font-size: 12px; color: #6b746e; }
.apcs-chip {
	margin-left: auto;
	font-size: 11px; font-weight: 700; letter-spacing: .3px; white-space: nowrap;
	padding: 4px 9px; border-radius: 999px;
	color: var(--apcs-accent);
	background: color-mix(in srgb, var(--apcs-accent) 11%, #fff);
}

.woocommerce .apcs-pbtn, .apcs-pbtn {
	position: relative;
	margin: 0 !important;
	padding: 4px 16px 10px !important;
	border-top: 0; border-bottom: 0;
	border-radius: 0;
	overflow: hidden;
	animation-delay: .08s;
	transition: background .2s ease;
}
.apcs-pbtn > :not(.apcs-shine) { transition: transform .2s ease, filter .2s ease; }
.apcs-pbtn:hover > :not(.apcs-shine) { transform: translateY(-2px); filter: drop-shadow(0 8px 12px rgba(0,0,0,.10)); }
.apcs-pbtn .apcs-shine { top: 4px; bottom: 10px; }

.apcs-pfoot {
	display: flex; flex-wrap: wrap; gap: 6px 16px;
	margin: 0 0 18px !important;
	padding: 10px 16px 13px;
	border-top: 1px dashed #e4e8e2;
	border-radius: 0 0 12px 12px;
	box-shadow: 0 10px 24px rgba(20,30,20,.06);
	font-size: 12px; color: #5c665f;
	animation-delay: .16s;
}
.apcs-pfoot span { display: inline-flex; align-items: center; gap: 5px; opacity: 0; animation: apcs-up .45s ease forwards; animation-delay: calc(.45s + var(--i) * .12s); transform: translateY(5px); }
.apcs-pfoot svg { color: var(--apcs-accent); }

/* =========================================================
   Keyframes
   ========================================================= */
@keyframes apcs-stripe { to { background-position: -200% 0; } }
@keyframes apcs-pulse {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--apcs-accent) 35%, transparent); }
	70%, 100% { box-shadow: 0 0 0 10px transparent; }
}
@keyframes apcs-lock { 0%, 80%, 100% { transform: translateY(0); } 88% { transform: translateY(-2px); } }
@keyframes apcs-shine { 0% { left: -60%; } 40%, 100% { left: 130%; } }
@keyframes apcs-up { to { opacity: 1; transform: none; } }
@keyframes apcs-draw { to { stroke-dashoffset: 0; } }
@keyframes apcs-glow {
	0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--apcs-accent) 8%, transparent); }
	50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--apcs-accent) 14%, transparent); }
}
#payment li.apcs-method { opacity: 0; transform: translateY(10px); }

/* Mobile */
@media (max-width: 640px) {
	.apcs-card { padding: 20px 18px 16px !important; }
	.apcs-card .apcs-btn, .apcs-card #pay_with_amazon { flex-basis: 100%; width: 100% !important; }
	.apcs-badges { gap: 8px 14px; }
	.apcs-why ul { grid-template-columns: 1fr; }
	.apcs-chip { display: none; }
}

/* Respect reduced-motion users */
@media (prefers-reduced-motion: reduce) {
	.apcs-card, .apcs-card *, #payment li.apcs-method, #payment li.apcs-method *,
	.apcs-phead, .apcs-phead *, .apcs-pbtn, .apcs-pbtn *, .apcs-pfoot, .apcs-pfoot * {
		animation: none !important; transition: none !important;
	}
	.apcs-card, .apcs-badges span, .apcs-why li, #payment li.apcs-method,
	.apcs-phead, .apcs-pfoot span { opacity: 1 !important; transform: none !important; }
	.apcs-shine { display: none; }
}
