.lahdenpantti-auction-panel {
	margin: 1.5em 0;
	padding: 1em 1.25em;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fafafa;
}

.lahdenpantti-auction-panel__meta {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.25em 1em;
	margin: 0;
}

.lahdenpantti-auction-panel__meta dt {
	font-weight: 600;
	margin: 0;
}

.lahdenpantti-auction-panel__meta dd {
	margin: 0;
}

.lahdenpantti-auction-panel__removed {
	color: #b32d2e;
	font-weight: 600;
}

.lahdenpantti-bid-form {
	margin-top: 1em;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
	align-items: flex-end;
}

.lahdenpantti-bid-form label {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

.lahdenpantti-bid-form input[type="number"],
.lahdenpantti-proxy-form input[type="number"] {
	-moz-appearance: textfield;
	appearance: textfield;
}

.lahdenpantti-bid-form input[type="number"]::-webkit-outer-spin-button,
.lahdenpantti-bid-form input[type="number"]::-webkit-inner-spin-button,
.lahdenpantti-proxy-form input[type="number"]::-webkit-outer-spin-button,
.lahdenpantti-proxy-form input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.lahdenpantti-bid-message.is-success {
	color: #007017;
}

.lahdenpantti-bid-message.is-error {
	color: #b32d2e;
}

.lahdenpantti-proxy-message.is-success {
	color: #007017;
}

.lahdenpantti-proxy-message.is-error {
	color: #b32d2e;
}

.lahdenpantti-outbid-notification {
	margin: 0.75em 0 0;
	padding: 0.5em 0.75em;
	border-left: 3px solid #dba617;
	background: #fff8e5;
}

@media (max-width: 600px) {
	.lahdenpantti-bid-form,
	.lahdenpantti-proxy-form {
		flex-direction: column;
		align-items: stretch;
	}

	.lahdenpantti-bid-history__table {
		font-size: 0.85rem;
	}

	.lahdenpantti-bid-history__table th,
	.lahdenpantti-bid-history__table td {
		padding: 0.35em 0.4em;
	}
}

.lahdenpantti-bid-history {
	margin-top: 1.5em;
}

.lahdenpantti-bid-history__scroll {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	touch-action: pan-x pan-y;
}

.lahdenpantti-bid-history__table {
	width: 100%;
	min-width: 0;
	border-collapse: collapse;
	font-size: 0.9rem;
	table-layout: fixed;
}

.lahdenpantti-bid-history__table th,
.lahdenpantti-bid-history__table td {
	padding: 0.4em 0.6em;
	border-bottom: 1px solid #e0e0e0;
	text-align: left;
	vertical-align: top;
}

.lahdenpantti-bid-history__table th:nth-child(1),
.lahdenpantti-bid-history__table td:nth-child(1) {
	width: 30%;
}

.lahdenpantti-bid-history__table th:nth-child(2),
.lahdenpantti-bid-history__table td:nth-child(2),
.lahdenpantti-bid-history__bidder {
	width: 28%;
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
}

.lahdenpantti-bid-history__table th:nth-child(3),
.lahdenpantti-bid-history__table td:nth-child(3),
.lahdenpantti-bid-history__amount {
	width: 22%;
	white-space: nowrap;
}

.lahdenpantti-bid-history__table th:nth-child(4),
.lahdenpantti-bid-history__table td:nth-child(4),
.lahdenpantti-bid-history__type {
	width: 20%;
	white-space: nowrap;
}

.lahdenpantti-auction-panel__winner,
.lahdenpantti-auction-panel__winning {
	font-weight: 600;
	color: #007017;
}

.lahdenpantti-proxy-form {
	margin-top: 1.25em;
	padding-top: 1em;
	border-top: 1px solid #e0e0e0;
}

.lahdenpantti-proxy-form__title {
	margin: 0 0 0.5em;
	font-size: 1rem;
}

.lahdenpantti-proxy-form__note {
	margin: 0 0 0.75em;
	font-size: 0.9rem;
	color: #555;
}

.lahdenpantti-proxy-form__current {
	margin: 0 0 0.85em;
	font-size: 0.95rem;
}

.lahdenpantti-proxy-form__current-label {
	font-weight: 600;
}

.lahdenpantti-my-proxy-max {
	font-weight: 600;
}

.lahdenpantti-my-proxy-max__none {
	font-weight: 400;
	color: #666;
}

.lahdenpantti-proxy-form label {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
	margin-bottom: 0.75em;
}

.lahdenpantti-proxy-message.is-success {
	color: #007017;
}

.lahdenpantti-proxy-message.is-error {
	color: #b32d2e;
}

.lahdenpantti-current-price.is-updated {
	animation: lahdenpantti-price-flash 1.2s ease;
}

@keyframes lahdenpantti-price-flash {
	0% {
		background-color: #fff3cd;
	}
	100% {
		background-color: transparent;
	}
}

.lahdenpantti-outbid-notification {
	margin: 0.75em 0 0;
	padding: 0.65em 0.85em;
	border-left: 3px solid #b32d2e;
	background: #fff4f4;
	color: #8a2424;
	font-weight: 600;
}

.lahdenpantti-pickup-only-shipping-notice .woocommerce-info {
	margin: 0 0 1em;
}

body.lahdenpantti-locked-winner-cart .woocommerce-cart-form .product-remove,
body.lahdenpantti-locked-winner-cart .woocommerce-cart-form .product-quantity .quantity,
body.lahdenpantti-locked-winner-cart .woocommerce-cart-form button[name="update_cart"],
body.lahdenpantti-locked-winner-cart .woocommerce-cart-form .actions,
body.lahdenpantti-locked-winner-cart .cart-collaterals .coupon,
body.lahdenpantti-locked-winner-cart .wc-block-cart-item__remove-link,
body.lahdenpantti-locked-winner-cart .wc-block-components-quantity-selector,
body.lahdenpantti-locked-winner-cart .wc-block-cart__submit-container .wc-block-components-button:not(.wc-block-cart__submit-button) {
	display: none !important;
}

body.lahdenpantti-locked-winner-cart .woocommerce-checkout-review-order-table .product-remove,
body.lahdenpantti-locked-winner-cart .woocommerce-checkout-review-order-table .product-quantity .quantity {
	display: none !important;
}

/* Block themes may ignore classic remove_action; auction products use bidding instead. */
body.lahdenpantti-is-auction-product form.cart,
body.lahdenpantti-is-auction-product .wp-block-add-to-cart-form,
body.lahdenpantti-is-auction-product .wc-block-add-to-cart-form {
	display: none !important;
}

/* Shop/category loop cards */
.lahdenpantti-loop-auction__image-wrap {
	position: relative;
	display: block;
	overflow: visible;
}

.products .product:has(.lahdenpantti-loop-auction__ended-badge) .woocommerce-loop-product__link,
.products .product:has(.lahdenpantti-loop-auction__removed-badge) .woocommerce-loop-product__link,
.wc-block-product-template .wc-block-product:has(.lahdenpantti-loop-auction__ended-badge) a,
.wc-block-product-template .wc-block-product:has(.lahdenpantti-loop-auction__removed-badge) a {
	overflow: visible;
}

.lahdenpantti-loop-auction__ended-badge,
.lahdenpantti-loop-auction__removed-badge {
	position: absolute;
	top: 22px;
	left: -38px;
	z-index: 3;
	display: block;
	width: 150px;
	padding: 0.4rem 0;
	background: #c62828;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-align: center;
	text-transform: uppercase;
	transform: rotate(-45deg);
	transform-origin: center center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	pointer-events: none;
}

.lahdenpantti-loop-auction__removed-badge {
	background: #5d4037;
}

.lahdenpantti-loop-auction__header {
	margin: 0 0 0.5rem;
	font-size: 0.85rem;
	color: #555;
}

.lahdenpantti-loop-auction__status,
.lahdenpantti-loop-auction__ends {
	display: block;
}

.lahdenpantti-loop-auction__status {
	font-weight: 600;
	color: #333;
}

.lahdenpantti-loop-auction__price {
	margin: 0.35rem 0 0.75rem;
}

.lahdenpantti-loop-auction__label,
.lahdenpantti-loop-auction__bid-count {
	margin: 0 0 0.15rem;
	font-size: 0.85rem;
	color: #666;
}

.lahdenpantti-loop-auction__amount {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
}

.lahdenpantti-loop-auction__amount .woocommerce-Price-amount {
	font-weight: inherit;
}

.lahdenpantti-loop-auction__show {
	display: inline-block;
	margin-top: 0.25rem;
}

.lahdenpantti-winning-bids-table {
	margin: 0;
}

.lahdenpantti-account-identity-note {
	margin: 0 0 1.25em;
	padding: 0.75em 1em;
	border-left: 3px solid #555;
	background: #f5f5f5;
	color: #333;
	font-size: 0.95rem;
	line-height: 1.45;
}

.woocommerce-EditAccountForm .lahdenpantti-account-field--locked input.input-text,
.woocommerce-EditAccountForm .lahdenpantti-account-field--locked input[readonly] {
	background-color: #f0f0f0;
	color: #555;
	cursor: not-allowed;
}
