/*
 * What the new cart and checkout need on top of the theme's cart.css / checkout.css and WooCommerce Blocks' CSS:
 * WordPress core block bits of the empty cart, Stripe's elements in the payment boxes, the "processing" state,
 * the notices, and the Apple Pay / Google Pay buttons on the product page.
 */

/* WooCommerce's classes set display on some of these; the hidden attribute must win. */
#wtp-cart [hidden], #wtp-checkout [hidden], .wtp-express-checkout[hidden] { display: none !important; }

/* Empty cart: core heading / separator styles (wp-block-library) */
#wtp-cart .has-text-align-center { text-align: center; }
#wtp-cart .wp-block-separator.is-style-dots { background: none !important; border: none !important; height: auto; line-height: 1; text-align: center; margin: 2em auto; }
#wtp-cart .wp-block-separator.is-style-dots:before { color: currentColor; content: "\00b7 \00b7 \00b7"; font-family: serif; font-size: 1.5em; letter-spacing: 2em; padding-left: 2em; }
#wtp-cart.is-loading { min-height: 320px; }
#wtp-cart .wc-block-components-notices:empty { display: none; }
#wtp-cart .wc-block-cart-items__row { transition: opacity .2s; }
#wtp-cart .wc-block-components-validation-error p { color: #cc1818; font-size: .875em; margin: 8px 0 0; }

/* Checkout: notices as WooCommerce's (the theme has no styles for them) */
#wtp-checkout .woocommerce-error,
#wtp-checkout .woocommerce-message,
#wtp-checkout .woocommerce-info { list-style: none; margin: 0 0 20px; padding: 12px 16px; border-radius: 8px; background: var(--light-yellow, #FDF6EC); }
#wtp-checkout .woocommerce-error { background: #fdecec; color: #8a1f11; }
#wtp-checkout .woocommerce-error li { margin: 0; padding: 2px 0; }
#wtp-checkout .woocommerce-message { background: #edf7ee; }
#wtp-checkout .woocommerce-notices-wrapper:empty { display: none; }
#wtp-checkout .woocommerce-invalid input.input-text { border-color: #e2401c; }
#wtp-checkout .cart-discount a.woocommerce-remove-coupon { color: var(--grey, #6b6170); font-size: .9em; }

/* Payment boxes: Stripe's card form and the wallet buttons */
#wtp-checkout .payment_box { padding: 12px 0 4px; }
#wtp-checkout #wc-stripe-card-element { min-height: 120px; }
#wtp-checkout #wc-stripe-applepay-container,
#wtp-checkout #wc-stripe-googlepay-container { max-width: 400px; }
#wtp-checkout form.checkout.processing { opacity: .6; pointer-events: none; transition: opacity .2s; }
#wtp-checkout button#place_order:disabled { cursor: progress; }

