/**
 * UELUXE Offer System — Frontend styles
 *
 * Typography: Elementor kit tokens / native WooCommerce + Buy Now styles only.
 * No hard-coded font families or font-weight overrides.
 *
 * Layout: max-height 90vh; body scrolls; Submit footer stays visible.
 *
 * @package Ueluxe_Offer_System
 */

.uos-offer-ui {
	--uos-gold: #cc8729;
	--uos-gold-hover: #b47420;
	--uos-ink-soft: #7a7166;
	--uos-line: #e7e0d6;
	--uos-ivory: #fffdf8;
	--uos-error: #b42318;
	--uos-success-bg: #f8f3ea;
	--uos-radius: 12px;
	/*
	 * Escape kit body display font (Anton) by using Elementor text tokens —
	 * the same stacks applied to product content / forms sitewide.
	 */
	--uos-typo-text-family: var(--e-global-typography-text-font-family), Sans-serif;
	--uos-typo-text-size: var(--e-global-typography-text-font-size);
	--uos-typo-text-weight: var(--e-global-typography-text-font-weight);
	--uos-typo-body-family: var(--e-global-typography-c46861d-font-family, var(--e-global-typography-text-font-family)), Sans-serif;
	--uos-typo-body-size: var(--e-global-typography-c46861d-font-size, var(--e-global-typography-text-font-size));
	--uos-typo-body-weight: var(--e-global-typography-c46861d-font-weight, var(--e-global-typography-text-font-weight));
	--uos-typo-body-line: var(--e-global-typography-c46861d-line-height, normal);
	--uos-typo-heading-family: var(--e-global-typography-4de932c-font-family, var(--e-global-typography-7f17d4a-font-family)), Sans-serif;
	--uos-typo-heading-size: var(--e-global-typography-4de932c-font-size, var(--e-global-typography-7f17d4a-font-size));
	--uos-typo-heading-weight: var(--e-global-typography-4de932c-font-weight, var(--e-global-typography-7f17d4a-font-weight));
	--uos-typo-heading-line: var(--e-global-typography-4de932c-line-height, var(--e-global-typography-7f17d4a-line-height));
	--uos-typo-heading-transform: var(--e-global-typography-4de932c-text-transform, none);

	clear: both;
	width: 100%;
	font-family: var(--uos-typo-text-family);
	font-size: var(--uos-typo-text-size);
	font-weight: var(--uos-typo-text-weight);
	line-height: normal;
	letter-spacing: normal;
	color: inherit;
}

/* ---- Product CTA 2×2 grid (Task 29) ----
 * [ Add to Cart ] [ Buy Now ]
 * [ Make an Offer ] [ Watch ]
 */

.uos-product-cta {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	max-width: 100%;
	margin: 10px 0 14px;
	padding: 0;
	box-sizing: border-box;
}

.uos-product-cta__primary,
.uos-product-cta__secondary {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	align-items: stretch;
	width: 100%;
}

.uos-product-cta__cell {
	display: flex;
	min-width: 0;
}

.uos-product-cta .uos-cta-btn,
.uos-product-cta .single_add_to_cart_button,
.uos-product-cta [data-uos-buy-now-bound],
.uos-product-cta .uos-offer-trigger,
.uos-product-cta .uos-watch-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	max-width: 100%;
	min-height: 44px;
	height: auto;
	margin: 0 !important;
	box-sizing: border-box;
	text-align: center;
	white-space: normal;
}

