/* TikTok Style Checkout (TSC) in Emajie black and yellow (approved Cart B V6 and Checkout B V12 mockups, 17 Oct 2026).

   Loaded only on the cart, checkout and account pages, after TSC's own cart.css / checkout.css / gwp.css, so a rule
   here wins over the plugin's whenever the two have the same weight. TSC marks a few of its own rules !important
   (the grey rows, the pinned capitals); those are answered below with `body` in front plus !important.
   Nothing in the plugin is edited: remove this file and TSC looks exactly as it ships.

   Colour groups that are real TSC settings (TikTok Style Checkout > Settings > Icons): the button, the free-shipping
   strip, the discount badge and the flash label. local-setup/11-shipping-coupon-tsc.php saves the Emajie values; the
   variables below are the same colours as defaults, so the pages look right even before that has been run.
   Sections: 1 colours, 2 cart, 3 checkout (and thank-you), 4 phones, 5 account. */

/* ---------------------------------------------------------------- 1. colours */
/* TSC defines its palette on each of its own wrappers, so the Emajie values are set on the same wrappers. */
.tsc-cart,
.tsc-checkout,
.tsc-thankyou,
.tsc-order,
.tsc-orders {
	--tsc-pink: var(--k);
	--tsc-pink-soft: #FFFCE3;
	--tsc-text: var(--k);
	--tsc-text-muted: var(--grey);
	--tsc-text-light: #B4B1A8;
	--tsc-bg: var(--bone);
	--tsc-border: var(--line);
	font-family: var(--sans);
}

/* Read with a fallback by the plugin, so they can sit on :root. */
:root {
	--tsc-sale: var(--flash);
	--tsc-discount-bg: #FCE6E6; /* the flash red at 10% on white */
	--tsc-discount-fg: var(--flash);
	--tsc-freeship-bg: var(--y);
	--tsc-freeship-fg: var(--k);
	--tsc-freeship-track: rgba(18, 18, 18, .18);
	/* Free gifts. GWP fixes these on :root "so it stays the same on every theme"; green (unlocked) is kept. */
	--tsc-gwp-red: var(--k);
	--tsc-gwp-blush: #FFFCE3;
	--tsc-gwp-blush-line: #F2E6A6;
	--tsc-gwp-track: rgba(18, 18, 18, .14);
	--tsc-gwp-muted: var(--grey);
	--tsc-gwp-ink: var(--k);
}

/* The checkout's two wallet rows (store credit, loyalty coins) keep a green: it has to mean "value you already hold". */
.tsc-checkout {
	--tsc-credit: #1E7A4C;
	--tsc-credit-tint: #EAF3EE;
}

/* Money that TSC paints red with a fixed colour (not a variable). Sale prices take the flash red; failed and error
   states stay red on purpose. */
.tsc-cart__upsell-discount,
.tsc-checkout-item__price-sale,
.tsc-checkout-total-row--discount .tsc-checkout-total-row__value .woocommerce-Price-amount,
.tsc-thankyou-total-row--discount .tsc-thankyou-total-row__value .woocommerce-Price-amount,
.tsc-order-total-row--discount .tsc-order-total-row__value .woocommerce-Price-amount {
	color: var(--flash);
}
/* The "RMxx off" and "You've saved RMxx!" labels are red (#dc2626, TSC's own red) on every IGSHOP site, not the flash red. */
.tsc-listbar__saving,
.tsc-checkout__bottombar-saving {
	color: #dc2626;
}
.tsc-order__reserved,
.tsc-thankyou__reserved,
.tsc-orders__tab-badge {
	background: var(--k);
	color: var(--y);
}

/* The coupon icon is a 🎟️ emoji (red and pink); a filter turns it into a plain dark glyph. */
.tsc-vouchers-trigger__icon,
.tsc-checkout__coupon-icon {
	filter: grayscale(1) brightness(.2);
}

/* ---------------------------------------------------------------- 2. cart */
/* The offer strip (includes/offers.php). Two tiers, so two labels and two bar segments: each label sits over its own
   segment because the label row and the bar are both a flex of two equal children with the same 6px gap. A tier that
   is not reached yet keeps a grey label with a hollow ring where the tick will go. */
.tsc-cart__freeship {
	background: var(--tsc-freeship-bg);
	color: var(--k);
}
.tsc-cart__freeship-text {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 7px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.25;
}
.tsc-cart__freeship-step {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 5px;
	min-width: 0;
	opacity: .5;
}
.tsc-cart__freeship-step + .tsc-cart__freeship-step {
	justify-content: flex-end;
	text-align: right;
}
.tsc-cart__freeship-step.is-won { opacity: 1; }
.tsc-cart__freeship-mark {
	display: inline-flex;
	flex: none;
}
.tsc-cart__freeship-ring {
	display: inline-block;
	width: 15px;
	height: 15px;
	border: 2px solid currentColor;
	border-radius: 50%;
	opacity: .55;
}
.tsc-cart__freeship-bar {
	display: flex;
	gap: 6px;
	height: auto;
	background: transparent;
	overflow: visible;
}
.tsc-cart__freeship-seg {
	flex: 1;
	height: 4px;
	background: rgba(18, 18, 18, .18);
	border-radius: 999px;
}
.tsc-cart__freeship-seg.is-won { background: var(--k); }

