/*
 * v1.186.0: the basket and checkout, in the site's own voice.
 * Loaded only on those two pages, after assets/css/dreamweave.css.
 * Everything here is scoped to body.dw-checkout so nothing else is touched.
 */

/* ---------------------------------------------------- express buttons */

/*
 * Express buttons arrive from each gateway in its own brand colour, stacked full width.
 * Two at most, side by side, in a quieter frame. The gateways themselves are switched
 * off in Appearance → Checkout; this calms what is left.
 */
body.dw-checkout .wc-block-checkout__express-payment,
body.dw-checkout .wc-block-cart__express-payment {
	background: transparent;
	border: 1px solid var(--dw-line);
	border-radius: var(--dw-radius);
	padding: 1.1rem 1.1rem .9rem;
	margin-bottom: 1.4rem;
}

body.dw-checkout .wc-block-components-express-payment__event-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
}

body.dw-checkout .wc-block-components-express-payment__event-buttons > li {
	flex: 1 1 14rem;
	margin: 0;
}

body.dw-checkout .wc-block-components-express-payment__title-container::before,
body.dw-checkout .wc-block-components-express-payment__title-container::after {
	border-color: var(--dw-line);
}

body.dw-checkout .wc-block-components-express-payment__title,
body.dw-checkout .wc-block-components-checkout-step__description {
	color: var(--dw-muted);
	font-family: var(--dw-sans);
	letter-spacing: .04em;
}

/* --------------------------------------------------- the shorter form */

/*
 * Belt and braces for the address fields. The PHP already marks these not required,
 * so hiding them here cannot block the Place Order button.
 */
body.dw-checkout--digital .wc-block-components-address-form .wc-block-components-address-form__company,
body.dw-checkout--digital .wc-block-components-address-form .wc-block-components-address-form__address_1,
body.dw-checkout--digital .wc-block-components-address-form .wc-block-components-address-form__address_2,
body.dw-checkout--digital .wc-block-components-address-form .wc-block-components-address-form__city,
body.dw-checkout--digital .wc-block-components-address-form .wc-block-components-address-form__state,
body.dw-checkout--digital .wc-block-components-address-form .wc-block-components-address-form__phone {
	display: none;
}

body.dw-checkout--digital.dw-checkout--postcode .wc-block-components-address-form .wc-block-components-address-form__postcode {
	display: block;
}

body.dw-checkout--digital:not(.dw-checkout--postcode) .wc-block-components-address-form .wc-block-components-address-form__postcode {
	display: none;
}

/* No "add a note to your order" on a download. */
body.dw-checkout--digital .wc-block-checkout__add-note {
	display: none;
}

/* The floating label sat on top of the value instead of above it. */
body.dw-checkout .wc-block-components-text-input label {
	background: var(--dw-night);
	padding: 0 .35em;
}

body.dw-checkout .wc-block-components-text-input.is-active label {
	transform: translateY(-1.1em) scale(.82);
}

/* ------------------------------------------------- the order summary */

/* One price per line. The per-unit price repeats the line total when there is only one. */
body.dw-checkout .dw-one-of .wc-block-components-order-summary-item__individual-prices,
body.dw-checkout .dw-one-of .wc-block-cart-item__prices {
	display: none;
}

body.dw-checkout .wc-block-components-order-summary-item__image img {
	border-radius: 10px;
	background: var(--dw-deep);
}

/* ------------------------------------------------ what happens next */

.dw-checkout-reassure {
	margin: 1rem 0 0;
	padding: .9rem 1rem;
	border: 1px solid var(--dw-line);
	border-radius: 12px;
	background: rgba(217, 185, 138, .06);
	color: var(--dw-text);
	font-family: var(--dw-sans);
	font-size: .9rem;
	line-height: 1.55;
}

.dw-checkout-reassure p {
	margin: 0;
}

table .dw-checkout-reassure td {
	border: 0;
}

@media (max-width: 640px) {
	body.dw-checkout .wc-block-components-express-payment__event-buttons > li {
		flex: 1 1 100%;
	}
}

/* ------------------------------------------- folded lists ("more" buttons) */

/*
 * Nothing is removed: the extra express buttons and payment options sit behind a button
 * and open underneath it. Without JavaScript the fold never happens and every option
 * shows, which is the safe way round for a payment screen.
 */