/* Make an Offer — button chrome, gold scheme, kept underline accent on label */
.uos-product-cta .uos-offer-trigger.uos-cta-btn {
	color: var(--uos-gold, #cc8729) !important;
	background: transparent !important;
	border: 1px solid var(--uos-gold, #cc8729) !important;
	border-radius: 3px;
	text-decoration: none !important;
	font-weight: inherit;
	line-height: 1.25;
	padding: 0.6em 1em;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.uos-product-cta .uos-offer-trigger.uos-cta-btn:hover,
.uos-product-cta .uos-offer-trigger.uos-cta-btn:focus {
	color: #fff !important;
	background: var(--uos-gold, #cc8729) !important;
	border-color: var(--uos-gold, #cc8729) !important;
	text-decoration: none !important;
}

.uos-product-cta .uos-watch-btn.is-watching {
	background: var(--uos-gold, #cc8729) !important;
	border-color: var(--uos-gold, #cc8729) !important;
	color: #fff !important;
}

/* Hide legacy duplicate Buy Now from older UOS markup */
.uos-offer-ui .uos-buy-now-trigger,
.uos-offer-ui [data-uos-buy-now],
.uos-offer-ui [data-uos-login-buy-now],
.uos-offer-actions-sep,
.uos-offer-trigger-wrap:not(.uos-cta-btn) {
	display: none !important;
}

body.single-product .uos-offer-ui {
	margin: 0;
	padding: 0;
	clear: both;
	width: 100%;
}

/* Soft reserve: hide purchase CTAs when reserved */
body.uos-product-reserved-other form.cart,
body.uos-product-reserved-other .single_add_to_cart_button,
body.uos-product-reserved-other .wc-buy-now-btn,
body.uos-product-reserved-other [data-uos-buy-now-bound],
body.uos-product-reserved-other .uos-product-cta__primary,
body.uos-product-reserved-other .uos-product-cta__cell--offer,
body.uos-product-reserved-owner form.cart,
body.uos-product-reserved-owner .single_add_to_cart_button,
body.uos-product-reserved-owner .wc-buy-now-btn,
body.uos-product-reserved-owner [data-uos-buy-now-bound],
body.uos-product-reserved-owner .uos-product-cta__primary,
body.uos-product-reserved-owner .uos-product-cta__cell--offer {
	display: none !important;
}

@media (max-width: 480px) {
	.uos-product-cta__primary,
	.uos-product-cta__secondary {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.uos-product-cta {
		gap: 8px;
		margin: 8px 0 12px;
	}
}

/* ---- Modal shell ---- */

.uos-modal[hidden] {
	display: none !important;
}

.uos-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

.uos-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(30, 26, 22, 0.42);
	cursor: pointer;
}

.uos-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 620px;
	max-height: 90vh;
	overflow: hidden;
	margin: auto;
	padding: 2.25rem 2.25rem 1.5rem;
	border-radius: var(--uos-radius);
	background: var(--uos-ivory);
	border: 1px solid rgba(204, 135, 41, 0.1);
	box-shadow:
		0 28px 64px rgba(42, 36, 28, 0.16),
		0 4px 14px rgba(42, 36, 28, 0.05);
	font-family: var(--uos-typo-text-family);
	font-size: var(--uos-typo-text-size);
	font-weight: var(--uos-typo-text-weight);
	line-height: normal;
	letter-spacing: normal;
	color: inherit;
}

/* ---- Close: simple grey ×, no border ---- */

.uos-offer-ui .uos-modal__close,
.uos-modal .uos-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	appearance: none !important;
	-webkit-appearance: none !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none !important;
	color: #6f675e;
	cursor: pointer;
	transition: color 0.2s ease;
}

.uos-modal__close-icon {
	display: block;
	pointer-events: none;
}

.uos-offer-ui .uos-modal__close:hover,
.uos-offer-ui .uos-modal__close:focus,
.uos-modal .uos-modal__close:hover,
.uos-modal .uos-modal__close:focus {
	color: #333;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

/* ---- Header (always visible) ---- */

.uos-modal__header {
	flex: 0 0 auto;
	margin: 0 0 1.1rem;
	padding: 0 1.5rem 0 0;
	text-align: center;
	border: 0;
}

/* Heading = Elementor product/heading typography tokens */
.uos-modal__title {
	margin: 0;
	font-family: var(--uos-typo-heading-family);
	font-size: var(--uos-typo-heading-size);
	font-weight: var(--uos-typo-heading-weight);
	line-height: var(--uos-typo-heading-line);
	text-transform: var(--uos-typo-heading-transform);
	letter-spacing: normal;
	text-align: center;
	color: var(--uos-gold);
}

.uos-modal__ornament {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	margin: 0.75rem auto 0.9rem;
	width: 100%;
	max-width: 11rem;
}

.uos-modal__ornament-line {
	display: block;
	flex: 1 1 auto;
	height: 1px;
	background: linear-gradient(
		to right,
		transparent,
		rgba(204, 135, 41, 0.55),
		transparent
	);
}

.uos-modal__ornament-diamond {
	display: block;
	width: 7px;
	height: 7px;
	flex: 0 0 auto;
	border: 1px solid var(--uos-gold);
	transform: rotate(45deg);
	background: transparent;
}

/* Description = Elementor body/text tokens (product description stack) */
.uos-modal__subtitle {
	margin: 0 auto;
	max-width: 34em;
	color: var(--uos-ink-soft);
	font-family: var(--uos-typo-body-family);
	font-size: var(--uos-typo-body-size);
	font-weight: var(--uos-typo-body-weight);
	line-height: var(--uos-typo-body-line);
	letter-spacing: normal;
	text-align: center;
}

/* ---- Form: scrollable body + pinned submit ---- */

.uos-offer-form {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
}

.uos-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding-right: 0.15rem;
}

.uos-offer-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 1.25rem;
	row-gap: 1.15rem;
}

.uos-offer-form .uos-form-row {
	margin: 0;
	padding: 0;
	width: 100%;
}

.uos-offer-fields .uos-form-row:not(.uos-form-row--half) {
	grid-column: 1 / -1;
}

.uos-offer-notice {
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(204, 135, 41, 0.24);
	border-left: 3px solid var(--uos-gold);
	border-radius: 8px;
	background: var(--uos-success-bg);
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
}

.uos-offer-notice--error {
	border-color: rgba(180, 35, 24, 0.2);
	border-left-color: var(--uos-error);
	background: #fef3f2;
}

.uos-offer-notice[hidden] {
	display: none !important;
}

/*
 * Labels: inherit WooCommerce / theme form label typography.
 * (Parent already uses Elementor text tokens; no weight overrides.)
 */
.uos-offer-form label {
	display: block;
	margin: 0 0 0.4rem;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	text-transform: none;
	color: inherit;
}

.uos-offer-form label .required {
	color: var(--uos-gold);
	margin-left: 0.15rem;
	font-weight: inherit;
}

/*
 * Inputs: layout only — typography comes from WooCommerce `.input-text`
 * / theme form styles via inheritance.
 */
.uos-offer-form .input-text,
.uos-offer-form .uos-select,
.uos-offer-form select,
.uos-offer-form textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.uos-offer-form textarea {
	min-height: 5.5rem;
	resize: vertical;
}

.uos-field-error {
	display: block;
	margin-top: 0.35rem;
	color: var(--uos-error);
	font-family: inherit;
	font-size: 0.9em;
	font-weight: inherit;
}

.uos-field-error[hidden] {
	display: none !important;
}

.uos-offer-form .uos-form-row.is-invalid .input-text,
.uos-offer-form .uos-form-row.is-invalid .uos-select,
.uos-offer-form .uos-form-row.is-invalid select,
.uos-offer-form .uos-form-row.is-invalid textarea {
	border-color: var(--uos-error);
}

/* Sticky actions — Submit always visible */
.uos-modal__actions {
	flex: 0 0 auto;
	margin-top: 1rem;
	padding-top: 0.25rem;
	background: var(--uos-ivory);
}

.uos-offer-form .uos-form-row--submit {
	margin: 0;
}

/*
 * Submit: Buy Now classes carry typography.
 * Only reinforce full-width + brand gold so theme button fonts/weights apply.
 */
.uos-offer-ui .uos-offer-form .uos-submit-offer.button,
.uos-offer-ui .uos-offer-form .uos-submit-offer.button.alt,
.uos-offer-ui .uos-offer-form .single_add_to_cart_button.uos-submit-offer {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0;
	border: none !important;
	background: #cc8729 !important;
	background-color: #cc8729 !important;
	color: #fff !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.uos-offer-ui .uos-offer-form .uos-submit-offer.button:hover,
.uos-offer-ui .uos-offer-form .uos-submit-offer.button:focus,
.uos-offer-ui .uos-offer-form .uos-submit-offer.button.alt:hover,
.uos-offer-ui .uos-offer-form .uos-submit-offer.button.alt:focus,
.uos-offer-ui .uos-offer-form .single_add_to_cart_button.uos-submit-offer:hover,
.uos-offer-ui .uos-offer-form .single_add_to_cart_button.uos-submit-offer:focus {
	background: #b47420 !important;
	background-color: #b47420 !important;
	color: #fff !important;
	border: none !important;
}

.uos-modal__footer-note {
	margin: 0.85rem 0 0;
	padding: 0;
	text-align: center;
	color: #9a9186;
	font-family: inherit;
	font-size: 0.875em;
	font-weight: inherit;
	letter-spacing: inherit;
}

body.uos-modal-open {
	overflow: hidden;
}

/* Success / error toast (outside popup — not a popup redesign) */
.uos-toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	z-index: 100001;
	transform: translateX(-50%);
	max-width: min(420px, calc(100vw - 2rem));
	padding: 1rem 1.15rem;
	border-radius: 8px;
	border: 1px solid transparent;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
	font-family: inherit;
	font-size: 0.95em;
	line-height: 1.5;
	white-space: pre-line;
	text-align: center;
}

.uos-toast[hidden] {
	display: none !important;
}

.uos-toast--success {
	background: #edf7ee;
	border-color: #b7dfb9;
	color: #1e4620;
}

.uos-toast--error {
	background: #fef3f2;
	border-color: #fecdca;
	color: #b42318;
}

/* Buyer offer status notice (below price) */
.uos-offer-status {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 14px 0 16px;
	padding: 16px 18px;
	border-radius: 8px;
	border: 1px solid #b7dfb9;
	background: #edf7ee;
	color: #1e4620;
	font-family: var(--e-global-typography-text-font-family, inherit), Sans-serif;
	font-size: var(--e-global-typography-text-font-size, inherit);
	font-weight: var(--e-global-typography-text-font-weight, inherit);
	line-height: 1.55;
	letter-spacing: normal;
}

.uos-offer-status__headline,
.uos-offer-status__title,
.uos-offer-status__meta,
.uos-offer-status__message {
	margin: 0 0 0.45rem;
	font: inherit;
	font-weight: inherit;
}

.uos-offer-status__title {
	font-weight: 700;
	font-size: 1.05em;
	letter-spacing: 0.01em;
}

.uos-offer-status__headline:last-child,
.uos-offer-status__title:last-child,
.uos-offer-status__meta:last-child,
.uos-offer-status__message:last-child,
.uos-offer-status__actions:last-child {
	margin-bottom: 0;
}

.uos-offer-status__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0.85rem 0 0;
}

.uos-offer-status__btn {
	margin: 0 !important;
}

.uos-offer-status__check {
	display: inline-block;
	margin-right: 0.35rem;
	color: inherit;
}

.uos-offer-status--pending {
	background: #edf7ee;
	border-color: #b7dfb9;
	color: #1e4620;
}

.uos-offer-status--accepted {
	background: #e8f5e9;
	border-color: #81c784;
	color: #1b5e20;
}

.uos-offer-status--rejected {
	background: #fef3f2;
	border-color: #fecdca;
	color: #7a271a;
}

.uos-offer-status--counter-offer {
	background: #eff6ff;
	border-color: #93c5fd;
	color: #1e3a8a;
}

.uos-offer-status--expired {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: #374151;
}

.uos-offer-status--payment-authorized {
	background: #f3e8ff;
	border-color: #d8b4fe;
	color: #5b21b6;
}

.uos-offer-status--reserved {
	background: #f8f1e7;
	border-color: #e2c9a0;
	color: #5c3d12;
}

.uos-offer-status__countdown,
.uos-my-offers__countdown {
	margin: 0.35rem 0 0.75rem;
	font-weight: 700;
	font-size: 1.05em;
	letter-spacing: 0.01em;
}

.uos-my-offers__countdown-wrap {
	flex-basis: 100%;
	margin-bottom: 0.35rem;
}

.uos-my-offers__countdown-label {
	margin: 0;
	font-size: 0.92em;
}

.uos-my-offers .uos-status--payment-authorized {
	background: #7c3aed;
}

.uos-my-offers .uos-status--cancelled {
	background: #374151;
}

.uos-my-offers .uos-status--expired {
	background: #6b7280;
}

/* Shared badge shell — never bare text */
.uos-my-offers .uos-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.35;
	min-height: 20px;
	box-sizing: border-box;
	color: #fff;
	background: #4b5563; /* fallback so unknown statuses still look like badges */
	white-space: nowrap;
	vertical-align: middle;
}

.uos-my-offers .uos-status--pending {
	background: #ea580c; /* orange */
}

.uos-my-offers .uos-status--accepted {
	background: #16a34a; /* green */
}

.uos-my-offers .uos-status--rejected {
	background: #dc2626; /* red */
}

.uos-my-offers .uos-status--counter-offer,
.uos-my-offers .uos-status--counter-offered,
.uos-my-offers .uos-status--counter {
	background: #2563eb; /* blue */
}

.uos-my-offers .uos-status--payment-authorized {
	background: #7c3aed; /* purple */
}

.uos-my-offers .uos-status--invoice-pending,
.uos-my-offers .uos-status--invoice-sent {
	background: #ca8a04; /* gold */
	color: #fff;
}

.uos-my-offers .uos-status--buyer-approved {
	background: #0d9488; /* teal */
}

.uos-my-offers .uos-status--ready-to-capture {
	background: #4338ca; /* indigo */
}

.uos-my-offers .uos-status--captured {
	background: #166534; /* dark green */
}

.uos-my-offers .uos-status--preparing-shipment {
	background: #1e3a5f; /* navy */
}

.uos-my-offers .uos-status--shipped,
.uos-my-offers .uos-status--in-transit {
	background: #2563eb; /* blue */
}

.uos-my-offers .uos-status--delivered {
	background: #16a34a; /* green */
}

.uos-my-offers .uos-status--completed {
	background: #15803d;
}

.uos-my-offers .uos-status--closed-by-seller,
.uos-my-offers .uos-status--cancelled {
	background: #374151; /* dark gray */
}

.uos-my-offers .uos-status--cancelled-by-buyer {
	background: #991b1b; /* dark red */
}

.uos-my-offers .uos-status--cancelled-by-admin {
	background: #6b7280; /* gray */
}

.uos-my-offers .uos-status--authorization-voided {
	background: #111827; /* black */
}

.uos-my-offers .uos-status--expired,
.uos-my-offers .uos-status--invoice-cancelled,
.uos-my-offers .uos-status--invoice-expired {
	background: #6b7280;
}

.uos-badge {
	display: inline-block;
	min-width: 1.25em;
	margin-left: 0.25rem;
	padding: 0 0.4em;
	border-radius: 999px;
	background: #CC8729;
	color: #fff;
	font-size: 0.75em;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	vertical-align: middle;
}

.uos-conv-row > td {
	padding: 0;
	background: #fafafa;
	border-top: none;
}

.uos-conv {
	margin: 0.75rem 0 1rem;
	padding: 1rem;
	border: 1px solid #e5e5e5;
	background: #fff;
}

.uos-conv__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin-bottom: 0.75rem;
}

.uos-conv__status {
	font-size: 0.85em;
	font-weight: 600;
}

.uos-conv__status--open {
	color: #15803d;
}

.uos-conv__status--closed {
	color: #6b7280;
}

.uos-conv__thread {
	max-height: 320px;
	overflow-y: auto;
	padding: 0.5rem 0;
	margin-bottom: 0.75rem;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
}

.uos-conv__empty {
	margin: 0.5rem 0;
	opacity: 0.75;
}

.uos-conv__bubble {
	margin: 0.65rem 0;
	padding: 0.65rem 0.85rem;
	border-radius: 4px;
	background: #f3f4f6;
	max-width: 92%;
}

.uos-conv__bubble--buyer {
	background: #f8f1e7;
	margin-left: 0;
	margin-right: auto;
}

.uos-conv__bubble--admin {
	background: #eef2ff;
	margin-left: auto;
	margin-right: 0;
}

.uos-conv__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.35rem 0.75rem;
	margin-bottom: 0.35rem;
	font-size: 0.85em;
}