/* The cart's saving line: a second line under the total, red like every IGSHOP site, with a yellow dot in front of it. */
.tsc-cart__total-saving { color: #dc2626; }
.tsc-cart__total-saving::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 6px;
	border-radius: 50%;
	background: var(--y);
	vertical-align: 1px;
}

/* Black pill, yellow label (the same pairing as the product page's sticky Buy button). `.tsc-cart a` sets
   color:inherit, so the element in the selector keeps the label yellow. */
.tsc-cart a.tsc-checkout-btn,
.tsc-cart a.tsc-checkout-btn:hover,
.tsc-checkout .tsc-checkout__place-order,
.tsc-checkout .tsc-checkout__place-order:hover {
	background: var(--k);
	border-color: var(--k);
	color: var(--y);
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
}
.tsc-cart a.tsc-checkout-btn:hover,
.tsc-checkout .tsc-checkout__place-order:hover {
	background: var(--k-2);
	border-color: var(--k-2);
}

/* The coupon row. TSC pins a grey fill and capitals with !important, so `body` and !important answer it.
   "1 applied" is the cart's only sign that a coupon is live, so it gets the brand yellow as a chip. */
body .tsc-cart .tsc-vouchers-trigger {
	background: var(--bone) !important;
	border-top: 1px solid var(--line) !important;
	border-bottom: 1px solid var(--line) !important;
	text-transform: none !important;
	letter-spacing: .02em !important;
}
.tsc-vouchers-trigger__applied {
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--y);
	color: var(--k);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* The gift line and its chip. */
.tsc-gwp-chip {
	background: var(--k);
	color: var(--y);
}

@media (min-width: 768px) {
	/* TSC gives the cart 10% of the screen on each side, which stretches a phone layout across a wide screen.
	   It sits in one centred 1000px column instead. */
	.tsc-cart {
		max-width: 1000px;
		margin-inline: auto;
		padding-left: var(--tsc-pad);
		padding-right: var(--tsc-pad);
		/* TSC leaves 12px under the checkout bar here (it is pinned on phones only); the footer needs real air above it. */
		padding-bottom: 72px;
	}
	.tsc-cart__page-title {
		padding: 34px 16px 14px;
		font-size: 34px;
		font-weight: 500;
		letter-spacing: .02em;
	}
	.tsc-cart__bottombar {
		margin-top: 28px;
		border: 1px solid var(--tsc-border);
	}
}

/* ---------------------------------------------------------------- 3. checkout */
/* Logo in the header (desktop shows it, phones show the page title). TSC prints the site name as text when no logo
   is set in Customizer > Site Identity; the Emajie logo is drawn over that link instead (the words stay in the page
   for screen readers). A logo uploaded in Site Identity prints as an <img> and is left alone. */
.tsc-checkout__logo > a:not(.custom-logo-link) {
	display: block;
	width: 76px;
	height: 29px;
	background: url("img/logo.png") left center / contain no-repeat;
	font-size: 0;
	color: transparent;
}

/* The rows pin capitals and a 16px inset with !important; Emajie reads them in normal case. */
body .tsc-checkout .tsc-checkout__address-card,
body .tsc-checkout .tsc-checkout__select-row,
body .tsc-checkout .tsc-checkout__coupon-row,
body .tsc-checkout .tsc-checkout__notes-row,
body .tsc-login-banner {
	text-transform: none !important;
	letter-spacing: 0 !important;
}

/* Free shipping is the one value on this page allowed to be louder than its label: it is the reason the shopper
   put a second bottle in the basket. */
.tsc-checkout__select-cost.is-free {
	color: var(--k);
	font-weight: 600;
}

