.wcpa-auction-box {
	--wcpa-accent: #6d28d9;
	--wcpa-accent-dark: #4c1d95;
	--wcpa-success: #15803d;
	--wcpa-success-bg: #f0fdf4;
	--wcpa-error: #b91c1c;
	--wcpa-error-bg: #fef2f2;
	--wcpa-border: #e6e1f2;
	--wcpa-bg: #ffffff;
	--wcpa-bg-soft: #faf8fd;
	--wcpa-text: #1f1533;
	--wcpa-text-muted: #6b6478;

	max-width: 460px;
	margin-top: 18px;
	background: var(--wcpa-bg);
	border: 1px solid var(--wcpa-border);
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(20, 10, 40, 0.04), 0 8px 24px rgba(20, 10, 40, 0.06);
	overflow: hidden;
	font-size: 14px;
	color: var(--wcpa-text);
}

@media ( prefers-color-scheme: dark ) {
	.wcpa-auction-box {
		--wcpa-border: #322a44;
		--wcpa-bg: #1c1626;
		--wcpa-bg-soft: #241b32;
		--wcpa-text: #f1edf9;
		--wcpa-text-muted: #a89fbb;
		--wcpa-success-bg: #0f2318;
		--wcpa-error-bg: #2a1414;
	}
}

.wcpa-auction-box * {
	box-sizing: border-box;
}

.wcpa-auction-box p {
	margin: 0;
}

/* ---------------------------------------------------------------- */
/* Header: badge di stato + countdown                                */
/* ---------------------------------------------------------------- */

.wcpa-box-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 20px;
	background: linear-gradient(135deg, var(--wcpa-accent), var(--wcpa-accent-dark));
	color: #fff;
}

.wcpa-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
}

.wcpa-badge::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #4ade80;
}

.wcpa-badge-closed {
	background: rgba(255, 255, 255, 0.14);
}

.wcpa-badge-closed::before {
	background: #f87171;
}

.wcpa-countdown {
	text-align: right;
	line-height: 1.25;
}

.wcpa-countdown-label {
	display: block;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.8;
}

.wcpa-countdown-value {
	display: block;
	font-size: 16px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.wcpa-countdown-value.wcpa-countdown-urgent {
	color: #fecaca;
	animation: wcpa-pulse 1.1s ease-in-out infinite;
}

.wcpa-countdown-ended {
	font-size: 15px;
	font-weight: 700;
}

@keyframes wcpa-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.55; }
}

/* ---------------------------------------------------------------- */
/* Offerta in evidenza                                                */
/* ---------------------------------------------------------------- */

.wcpa-bid-highlight {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
	padding: 18px 20px 14px;
	background: var(--wcpa-bg-soft);
	border-bottom: 1px solid var(--wcpa-border);
}

.wcpa-bid-highlight-label {
	display: block;
	font-size: 12px;
	color: var(--wcpa-text-muted);
	margin-bottom: 2px;
}

.wcpa-bid-highlight-amount {
	display: block;
	font-size: 26px;
	font-weight: 800;
	color: var(--wcpa-text);
	border-radius: 4px;
	transition: background-color 300ms ease;
}

.wcpa-bid-highlight-amount .amount {
	font-weight: 800;
}

.wcpa-flash {
	background-color: #fef08a;
}

.wcpa-bid-count-pill {
	flex-shrink: 0;
	font-size: 11px;
	font-weight: 600;
	color: var(--wcpa-accent-dark);
	background: #efe7fb;
	padding: 5px 10px;
	border-radius: 999px;
	white-space: nowrap;
}

@media ( prefers-color-scheme: dark ) {
	.wcpa-bid-count-pill {
		background: #3a2d55;
		color: #d8c8fa;
	}
}

/* ---------------------------------------------------------------- */
/* Form offerta                                                       */
/* ---------------------------------------------------------------- */

.wcpa-bid-form-wrap {
	padding: 16px 20px 4px;
}

.wcpa-bid-form label {
	display: block;
	font-weight: 600;
	font-size: 12px;
	margin-bottom: 6px;
	color: var(--wcpa-text-muted);
}