.uos-conv__time {
	opacity: 0.75;
}

.uos-conv__text {
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
}

.uos-conv__attachment {
	margin: 0.4rem 0 0;
	font-size: 0.9em;
}

.uos-conv__composer textarea {
	width: 100%;
	max-width: 100%;
}

.uos-conv__feedback {
	margin-left: 0.75rem;
	font-size: 0.9em;
}

.uos-conv__feedback.is-error {
	color: #b91c1c;
}

.uos-conv__closed-note {
	margin: 0.5rem 0 0;
	font-style: italic;
	opacity: 0.85;
}

.uos-invoice-pending-label {
	display: inline-block;
	margin-right: 0.35rem;
	font-weight: 600;
	color: #92400e;
}

.uos-invoice-row > td {
	padding: 0;
	background: #fafafa;
	border-top: none;
}

.uos-invoice {
	margin: 0.75rem 0 1rem;
	padding: 1rem;
	border: 1px solid #e5e5e5;
	background: #fff;
}

.uos-invoice__header {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	align-items: center;
	margin-bottom: 0.75rem;
}

.uos-invoice__status--pending,
.uos-invoice__status--revision-requested {
	color: #92400e;
	font-weight: 600;
}

.uos-invoice__status--approved,
.uos-invoice__status--locked {
	color: #15803d;
	font-weight: 600;
}

