/* PinkAgent — Frontend styles */

.ppr-pricing-table {
	width: 100%;
	margin: 1rem 0 1.5rem;
}

/* Setting-hidden table: !important because updatePricingTable()'s
   $table.show() writes INLINE display and would defeat a plain rule. */
.ppr-pricing-table--display-off {
	display: none !important;
}

/* VAT toggle relocated out of the setting-hidden wrapper. */
.ppr-vat-toggle-standalone {
	margin: 0 0 1rem;
}

.ppr-pricing-table__title {
	margin: 0 0 0.5rem;
	font-size: 1em;
	font-weight: 600;
}

.ppr-pricing-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.ppr-pricing-table thead th {
	text-align: left;
	padding: 0.5rem 0.75rem;
	border-bottom: 2px solid #ddd;
	font-weight: 600;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #555;
}

.ppr-pricing-table thead th .ppr-price-th-vat {
	margin-left: 0.35em;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: #888;
}

.ppr-pricing-table tbody .ppr-tier {
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.ppr-pricing-table tbody .ppr-tier td {
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid #eee;
}

.ppr-pricing-table tbody .ppr-tier:last-child td {
	border-bottom: none;
}

.ppr-pricing-table tbody .ppr-tier:hover {
	background-color: #f5f5f5;
}

.ppr-pricing-table tbody .ppr-tier.ppr-active {
	background-color: #f0f8ff;
	font-weight: 600;
}

.ppr-unit-price {
	font-weight: 600;
}

.ppr-savings {
	color: #4caf50;
	font-size: 0.85em;
	margin-left: 0.4em;
	font-weight: 400;
}

/* Loading indicator */
.ppr-pricing-table.ppr-loading {
	opacity: 0.6;
	pointer-events: none;
	position: relative;
}

.ppr-pricing-table.ppr-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #ddd;
	border-top-color: #333;
	border-radius: 50%;
	animation: ppr-spin 0.6s linear infinite;
}

@keyframes ppr-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Price display update area */
.ppr-dynamic-price {
	margin: 0.5rem 0;
	min-height: 1.5em;
}

/* Default range price shown in the variation area before a variation is selected. */
.ppr-variation-default-price {
	margin-bottom: 1rem;
	font-size: 1.25em;
}

.ppr-variation-default-price .price {
	color: inherit;
}

/* VAT toggle (Su PVM / Be PVM) — refined segmented control.
   Uses !important on state properties to defeat theme button bleed
   (themes such as Storefront/Astra/Flatsome restyle <button> globally,
   and frequently load CSS after plugin assets). */
.ppr-vat-toggle {
	display: inline-flex;
	align-items: stretch;
	gap: 2px;
	margin: 0 0 1rem;
	padding: 3px;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1;
}

/* Hard reset on every segment — kills theme background, gradients, shadows,
   transforms. Inactive base state lives here (gray-on-neutral track). */
.ppr-vat-toggle .ppr-vat-toggle__btn {
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	margin: 0 !important;
	border: 1px solid transparent !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	font: inherit;
	font-size: 13px !important;
	font-weight: 500 !important;
	color: #6b7280 !important;
	padding: 6px 14px !important;
	min-height: 30px;
	border-radius: 6px !important;
	cursor: pointer;
	transition: color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

/* Hover only on inactive segments — must stay subtler than the active fill */
.ppr-vat-toggle .ppr-vat-toggle__btn:hover:not(.is-active):not([aria-pressed="true"]) {
	color: #111827 !important;
	background: rgba(15, 23, 42, 0.05) !important;
}

/* Active segment — solid brand fill, white text. Visually unambiguous so it
   wins over any residual theme background that survives the reset. */
.ppr-vat-toggle .ppr-vat-toggle__btn.is-active,
.ppr-vat-toggle .ppr-vat-toggle__btn[aria-pressed="true"] {
	background: #e6447b !important;
	background-image: none !important;
	color: #ffffff !important;
	border-color: #e6447b !important;
	box-shadow: 0 1px 2px rgba(230, 68, 123, 0.25) !important;
}

.ppr-vat-toggle .ppr-vat-toggle__btn:focus { outline: 0 !important; }

.ppr-vat-toggle .ppr-vat-toggle__btn:focus-visible {
	outline: 2px solid #e6447b !important;
	outline-offset: 2px !important;
}

/* Phase 09 — cart/checkout option-choice thumbnail (classic render path only;
   see Product_Options_Frontend::display_item_data()). */
.ppr-option-thumb {
	max-width: 32px;
	height: auto;
	vertical-align: middle;
	margin-right: 6px;
	border-radius: 3px;
}

/* Responsive */
@media (max-width: 480px) {
	.ppr-pricing-table thead th,
	.ppr-pricing-table tbody .ppr-tier td {
		padding: 0.5rem;
		font-size: 0.9em;
	}

	.ppr-savings {
		display: block;
		margin-left: 0;
		margin-top: 0.2em;
	}

	.ppr-vat-toggle {
		display: flex;
		width: 100%;
	}

	.ppr-vat-toggle__btn {
		flex: 1;
		text-align: center;
	}
}

/* Raw variation price masked between WC writing it (found_variation) and the
   tier total overwriting it — prevents the stored base price (cheapest bulk
   rate) flashing. Generic class: the mask lands on whichever node the theme
   uses for the price (same fallback chain as the total writer). visibility
   keeps the slot, so nothing jumps; !important beats theme specificity. */
.ppr-price-pending {
	visibility: hidden !important;
}

/* Breakpoints-only quantity select (PDP + classic cart).
   PDP: a labelled full-width field following the attribute-row pattern
   (bold label line, full-width control below), spanning the whole purchase
   row so the add-to-cart button reflows onto its own clean line. */
.ppr-qty-breakpoint-field {
	flex: 0 0 100%;
	width: 100%;
	margin: 0 0 1rem 0;
}

/* The quantity field sits directly below the attribute rows, so the theme's
   own bottom spacing on the variations table (margin + last-row cell padding)
   would double up with the field's top margin — zero it and let the field's
   1.5rem top margin carry the attribute-row rhythm. Scoped to flagged forms. */
.ppr-breakpoints-active table.variations {
	margin-bottom: 0;
}

.ppr-breakpoints-active table.variations tbody tr:last-child th,
.ppr-breakpoints-active table.variations tbody tr:last-child td {
	padding-bottom: 0;
}

.ppr-qty-breakpoint-field__label {
	display: block;
	font-weight: 600;
}

.ppr-qty-breakpoint-field .ppr-qty-breakpoint-select {
	display: block;
	width: 100%;
	margin-top: 0.4rem;
	font-weight: 400;
}

/* Classic cart cell: compact, content-sized. */
.ppr-cart-qty-breakpoints .ppr-qty-breakpoint-select {
	min-width: 7em;
}

/* WooCommerce's "clear selection" link (Išvalyti): the module relocates it
   onto the min-order line, right-aligned and padding-free. WC toggles it via
   visibility (not display), so its slot there stays stable — the line never
   jumps when the link appears/disappears. */
.ppr-qty-limits-info--with-reset {
	display: flex;
	align-items: baseline;
	gap: 1rem;
}

.ppr-qty-limits-info--with-reset .reset_variations {
	margin: 0 0 0 auto;
	padding: 0;
	font-size: 0.9em;
}