.wcpa-bid-form-row {
	display: flex;
	gap: 8px;
}

.wcpa-input-prefix {
	position: relative;
	flex: 1;
	min-width: 0;
}

.wcpa-input-prefix-symbol {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--wcpa-text-muted);
	font-weight: 600;
	pointer-events: none;
}

.wcpa-bid-form input[type="number"] {
	width: 100%;
	padding: 10px 12px 10px 28px;
	border: 1px solid var(--wcpa-border);
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	background: var(--wcpa-bg);
	color: var(--wcpa-text);
}

.wcpa-bid-form input[type="number"]:focus {
	outline: none;
	border-color: var(--wcpa-accent);
	box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.15);
}

.wcpa-submit-bid {
	flex-shrink: 0;
	border: none;
	border-radius: 8px;
	padding: 10px 18px;
	background: var(--wcpa-accent);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 150ms ease, transform 100ms ease;
}

.wcpa-submit-bid:hover:not([disabled]) {
	background: var(--wcpa-accent-dark);
}

.wcpa-submit-bid:active:not([disabled]) {
	transform: scale(0.97);
}

.wcpa-submit-bid[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

.wcpa-min-note {
	font-size: 12px;
	color: var(--wcpa-text-muted);
	margin-top: 8px;
}

.wcpa-min-note strong {
	color: var(--wcpa-text);
}

.wcpa-bid-feedback {
	font-size: 13px;
	font-weight: 600;
	margin-top: 10px;
	min-height: 1.3em;
	border-radius: 6px;
}

.wcpa-bid-feedback:not(:empty) {
	padding: 8px 10px;
}

.wcpa-bid-feedback.wcpa-success {
	color: var(--wcpa-success);
	background: var(--wcpa-success-bg);
}

.wcpa-bid-feedback.wcpa-error {
	color: var(--wcpa-error);
	background: var(--wcpa-error-bg);
}

.wcpa-login-notice {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--wcpa-bg-soft);
	border: 1px solid var(--wcpa-border);
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 12px;
}

.wcpa-login-notice-icon {
	font-size: 18px;
	line-height: 1;
}

.wcpa-login-notice span:nth-child(2) {
	flex: 1;
	color: var(--wcpa-text-muted);
}

.wcpa-login-button {
	flex-shrink: 0;
	background: var(--wcpa-accent);
	color: #fff !important;
	text-decoration: none;
	font-weight: 700;
	font-size: 13px;
	padding: 7px 14px;
	border-radius: 7px;
	transition: background-color 150ms ease;
}

.wcpa-login-button:hover {
	background: var(--wcpa-accent-dark);
	color: #fff;
}

.wcpa-winner-note {
	font-weight: 700;
	background: #fffbeb;
	color: #92400e;
	border: 1px solid #fde68a;
	border-radius: 8px;
	padding: 10px 12px;
	margin-bottom: 12px;
}

@media ( prefers-color-scheme: dark ) {
	.wcpa-winner-note {
		background: #2b2107;
		color: #fcd34d;
		border-color: #4a3a0d;
	}
}

/* ---------------------------------------------------------------- */
/* Ultime offerte                                                     */
/* ---------------------------------------------------------------- */

.wcpa-last-bids {
	padding: 14px 20px 18px;
}

.wcpa-section-title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--wcpa-text-muted);
	margin-bottom: 8px;
}

.wcpa-last-bids ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcpa-last-bids li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 0;
	border-top: 1px solid var(--wcpa-border);
}

.wcpa-last-bids li:first-child {
	border-top: none;
}

.wcpa-avatar {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--wcpa-accent);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wcpa-bidder-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
}

.wcpa-bid-amount {
	flex-shrink: 0;
	font-weight: 700;
	font-size: 13px;
}

.wcpa-bid-time {
	flex-shrink: 0;
	color: var(--wcpa-text-muted);
	font-size: 11px;
	white-space: nowrap;
	width: 72px;
	text-align: right;
}

.wcpa-no-bids {
	color: var(--wcpa-text-muted);
	font-style: italic;
	border-top: none !important;
}
