/*
 * TotieShoppe - small site-wide bits: navbar bag badge, cart page controls, checkout field errors,
 * WooCommerce notices, catalog filter menu / pagination.
 * Plain CSS (no Tailwind rebuild needed).
 */

/* ---------------------------- Navbar bag badge ---------------------------- */
.totie-cart-link { position: relative; display: inline-block; }
.totie-cart-badge {
	position: absolute;
	top: -0.1rem;
	right: -0.2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 1.2rem;
	height: 1.2rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	background: var(--color-tertiary, #f4a9c7);
	color: var(--color-main, #563066);
	font-family: 'Quicksand', sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 1px 4px rgba(86, 48, 102, 0.25);
}
.totie-cart-badge[hidden] { display: none !important; }
/* In the mobile menu the badge sits inline after the word "Cart" */
.totie-cart-badge--inline { position: static; display: inline-flex; margin-left: 0.35rem; vertical-align: middle; }

/* ------------------------------- Cart page -------------------------------- */
#totie-cart.is-busy { opacity: 0.6; pointer-events: none; transition: opacity 0.15s ease; }
#totie-cart [data-cart-item] h2 a { color: inherit; text-decoration: none; }
#totie-cart [data-cart-item] h2 a:hover { text-decoration: underline; }

#totie-cart input.totie-cart-qty {
	width: 2.75rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: center;
	font-size: 0.875rem;
	font-weight: 600;
	-moz-appearance: textfield;
	appearance: textfield;
}
#totie-cart input.totie-cart-qty::-webkit-outer-spin-button,
#totie-cart input.totie-cart-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#totie-cart input.totie-cart-qty:focus { outline: 2px solid var(--color-main, #563066); outline-offset: -2px; border-radius: 4px; }
#totie-cart [data-qty-inc]:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------------------- WooCommerce messages (all pages) ------------------- */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-notices-wrapper { margin-bottom: 1.5rem; }
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 0 0 0.75rem;
	padding: 0.9rem 1.25rem !important;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(196, 178, 163, 0.35);
	border-left: 4px solid var(--color-sage, #8fa88b);
	border-radius: 0.9rem;
	color: #374151;
	box-shadow: 0 6px 18px rgba(86, 48, 102, 0.06);
}
.woocommerce-notices-wrapper .woocommerce-error { border-left-color: #dc2626; flex-direction: column; align-items: flex-start; }
.woocommerce-notices-wrapper .woocommerce-info { border-left-color: var(--color-secondary, #a385c0); }
.woocommerce-notices-wrapper .woocommerce-message::before,
.woocommerce-notices-wrapper .woocommerce-info::before,
.woocommerce-notices-wrapper .woocommerce-error::before { display: none !important; content: none !important; }
/* "View cart" / "Undo?" buttons inside a message: smaller, on the right */
.woocommerce-notices-wrapper .woocommerce-message .button,
.woocommerce-notices-wrapper .woocommerce-info .button {
	order: 2;
	float: none !important;
	margin: 0 !important;
	padding: 0.5rem 1.1rem !important;
	font-size: 0.85rem;
	white-space: nowrap;
}
.woocommerce-notices-wrapper .woocommerce-message a:not(.button) { color: var(--color-main, #563066); font-weight: 700; }

/* ------------------------- Checkout field validation ----------------------- */
.field-input[aria-invalid='true'] { border-color: #dc2626; background: #fef2f2; }
.field-input[aria-invalid='true']:focus { border-color: #dc2626; }
.field-error { margin: 0.4rem 0 0; font-size: 0.8rem; font-weight: 600; color: #dc2626; }
.field-input:disabled { opacity: 0.6; }
#totie-checkout button[data-place-order]:disabled { opacity: 0.6; cursor: wait; }

/* ------------------------- Catalog filter + pagination --------------------- */
.totie-filter-menu { width: 16rem; max-height: 22rem; overflow-y: auto; }
.totie-filter-heading {
	padding: 0.6rem 1rem 0.25rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #9ca3af;
	border-top: 1px solid #f3f4f6;
	margin-top: 0.25rem;
}
.totie-filter-item { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.totie-active-filter {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: -0.5rem 0 1.25rem;
	padding: 0.3rem 0.4rem 0.3rem 0.9rem;
	border-radius: 999px;
	background: var(--color-light, #e4d8eb);
	color: var(--color-main, #563066);
	font-size: 0.85rem;
	font-weight: 700;
}
.totie-active-filter a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background: #fff;
	color: inherit;
	text-decoration: none;
	line-height: 1;
}
.totie-active-filter a:hover { background: var(--color-main, #563066); color: #fff; }

.totie-result-count { margin: 0 0 1rem; font-size: 0.85rem; color: #6b7280; }

.totie-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	margin-top: 2rem;
}
.totie-pager__num,
.totie-pager__nav,
.totie-pager__gap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.9rem;
	border-radius: 0.6rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #374151;
	text-decoration: none;
}
.totie-pager__num,
.totie-pager__nav { background: #fff; border: 1px solid rgba(196, 178, 163, 0.35); }
a.totie-pager__num:hover,
a.totie-pager__nav:hover { border-color: var(--color-main, #563066); color: var(--color-main, #563066); }
.totie-pager__num.is-current { background: var(--color-main, #563066); border-color: var(--color-main, #563066); color: #fff; }
.totie-pager__nav.is-disabled { opacity: 0.45; }
.totie-pager__gap { min-width: 1.5rem; padding: 0; color: #9ca3af; }
@media (max-width: 480px) {
	.totie-pager__num, .totie-pager__nav, .totie-pager__gap { min-width: 2.2rem; height: 2.2rem; padding: 0 0.6rem; }
}

/* ------------------------ "N colors" hint on product cards ------------------ */
.totie-card-colors {
	display: inline-block;
	margin: 0.4rem 0 0;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	background: var(--color-light, #e4d8eb);
	color: var(--color-main, #563066);
	font-size: 0.72rem;
	font-weight: 700;
}

/* ------------------- Payment instructions (Order Received) ------------------ */
.totie-pay {
	padding: 1.5rem;
	border: 2px solid var(--color-main, #563066);
	border-radius: 1.25rem;
	background: var(--color-tan, #f8eee7);
}
@media (min-width: 768px) { .totie-pay { padding: 2rem; } }
.totie-pay__title {
	margin: 0;
	font-family: 'Quicksand', sans-serif;
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--color-main, #563066);
}
.totie-pay__amount {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-top: 1rem;
	padding: 1rem 1.25rem;
	border-radius: 0.9rem;
	background: #fff;
}
.totie-pay__amount span { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #6b7280; }
.totie-pay__amount strong { font-family: 'Quicksand', sans-serif; font-size: 2rem; line-height: 1.1; color: var(--color-main, #563066); }
.totie-pay__delivery { margin: 0.6rem 0 0; font-size: 0.85rem; color: #4b5563; }

.totie-pay__steps { margin: 1.5rem 0 0; padding: 0; list-style: none; counter-reset: pay-step; display: grid; gap: 1.5rem; }
.totie-pay__steps > li { position: relative; padding-left: 3rem; counter-increment: pay-step; }
.totie-pay__steps > li::before {
	content: counter(pay-step);
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 50%;
	background: var(--color-main, #563066);
	color: #fff;
	font-family: 'Quicksand', sans-serif;
	font-weight: 700;
}
.totie-pay__steps h3 { margin: 0.25rem 0 0.4rem; font-family: 'Quicksand', sans-serif; font-size: 1.05rem; font-weight: 700; color: #1f2937; }
.totie-pay__steps p { margin: 0; font-size: 0.9rem; line-height: 1.65; color: #4b5563; }

.totie-pay__accounts { display: grid; gap: 0.75rem; margin: 0.75rem 0; }
@media (min-width: 640px) { .totie-pay__accounts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.totie-pay__account { padding: 0.9rem 1rem; border-radius: 0.9rem; background: #fff; border: 1px solid rgba(196, 178, 163, 0.4); }
.totie-pay__account p { margin: 0.25rem 0 0; font-size: 0.88rem; color: #374151; overflow-wrap: anywhere; }
.totie-pay__account span { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #9ca3af; }
.totie-pay__account strong { font-family: 'Quicksand', sans-serif; font-size: 1.05rem; letter-spacing: 0.04em; color: #111827; }
.totie-pay__steps .totie-pay__account .totie-pay__bank { margin: 0; font-family: 'Quicksand', sans-serif; font-size: 1rem; font-weight: 700; color: var(--color-main, #563066); }
.totie-pay__copy {
	margin-left: 0.5rem;
	padding: 0.15rem 0.7rem;
	border: 1px solid var(--color-main, #563066);
	border-radius: 999px;
	background: transparent;
	color: var(--color-main, #563066);
	font-size: 0.75rem;
	font-weight: 700;
	cursor: pointer;
}
.totie-pay__copy:hover, .totie-pay__copy.is-copied { background: var(--color-main, #563066); color: #fff; }
.totie-pay__steps .totie-pay__safety { font-size: 0.8rem; font-weight: 600; color: #92400e; }

.totie-pay__btn {
	display: inline-block;
	margin-top: 0.9rem;
	padding: 0.7rem 1.5rem;
	border-radius: 999px;
	background: var(--color-main, #563066);
	color: #fff;
	font-family: 'Quicksand', sans-serif;
	font-weight: 700;
	text-decoration: none;
	transition: opacity 0.15s ease;
}
.totie-pay__btn:hover { opacity: 0.9; }
.totie-pay__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.9rem; }
.totie-pay__actions .totie-pay__btn { margin-top: 0; }
.totie-pay__copy--lg { margin-left: 0; padding: 0.6rem 1.1rem; font-size: 0.85rem; }
.totie-pay__hold { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(196, 178, 163, 0.5); font-size: 0.8rem; color: #6b7280; }