/* The gift row. */
.tsc-checkout-item--gift { background: #FFFCE3; }

/* The upsell on the checkout is a yellow band. The body prefix outranks the desktop reset (background: transparent). */
body .tsc-checkout .tsc-cart__upsell {
	padding: 22px 16px 16px;
	background: var(--y);
}
body .tsc-checkout .tsc-cart__upsell-title,
body .tsc-checkout .tsc-cart__upsell-name { color: var(--k); }

@media (min-width: 768px) {
	/* TSC runs the two columns edge to edge; here they sit in the same centred 1000px column as the cart,
	   and the header lines up with it. */
	.tsc-checkout { background: #fff; }
	.tsc-checkout__header {
		justify-content: space-between;
		padding-inline: max(var(--tsc-pad), calc((100% - 1000px) / 2));
	}
	/* The title sits between the 76px logo and the 32px bag icon, which leaves it 22px right of centre; the bag
	   link is widened to the logo's width (icon still at the right edge) so the title is truly centred. */
	.tsc-checkout__cart-link {
		width: 76px;
		justify-content: flex-end;
	}
	.tsc-checkout__cols {
		max-width: 1000px;
		margin-inline: auto;
		min-height: auto;
	}
	.tsc-checkout__main { padding: 8px 24px 24px 0; }
	.tsc-checkout__summary {
		min-height: calc(100vh - 100px);
		padding: 8px 0 24px 24px;
	}
	/* Side by side, the grey fills and the inset only break the white up: rows sit flat and lean on their rules. */
	body .tsc-checkout .tsc-checkout__address-card,
	body .tsc-checkout .tsc-checkout__select-row,
	body .tsc-checkout .tsc-checkout__coupon-row,
	body .tsc-checkout .tsc-checkout__notes-row {
		padding-inline: 0 !important;
		background: transparent !important;
	}
	body .tsc-checkout .tsc-checkout__notes-row {
		border-top: 1px solid var(--tsc-border) !important;
		border-bottom: 1px solid var(--tsc-border) !important;
	}
	.tsc-checkout__section-title,
	.tsc-checkout__totals,
	.tsc-checkout__terms,
	.tsc-checkout__payment-details,
	.tsc-checkout-item {
		padding-inline: 0;
		background: transparent;
	}
	.tsc-checkout__section-title {
		padding-bottom: 10px;
		font-size: 15px;
	}
	.tsc-checkout__items {
		background: transparent;
		border-bottom: 1px solid var(--tsc-border);
	}
	/* The free gift line keeps its own inset and fill. */
	.tsc-checkout-item--gift {
		padding-inline: 12px;
		background: #FFFCE3;
	}
	.tsc-checkout__bottombar {
		padding: 20px 0 0;
		border-top: 0;
	}
	body .tsc-checkout .tsc-cart__upsell {
		margin-top: 16px;
		border-radius: 12px;
	}
}

/* The checkout is a closed page at every width: nothing in the site header or footer to click away with an order
   half filled. The slim legal band (.y-bottom) stays, because it carries the company number. The thank-you page keeps
   the full header so the shopper can carry on shopping. */
body.woocommerce-checkout:not(.woocommerce-order-received) .y-announce,
body.woocommerce-checkout:not(.woocommerce-order-received) .y-hdr,
body.woocommerce-checkout:not(.woocommerce-order-received) .y-ftr {
	display: none;
}

/* The thank-you title: TSC adds a 44px blank block after it (room for a back arrow the page does not have),
   which pushes the title 22px left of centre. */
.tsc-thankyou__header-spacer { display: none; }

/* TSC's pop-up sheets (address, shipping, payment, coupon, login, notes) are made for a phone and run edge to edge on a
   desktop. From tablet up they become a centred 560px panel. The sheet is already placed with left:0 and right:0, so a
   fixed width with auto side margins centres it without touching the transform that slides it up. */
@media (min-width: 768px) {
	body .tsc-modal__sheet {
		width: min(560px, 100%);
		margin-inline: auto;
		border-radius: 16px 16px 0 0;
	}
}

/* The grand-total row has 2px under it in TSC, so on a phone "Total" sits right on the divider line. */
body .tsc-thankyou-total-row--grand { padding-bottom: 10px; }

/* ---------------------------------------------------------------- 4. phones */
/* On a phone the cart is an app screen: TSC's own header (back arrow, title) and bottom bar replace the site's.
   TSC hides its theme's header and footer for this (cart.css, written for Kadence ids); these are Emajie's. */
@media (max-width: 767px) {
	body.woocommerce-cart .y-announce,
	body.woocommerce-cart .y-hdr,
	body.woocommerce-cart .y-ftr {
		display: none;
	}
	/* The two-tier strip is 58px tall, one row more than TSC's single-line strip, so the page keeps room for it. */
	.tsc-cart { padding-bottom: calc(var(--tsc-bottombar-h, 64px) + 58px + 12px); }
	/* Light grey page behind the white cards. */
	.tsc-checkout { background: #F5F5F5; }
}

/* ---------------------------------------------------------------- 5. account */
/* My Account (Reward, Orders, Address Book, Profile). The colours above already reach it; this adds the Emajie
   details from the account mockup: a yellow underline on the open tab, one 820px column, bone-filled fields,
   a flat password block, coloured order status pills, and a save button that is only as wide as its words. */
.tsc-account__tab,
.tsc-orders__tab { border-bottom: 2px solid transparent; }
.tsc-account__tab.is-active,
.tsc-orders__tab.is-active { border-bottom-color: var(--y); }

/* Orders status pills: red wash = needs paying, yellow = on its way, green = done. */
.tsc-orders-card__status--pending,
.tsc-orders-card__status--failed { background: #FCE6E6; color: var(--flash); }
.tsc-orders-card__status--processing,
.tsc-orders-card__status--on-hold { background: #FFF6A8; color: var(--k); }
.tsc-orders-card__status--completed { background: #EAF3EE; color: #1E7A4C; }

/* The balance and its "worth" chip and the birthday nudge keep the wallet green (see section 1). */

/* WooCommerce 11 styles its fields with `.woocommerce form .form-row .input-text` (a dark border, 4px corners), which
   outweighs TSC's own field rules; `body` in front (one more element) makes these win over both. */
body .tsc-account__content form .form-row .input-text,
body .tsc-account__content form .form-row select,
body .tsc-account__content form input[type="date"] {
	height: 46px;
	padding: 0 14px;
	background: var(--bone);
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--k);
	font-family: var(--sans);
}
body .tsc-account__content form .form-row .input-text:focus,
body .tsc-account__content form .form-row select:focus,
body .tsc-account__content form input[type="date"]:focus {
	background: #fff;
	border-color: var(--k) !important;
	box-shadow: 0 0 0 3px rgba(253, 227, 6, .45);
	outline: none;
}
body .tsc-account__content form .password-input input { padding-right: 44px; }
.tsc-account__content form label {
	font-size: 13px;
	font-weight: 400;
	color: var(--k-2);
}
.tsc-account__content .woocommerce-EditAccountForm fieldset {
	padding: 18px 0 2px;
	background: transparent;
	border: 0;
	border-top: 1px solid var(--line);
	border-radius: 0;
}
.tsc-account__content .woocommerce-EditAccountForm legend {
	padding: 0 10px 0 0;
	font-weight: 600;
}

/* "Save changes": a black pill with the yellow label, as wide as its text (not the whole row). */
body .tsc-account__content form button[type="submit"] {
	width: auto;
	min-width: 180px;
	padding: 0 36px;
	letter-spacing: .02em;
}

/* Address Book (woo-address-book, shown by TSC): flat sections, bordered cards, a yellow "Default" tag, text links for Edit / Delete. */
.tsc-account__content .address_book {
	padding: 16px 20px 0;
	background: transparent;
	margin-bottom: 36px !important;
}
.tsc-account__content .address_book > header h3 {
	font-size: 17px;
	font-weight: 600;
	color: var(--k);
}
.tsc-account__content .myaccount_address { font-size: 13px; color: var(--grey); }
.tsc-account__content .wc-address-book-address {
	padding: 14px 16px;
	border-color: var(--line);
	border-radius: 12px;
}
.tsc-account__content .wc-address-book-address-default { border-color: var(--k) !important; }

/* The card title row. WooCommerce's clearfix ::before / ::after count as flex items here and push the title off the left edge. */
.tsc-account__content .wc-address-book-address .woocommerce-Address-title {
	justify-content: space-between;
	margin-bottom: 8px;
}
.tsc-account__content .wc-address-book-address .woocommerce-Address-title::before,
.tsc-account__content .wc-address-book-address .woocommerce-Address-title::after { display: none; }
.tsc-account__content .wc-address-book-address .woocommerce-Address-title h3 {
	font-size: 15px;
	font-weight: 600;
	color: var(--k);
}
body .tsc-account__content .wc-address-book-address-default-label {
	padding: 2px 9px;
	font-size: 10.5px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--k);
	background: var(--y) !important;
}

/* The plugin pads the address and the link row by 16px each; the card's own padding is enough. */
.tsc-account__content .wc-address-book-address address {
	padding: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--k-2);
}
.tsc-account__content .wc-address-book-address .tsc-addr-name { color: var(--k); }
.tsc-account__content .wc-address-book-meta {
	gap: 18px;
	margin-top: 14px;
	padding: 12px 0 0;
	border-top: 1px solid var(--line);
}
body .tsc-account__content .wc-address-book-meta .button {
	flex-grow: 0;
	height: auto;
	padding: 0;
	border: 0 !important;
	background: none !important;
	color: var(--k) !important;
	font-size: 13px;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}
body .tsc-account__content .wc-address-book-meta .button:disabled { opacity: .4; cursor: not-allowed; }

@media (min-width: 768px) {
	.tsc-account__tabs,
	.tsc-account__content,
	.tsc-orders__page-title,
	.tsc-orders__tabs,
	.tsc-orders__list {
		max-width: 820px;
		margin-inline: auto;
	}
	/* One order per row: a cart-style list, not two cards side by side. */
	.tsc-orders__list { display: block; padding-inline: 0; }
	.tsc-account__content { padding: 18px 0 64px; }
	.tsc-account__content .address_book { padding-inline: 25px; }
}