/* Product page: Apple Pay / Google Pay under "Add to Cart" */
.wtp-express-checkout { width: 100%; margin-top: 10px; }
.wtp-express-checkout__error .woocommerce-error { list-style: none; margin: 10px 0 0; padding: 10px 14px; border-radius: 8px; background: #fdecec; color: #8a1f11; font-size: 14px; }

/* Thank-you page (templates/order-received.php): banner with "Download all", the files as a checklist, then the
   ZIP help and the order folded away (variant D, chosen by Jacob 2-12-2026). Buttons: dark text on --pink (7:1). */
.wtp-ty { max-width: 820px; margin: 8px auto 40px; display: flex; flex-direction: column; gap: 20px; }
.wtp-ty .woocommerce-notice { margin: 0; }
.wtp-ty-hero { position: relative; overflow: hidden; background: var(--light-pink, #FBE3EC); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.wtp-ty-hero > :not(.wtp-ty-confetti) { position: relative; }
/* Confetti: when the page opens, small pieces fall through the whole banner twice, each at its own speed, and are
   gone after ~15 s (top runs from above the banner to below it; overflow hides them there). With reduced motion
   they rest still at their --y. Duration and delay per piece are in the template. */
.wtp-ty-confetti { position: absolute; inset: 0; pointer-events: none; }
.wtp-ty-confetti i { position: absolute; top: -8%; width: 8px; height: 14px; border-radius: 2px; opacity: .8; transform: rotate(var(--r, 0deg));
	animation-name: wtp-ty-fall; animation-timing-function: linear; animation-iteration-count: 2; animation-fill-mode: both; }
.wtp-ty-confetti i.is-round { width: 10px; height: 10px; border-radius: 50%; }
@keyframes wtp-ty-fall {
	0% { top: -8%; transform: translateX(0) rotate(var(--r, 0deg)); }
	50% { transform: translateX(var(--s, 12px)) rotate(calc(var(--r, 0deg) + 180deg)); }
	100% { top: 108%; transform: translateX(0) rotate(calc(var(--r, 0deg) + 360deg)); }
}
@media (prefers-reduced-motion: reduce) { .wtp-ty-confetti i { animation: none; top: var(--y); } }
.wtp-ty-thanks { display: flex; align-items: center; gap: 14px; margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
.wtp-ty-check { width: 44px; height: 44px; border-radius: 50%; background: var(--black, #130122); color: var(--yellow, #FDF6EC); display: flex; align-items: center; justify-content: center; flex: none; }
.wtp-ty-hero h1 { margin: 0; color: var(--black, #130122); text-transform: none; font-weight: 800; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.1; }
.wtp-ty-all, .wtp-ty-all:hover, .wtp-ty-all:active { transform: none; }
.wtp-ty-all { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 60px; padding: 10px 24px; border-radius: 999px; background: var(--black, #130122); color: var(--yellow, #FDF6EC); font: 700 17px/1.3 "Inter", sans-serif; }
.wtp-ty-all[hidden] { display: none; }
.wtp-ty-all span { font-weight: 500; }
.wtp-ty-all:hover { background: #2c1a3a; }
.wtp-ty-sub { margin: 0; font-size: 14px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.wtp-ty-sub.wtp-order-pending { text-align: left; background: #fff; }

.wtp-ty-files { background: #fff; border-radius: 20px; border: 1px solid #F1E4D3; padding: 8px 20px 12px; }
.wtp-ty-files-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 0 10px; }
.wtp-ty-files-head h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 800; }
.wtp-ty-count { font-size: 13px; color: #5F5566; }
.wtp-ty-bar { height: 6px; border-radius: 3px; background: #F1E4D3; overflow: hidden; margin-bottom: 6px; }
.wtp-ty-bar span { display: block; height: 100%; width: 0; background: var(--pink, #ED71A1); border-radius: 3px; transition: width .3s ease-out; }
.wtp-ty-list { list-style: none; margin: 0; padding: 0; }
.wtp-ty-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 0; border-top: 1px solid #F1E4D3; margin: 0; }
.wtp-ty-swatch { width: 44px; height: 52px; border-radius: 8px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; box-sizing: border-box; font-size: 10px; font-weight: 800; letter-spacing: .06em; line-height: 1; flex: none; }
.wtp-ty-name { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.4; }
.wtp-ty-name strong { font-size: 15px; overflow-wrap: anywhere; }
.wtp-ty-name span { font-size: 13px; color: #5F5566; }
.wtp-ty-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 150px; padding: 0 18px; box-sizing: border-box; border-radius: 999px; background: var(--pink, #ED71A1); border: 1.5px solid var(--pink, #ED71A1); color: var(--black, #130122); font-weight: 700; font-size: 14px; line-height: 1.2; text-decoration: none; transition: background .2s; }
.wtp-ty-btn:hover { background: #F28DB4; }
.wtp-ty-btn > span { display: inline-flex; align-items: center; gap: 8px; }
.wtp-ty-btn-done { display: none !important; }
.wtp-ty-file.is-done .wtp-ty-btn { background: #E8F4F4; border-color: var(--green, #B3DBDB); font-weight: 600; }
.wtp-ty-file.is-done .wtp-ty-btn-get { display: none !important; }
.wtp-ty-file.is-done .wtp-ty-btn-done { display: inline-flex !important; }

.wtp-ty-box { background: #fff; border-radius: 16px; border: 1px solid #F1E4D3; padding: 0 20px; }
.wtp-ty-box summary { cursor: pointer; padding: 16px 0; font-weight: 700; font-size: 15px; line-height: 1.4; }
.wtp-ty-box-body { padding: 0 0 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.55; color: #5F5566; }
.wtp-ty-box-body p { margin: 0; }
.wtp-ty-box-body strong { color: var(--black, #130122); }
.wtp-ty-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--black, #130122); }
.wtp-ty-items li { display: flex; gap: 12px; align-items: center; margin: 0; }
.wtp-ty-items img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; }
.wtp-ty-item-name { flex: 1; line-height: 1.45; }
.wtp-ty-item-name a { text-decoration: none; }
.wtp-ty-item-name a:hover { text-decoration: underline; }
.wtp-ty-totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin: 4px 0 0; padding-top: 10px; border-top: 1px solid #F1E4D3; color: var(--black, #130122); }
.wtp-ty-totals dt, .wtp-ty-totals dd { margin: 0; }
.wtp-ty-totals dd { text-align: right; }
.wtp-ty-meta { overflow-wrap: anywhere; }
@media (max-width: 600px) {
	.wtp-ty-hero { padding: 22px 18px; border-radius: 20px; }
	.wtp-ty-files, .wtp-ty-box { padding-left: 16px; padding-right: 16px; }
	.wtp-ty-btn { flex: 1 1 100%; }
}