.uos-invoice__status--rejected {
	color: #b91c1c;
	font-weight: 600;
}

.uos-invoice__table th {
	width: 40%;
}

.uos-invoice__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	align-items: center;
}

.uos-invoice__feedback.is-error {
	color: #b91c1c;
}

.uos-shipment-row > td {
	padding: 0;
	background: #fafafa;
	border-top: none;
}

.uos-shipment {
	margin: 0.75rem 0 1rem;
	padding: 1rem;
	border: 1px solid #e5e5e5;
	background: #fff;
}

.uos-shipment__status {
	margin-top: 0;
}

@media (max-width: 640px) {
	.uos-modal {
		padding: 0.75rem;
	}

	.uos-modal__dialog {
		padding: 1.65rem 1.15rem 1.15rem;
	}

	.uos-offer-fields {
		grid-template-columns: 1fr;
		column-gap: 0;
		row-gap: 1rem;
	}
}

/* ---- Buyer portal ---- */
.uos-buyer-dashboard {
	margin: 0 0 2rem;
}

.uos-buyer-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	margin: 0 0 1.5rem;
}

.uos-buyer-card {
	display: block;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-left: 3px solid var(--uos-gold, #cc8729);
	text-decoration: none;
	color: #1c1c1c;
}

.uos-buyer-card:hover {
	border-color: var(--uos-gold, #cc8729);
}

.uos-buyer-card__value {
	display: block;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.2;
	color: #1c1c1c;
}

.uos-buyer-card__label {
	display: block;
	margin-top: 6px;
	font-size: 0.8rem;
	color: #6b6560;
}

.uos-activity-timeline {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 2px solid #e7e0d6;
}

.uos-activity-timeline li {
	margin: 0 0 12px;
	padding: 0 0 0 16px;
	position: relative;
}

.uos-activity-timeline li::before {
	content: '';
	position: absolute;
	left: -6px;
	top: 6px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--uos-gold, #cc8729);
}

.uos-activity-timeline a {
	display: grid;
	gap: 2px;
	text-decoration: none;
	color: #1c1c1c;
}

.uos-activity-timeline time {
	font-size: 0.8rem;
	color: #7a7166;
}

/*
 * Buyer Dashboard / My Account readability.
 * Theme + Elementor kits often force white link/text color inside My Account.
 * Pin dark ink on light surfaces; keep status badges and gold CTAs intact.
 */
body.woocommerce-account .uos-buyer-dashboard,
body.woocommerce-account .uos-my-offers,
body.woocommerce-account .uos-portal,
body.woocommerce-account .uos-saved-searches,
body.woocommerce-account .uos-watching,
body.woocommerce-account .uos-recently-viewed {
	color: #1c1c1c !important;
}

body.woocommerce-account .uos-buyer-dashboard h2,
body.woocommerce-account .uos-buyer-dashboard h3,
body.woocommerce-account .uos-buyer-dashboard p,
body.woocommerce-account .uos-my-offers h2,
body.woocommerce-account .uos-my-offers h3,
body.woocommerce-account .uos-my-offers p,
body.woocommerce-account .uos-portal h2,
body.woocommerce-account .uos-portal h3,
body.woocommerce-account .uos-portal p,
body.woocommerce-account .uos-portal .description,
body.woocommerce-account .uos-settings-form h3,
body.woocommerce-account .uos-settings-form label,
body.woocommerce-account .uos-settings-form .description,
body.woocommerce-account .uos-offers-filters,
body.woocommerce-account .uos-offers-filters label,
body.woocommerce-account .uos-offers-filters__search label,
body.woocommerce-account .uos-comm-prefs,
body.woocommerce-account .uos-saved-searches__form,
body.woocommerce-account .uos-saved-searches__form label {
	color: #1c1c1c !important;
}

/* Recent Activity — product titles / action labels always readable */
body.woocommerce-account .uos-activity-timeline a,
body.woocommerce-account .uos-activity-timeline a:visited,
body.woocommerce-account .uos-activity-timeline a strong,
body.woocommerce-account .uos-activity-timeline a span {
	color: #1c1c1c !important;
}

body.woocommerce-account .uos-activity-timeline a:hover,
body.woocommerce-account .uos-activity-timeline a:focus,
body.woocommerce-account .uos-activity-timeline a:hover strong,
body.woocommerce-account .uos-activity-timeline a:focus strong,
body.woocommerce-account .uos-activity-timeline a:hover span,
body.woocommerce-account .uos-activity-timeline a:focus span {
	color: #cc8729 !important;
}

body.woocommerce-account .uos-activity-timeline time {
	color: #7a7166 !important;
}

body.woocommerce-account .uos-buyer-card,
body.woocommerce-account .uos-buyer-card:visited {
	color: #1c1c1c !important;
}

body.woocommerce-account .uos-buyer-card__value {
	color: #1c1c1c !important;
}

body.woocommerce-account .uos-buyer-card__label {
	color: #6b6560 !important;
}

/* My Offers + all portal shop_table headers / cells / product links */
body.woocommerce-account .uos-my-offers-table,
body.woocommerce-account .uos-my-offers-table thead th,
body.woocommerce-account .uos-my-offers-table tbody td,
body.woocommerce-account .uos-my-offers-table tbody th,
body.woocommerce-account .uos-portal .shop_table,
body.woocommerce-account .uos-portal .shop_table thead th,
body.woocommerce-account .uos-portal .shop_table tbody td,
body.woocommerce-account .uos-portal .shop_table tbody th,
body.woocommerce-account .uos-comm-prefs-table,
body.woocommerce-account .uos-comm-prefs-table thead th,
body.woocommerce-account .uos-comm-prefs-table tbody td {
	color: #1c1c1c !important;
}

body.woocommerce-account .uos-my-offers-table a:not(.button):not(.button.alt),
body.woocommerce-account .uos-my-offers-table a:visited:not(.button):not(.button.alt),
body.woocommerce-account .uos-portal .shop_table a:not(.button):not(.button.alt),
body.woocommerce-account .uos-portal .shop_table a:visited:not(.button):not(.button.alt) {
	color: #1c1c1c !important;
}

body.woocommerce-account .uos-my-offers-table a:not(.button):hover,
body.woocommerce-account .uos-my-offers-table a:not(.button):focus,
body.woocommerce-account .uos-portal .shop_table a:not(.button):hover,
body.woocommerce-account .uos-portal .shop_table a:not(.button):focus {
	color: #cc8729 !important;
}

body.woocommerce-account .uos-my-offers__countdown,
body.woocommerce-account .uos-my-offers__countdown-label,
body.woocommerce-account .uos-my-offers__conv-status,
body.woocommerce-account .uos-conv,
body.woocommerce-account .uos-conv__header,
body.woocommerce-account .uos-conv__bubble,
body.woocommerce-account .uos-conv__empty,
body.woocommerce-account .uos-product-grid__title,
body.woocommerce-account .uos-product-grid__price,
body.woocommerce-account .uos-product-grid__item a,
body.woocommerce-account .uos-product-grid__item a:visited,
body.woocommerce-account .uos-notif-list__item,
body.woocommerce-account .uos-notif-list__item a,
body.woocommerce-account .uos-notif-dropdown__item a {
	color: #1c1c1c !important;
}

body.woocommerce-account .uos-product-grid__item a:hover .uos-product-grid__title,
body.woocommerce-account .uos-product-grid__item a:focus .uos-product-grid__title {
	color: #cc8729 !important;
}

body.woocommerce-account .uos-conv__status--open {
	color: #15803d !important;
}

body.woocommerce-account .uos-conv__status--closed {
	color: #6b7280 !important;
}

/* Preserve status badge + unread pill contrast (white on colored ground) */
body.woocommerce-account .uos-my-offers .uos-status,
body.woocommerce-account .uos-badge,
body.woocommerce-account .uos-notif-bell__count {
	color: #fff !important;
}

/*
 * My Offers table — dense marketplace layout (Tasks 26–27).
 * Scoped to .uos-my-offers only; no workflow changes.
 */
.uos-my-offers .uos-my-offers-table {
	font-size: 12px;
	border-collapse: collapse;
}

.uos-my-offers .uos-my-offers-table thead th {
	padding: 5px 6px !important;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.uos-my-offers .uos-my-offers-table tbody td {
	padding: 4px 6px !important;
	font-size: 12px;
	line-height: 1.25;
	vertical-align: middle;
}

.uos-my-offers .uos-my-offers-table tbody tr:not(.uos-conv-row):not(.uos-invoice-row):not(.uos-shipment-row) td {
	height: auto;
}

.uos-my-offers .uos-my-offers-table tbody td a:not(.button) {
	font-size: 12px;
	line-height: 1.25;
}

.uos-my-offers .uos-my-offers__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	align-items: center;
	margin: 0;
}

.uos-my-offers .uos-my-offers__actions .button,
.uos-my-offers .uos-my-offers__actions a.button,
.uos-my-offers .uos-my-offers__actions button.button {
	min-height: 28px !important;
	height: 28px !important;
	line-height: 26px !important;
	padding: 0 8px !important;
	font-size: 11px !important;
	border-radius: 3px;
	box-sizing: border-box;
	margin: 0 !important;
}

.uos-my-offers .uos-my-offers__countdown-wrap {
	margin-bottom: 0.1rem;
}

.uos-my-offers .uos-my-offers__countdown,
.uos-my-offers .uos-my-offers__countdown-label {
	margin: 0;
	font-size: 11px;
	line-height: 1.25;
}

.uos-my-offers .uos-invoice-pending-label,
.uos-my-offers .uos-invoice-ready-label {
	display: block;
	margin: 0 0 2px;
	font-size: 11px;
	line-height: 1.25;
}

.uos-my-offers .uos-my-offers__conv-status {
	margin: 3px 0 0;
	padding: 0;
	font-size: 10.5px;
	line-height: 1.25;
}

.uos-my-offers .uos-my-offers__conv-status-label {
	display: block;
	font-weight: 600;
	margin: 0;
	line-height: 1.2;
}

.uos-my-offers .uos-my-offers__conv-status-value {
	display: block;
	font-weight: 400;
	margin: 0;
	line-height: 1.2;
}

body.woocommerce-account .uos-my-offers .uos-my-offers__conv-status,
body.woocommerce-account .uos-my-offers .uos-my-offers__conv-status-label,
body.woocommerce-account .uos-my-offers .uos-my-offers__conv-status-value {
	color: #5c574f !important;
}

.uos-offers-filters {
	margin: 0 0 1.25rem;
	padding: 12px;
	background: #fffdf8;
	border: 1px solid #e7e0d6;
}

.uos-offers-filters__status {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.uos-offers-filters__search {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: flex-end;
}

.uos-offers-filters__search label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
}

.uos-product-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
}

.uos-product-grid__item {
	border: 1px solid #e5e5e5;
	background: #fff;
	padding: 10px;
}

.uos-product-grid__item img {
	display: block;
	width: 100%;
	height: auto;
}

.uos-product-grid__title {
	display: block;
	margin-top: 8px;
	font-weight: 600;
	color: #1c1c1c;
	text-decoration: none;
}

.uos-product-grid__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.uos-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 16px 0;
}

