/*
 * Zamarla — presentation adjustments for Side Cart (XootiX) and Finale.
 * Loaded only when one of those plugins is active. Selectors follow the
 * plugins' public markup and must be checked against the installed version.
 * Author: Dirigible WS — https://dirigiblews.com/
 */

/* Side Cart (2.8.3) — spec 01 §6b. Colours, sizes and texts come from the
 * plugin's own settings; this only covers what the free version cannot set.
 * Panel motion: transform + opacity only (no layout animation); the closed
 * panel is hidden so it cannot take focus. */
body .xoo-wsc-modal .xoo-wsc-container {
	right: 0;
	width: min(440px, 100%);
	max-width: none;
	font-family: var(--zm-sans);
	transform: translateX(100%);
	visibility: hidden;
	transition: transform 320ms var(--zm-ease), visibility 0s linear 320ms;
}
body.xoo-wsc-cart-active .xoo-wsc-modal .xoo-wsc-container {
	transform: none;
	visibility: visible;
	transition: transform 320ms var(--zm-ease), visibility 0s;
}
body .xoo-wsc-opac,
body.xoo-wsc-cart-active .xoo-wsc-opac { background: var(--zm-charcoal); }
body.xoo-wsc-cart-active .xoo-wsc-opac { opacity: .4; transition: height 0s, opacity 200ms ease; }

/* Header: serif title; the add-to-cart notice sits under it, never over the close control. */
.xoo-wsc-modal .xoo-wsch-text { font: 400 24px/1.2 var(--zm-serif); }
.xoo-wsc-modal .xoo-wsch-top { flex-wrap: wrap; }
.xoo-wsc-modal .xoo-wsc-notice-container { position: static; order: 3; flex: 1 0 100%; margin: 10px 14px 4px 0; }
.xoo-wsc-modal .xoo-wsc-notices li { font: 500 14px/1.45 var(--zm-sans); border-radius: var(--zm-radius); }
.xoo-wsc-modal .xoo-wsch-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--zm-radius);
	cursor: pointer;
}

/* Product rows */
.xoo-wsc-modal .xoo-wsc-product { border-bottom: 1px solid var(--zm-divider); }
.xoo-wsc-modal .xoo-wsc-img-col img { aspect-ratio: 1 / 1; object-fit: cover; background: var(--zm-placeholder); }
.xoo-wsc-modal .xoo-wsc-pname a { font: 600 15px/1.35 var(--zm-sans); color: var(--zm-charcoal); text-decoration: none; }
.xoo-wsc-modal .xoo-wsc-pname a:hover { text-decoration: underline; text-underline-offset: 3px; }
.xoo-wsc-modal dl.variation,
.xoo-wsc-modal .xoo-wsc-pprice { font: 400 13px/1.5 var(--zm-sans); font-style: normal; color: var(--zm-muted); }
.xoo-wsc-modal dl.variation dt,
.xoo-wsc-modal dl.variation dd,
.xoo-wsc-modal dl.variation p { display: inline; margin: 0; font-style: normal; }
.xoo-wsc-modal .xoo-wsc-pprice del { color: var(--zm-faint); }
.xoo-wsc-modal .xoo-wsc-pprice ins { text-decoration: none; color: var(--zm-charcoal); }
.xoo-wsc-modal .xoo-wsc-qty-box { margin-top: 8px; overflow: hidden; }
.xoo-wsc-modal .xoo-wsc-chng { display: inline-flex; align-items: center; justify-content: center; width: 40px; cursor: pointer; font-size: 18px; }
.xoo-wsc-modal .xoo-wsc-qty { font: 600 15px var(--zm-sans); }
.xoo-wsc-modal .xoo-wsc-smr-ptotal { font: 500 14px var(--zm-sans); color: var(--zm-charcoal); }
.xoo-wsc-modal .xoo-wsc-smr-del.xoo-wsc-del-txt {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font: 400 13px var(--zm-sans);
	text-transform: none;
	letter-spacing: 0;
	color: var(--zm-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Footer: subtotal row, shipping note, primary / secondary / link hierarchy. */
.xoo-wsc-modal .xoo-wsc-footer { border-top: 1px solid var(--zm-divider); }
.xoo-wsc-modal .xoo-wsc-ft-amt { display: flex; justify-content: space-between; gap: 16px; font: 600 16px var(--zm-sans); }
.xoo-wsc-modal .xoo-wsc-footer-txt { display: block; margin: 6px 0 14px; text-align: left; font: 400 13px/1.5 var(--zm-sans); color: var(--zm-muted); }
.xoo-wsc-modal .xoo-wsc-ft-buttons-cont { gap: 12px; }
.xoo-wsc-modal a.xoo-wsc-ft-btn { font-family: var(--zm-sans); transition: background-color 200ms ease, color 200ms ease; }
.xoo-wsc-modal a.xoo-wsc-ft-btn.xoo-wsc-ft-btn-continue {
	justify-self: center;
	width: auto;
	height: auto;
	min-height: 44px;
	padding: 0 8px;
	border: 0;
	background: transparent;
	font: 600 13px var(--zm-sans);
	text-decoration: underline;
	text-underline-offset: 4px;
}
.xoo-wsc-modal a.xoo-wsc-ft-btn.xoo-wsc-ft-btn-continue:hover { background: transparent; color: var(--zm-charcoal); }

/* Empty cart */
.xoo-wsc-modal .xoo-wsc-empty-cart { padding: 40px 24px 24px; align-items: flex-start; text-align: left; gap: 20px; }
.xoo-wsc-modal .xoo-wsc-emp-txt { font: 400 30px/1.1 var(--zm-serif); }

/* Visible focus inside the panel */
.xoo-wsc-modal :is(a, input, [role="button"]):focus-visible { outline: 2px solid var(--zm-charcoal); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
	body .xoo-wsc-modal .xoo-wsc-container,
	body.xoo-wsc-cart-active .xoo-wsc-modal .xoo-wsc-container,
	body.xoo-wsc-cart-active .xoo-wsc-opac,
	.xoo-wsc-modal a.xoo-wsc-ft-btn { transition: none; }
}

/* Finale countdown on the product page */
.zm-has-finale .wcct_countdown_timer,
.zm-has-finale .wcct_counter_bar { margin: 0; font-family: var(--zm-sans); }
.zm-has-finale .wcct_countdown_timer .wcct_wrap_border { border-radius: var(--zm-radius); }