.dw-folded {
	display: none !important;
}

.dw-fold-toggle {
	list-style: none;
	margin: .5rem 0 0;
	padding: 0;
	flex: 1 1 100%;
	order: 99;
}

.dw-fold-button {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	width: 100%;
	justify-content: center;
	padding: .7rem 1rem;
	border: 1px dashed var(--dw-line-strong);
	border-radius: 12px;
	background: transparent;
	color: var(--dw-gold);
	font-family: var(--dw-sans);
	font-size: .88rem;
	letter-spacing: .03em;
	cursor: pointer;
	transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.dw-fold-button::after {
	content: "\203A";
	transform: rotate(90deg);
	font-size: 1.1em;
	line-height: 1;
	transition: transform .2s ease;
}

.dw-fold-button[aria-expanded="true"]::after {
	transform: rotate(-90deg);
}

.dw-fold-button:hover,
.dw-fold-button:focus-visible {
	border-color: var(--dw-gold);
	color: var(--dw-gold-light);
	background: rgba(217, 185, 138, .07);
}

.dw-fold-toggle--payment {
	margin: .25rem 0 .5rem;
}

/* ------------------------------------------------- added to your basket */

.dw-added {
	border: 1px solid var(--dw-line);
	border-radius: var(--dw-radius);
	background: var(--dw-deep);
	padding: 1rem 1.1rem;
	margin: 0 0 1.5rem;
	font-family: var(--dw-sans);
}

.dw-added__line {
	margin: 0 0 .75rem;
	color: var(--dw-text);
	font-size: .95rem;
}

.dw-added__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	margin: 0;
}

.dw-added__go,
.dw-added__stay {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .65rem 1.3rem;
	border-radius: 999px;
	font-size: .9rem;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
}

.dw-added__go {
	background: var(--dw-gold);
	color: var(--dw-night);
	font-weight: 700;
}

.dw-added__go:hover,
.dw-added__go:focus-visible {
	background: var(--dw-gold-light);
	color: var(--dw-night);
}

.dw-added__stay {
	background: transparent;
	border-color: var(--dw-line-strong);
	color: var(--dw-text);
	font-family: inherit;
}

.dw-added__stay:hover,
.dw-added__stay:focus-visible {
	border-color: var(--dw-gold);
	color: var(--dw-cream);
}

/* The AJAX version, for adds from a shop listing. */
.dw-added--float {
	position: fixed;
	z-index: 9999;
	right: 1.25rem;
	bottom: 1.25rem;
	max-width: 22rem;
	margin: 0;
	box-shadow: 0 18px 40px rgba(1, 15, 42, .55);
	animation: dw-added-in .25s ease-out both;
}

@keyframes dw-added-in {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.dw-added--float { animation: none; }
	.dw-fold-button, .dw-fold-button::after { transition: none; }
}

@media (max-width: 640px) {
	.dw-added--float {
		right: .75rem;
		left: .75rem;
		bottom: .75rem;
		max-width: none;
	}
	.dw-added__actions > * { flex: 1 1 100%; }
}

/* The panel supplies its own frame; WooCommerce's notice box around it is doubled up. */
.woocommerce-message:has(.dw-added),
.wc-block-components-notice-banner:has(.dw-added) {
	background: none;
	border: 0;
	box-shadow: none;
	padding: 0;
	margin: 0 0 1.5rem;
}

.woocommerce-message:has(.dw-added)::before,
.wc-block-components-notice-banner:has(.dw-added) > svg {
	display: none;
}

/* A wallet switched off in Appearance → Checkout. Hidden here; Stripe still loads it,
   so untick it in Stripe's own express checkout settings to stop that too. */
.dw-express-off {
	display: none !important;
}

/* ------------------------------------- the only way to pay */

/* One option left: the radio chooses nothing, so only the card form is shown. The input
   stays in the page, hidden from view but still checked and still reachable by keyboard. */
.dw-single-payment .wc-block-components-radio-control__input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.dw-single-payment .wc-block-components-radio-control__option > .wc-block-components-radio-control__label,
.dw-single-payment .wc-block-components-radio-control-accordion-option > .wc-block-components-radio-control__option {
	display: none;
}

.dw-single-payment .wc-block-components-radio-control-accordion-content {
	padding-top: 0;
}