.uos-notif-bell-wrap {
	display: flex;
	justify-content: flex-end;
	margin: 0 0 12px;
	position: relative;
}

.uos-notif-bell {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid #e5e5e5;
	background: #fff;
	text-decoration: none;
}

.uos-notif-bell__icon {
	display: block;
	width: 14px;
	height: 14px;
	border: 2px solid var(--uos-gold, #cc8729);
	border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
	position: relative;
}

.uos-notif-bell__icon::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -5px;
	width: 8px;
	height: 3px;
	margin-left: -4px;
	background: var(--uos-gold, #cc8729);
	border-radius: 2px;
}

.uos-notif-bell__count {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 18px;
	text-align: center;
}

.uos-notif-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.uos-notif-list__item {
	border: 1px solid #e5e5e5;
	background: #fff;
	margin: 0 0 8px;
	padding: 12px;
}

.uos-notif-list__item.is-unread {
	border-left: 3px solid var(--uos-gold, #cc8729);
	background: #fffdf8;
}

.uos-notif-list__item a {
	display: grid;
	gap: 4px;
	text-decoration: none;
	color: inherit;
}

.uos-notif-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
}

.uos-saved-searches__form {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 10px;
	align-items: end;
	margin: 0 0 1.25rem;
	padding: 12px;
	border: 1px solid #e7e0d6;
	background: #fff;
}

.uos-saved-searches__form label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
}

.uos-comm-prefs {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.uos-comm-prefs li {
	margin: 0 0 6px;
}

.uos-watch-btn.is-watching {
	/* Keep brand accent only when actively watching — retain site button shape/padding. */
	background: var(--uos-gold, #cc8729) !important;
	border-color: var(--uos-gold, #cc8729) !important;
	color: #fff !important;
}

.uos-notif-search-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 16px;
	align-items: center;
}

.uos-notif-dropdown {
	position: absolute;
	right: 0;
	top: 44px;
	z-index: 30;
	width: min(360px, 92vw);
	max-height: 380px;
	overflow: auto;
	background: #fff;
	border: 1px solid #e5e5e5;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	padding: 10px;
}

.uos-notif-dropdown__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.uos-notif-dropdown__item {
	border-bottom: 1px solid #f0ebe3;
	padding: 8px 4px;
}

.uos-notif-dropdown__item.is-unread {
	background: #fffdf8;
}

.uos-notif-dropdown__item a {
	display: grid;
	gap: 2px;
	text-decoration: none;
	color: inherit;
	font-size: 13px;
}

.uos-notif-dropdown__all {
	display: block;
	text-align: center;
	margin-top: 8px;
	font-weight: 600;
	color: var(--uos-gold, #cc8729);
}

.uos-comm-prefs-table th,
.uos-comm-prefs-table td {
	text-align: left;
	vertical-align: middle;
}

/* Active invoice cart lock */
.uos-invoice-cart-notice {
	margin-bottom: 1.25em;
}

.uos-invoice-cart-notice__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	margin: 0.75em 0 0;
}

.uos-invoice-cart-notice__countdown {
	white-space: nowrap;
}

.uos-invoice-qty-locked {
	display: inline-block;
	min-width: 2em;
	text-align: center;
	font-weight: 600;
}

.woocommerce-cart-form .uos-invoice-cart-locked .product-remove a,
.woocommerce-cart-form .cart_item .product-remove:empty {
	visibility: hidden;
	pointer-events: none;
}

@media (max-width: 640px) {
	.uos-saved-searches__form {
		grid-template-columns: 1fr;
	}
}
