/**
 * Auction bid notices — contextual toasts beside the bidding panel.
 */

.biltmore-product-toasts {
	--bat-brand: var(--bap-brand, #ff2800);
	--bat-brand-soft: var(--bap-brand-soft, rgba(255, 40, 0, 0.08));
	--bat-brand-border: var(--bap-brand-border, rgba(255, 40, 0, 0.35));
	--bat-text: var(--bap-text, #0a0b0d);
	--bat-text-secondary: var(--bap-text-secondary, #5c6370);
	--bat-border: var(--bap-border, #e8eaed);
	--bat-success: var(--bap-success, #16a34a);
	--bat-success-soft: var(--bap-success-soft, rgba(22, 163, 74, 0.1));
	--bat-success-border: var(--bap-success-border, rgba(22, 163, 74, 0.22));
	--bat-danger-soft: var(--bap-danger-soft, rgba(255, 40, 0, 0.08));
	--bat-danger-border: var(--bap-danger-border, rgba(255, 40, 0, 0.18));
	--bat-info-soft: rgba(59, 130, 246, 0.08);
	--bat-info-border: rgba(59, 130, 246, 0.22);
	--bat-radius: 14px;
	--bat-shadow: 0 14px 36px rgba(10, 11, 13, 0.1), 0 2px 8px rgba(10, 11, 13, 0.05);
}

/* Mount point inside auction panel */
.bap-toast-stack,
.biltmore-auction-toast-mount {
	position: relative;
	z-index: 4;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: -6px 0 0;
	padding: 10px 14px 0;
}

.bap-toast-stack:empty,
.biltmore-auction-toast-mount:empty {
	display: none;
	margin: 0;
	padding: 0;
}

.bap-toast-stack .woocommerce-notices-wrapper,
.biltmore-auction-toast-mount .woocommerce-notices-wrapper {
	position: static !important;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	pointer-events: none;
}

.bap-toast-stack .woocommerce-notices-wrapper:empty,
.biltmore-auction-toast-mount .woocommerce-notices-wrapper:empty {
	display: none !important;
}

/* Legacy layout fallback — float above summary near bid form */
.biltmore-product-toasts .summary .biltmore-auction-toast-mount {
	margin: 0 0 14px;
	padding: 0;
}

.biltmore-product-toasts .summary .biltmore-auction-toast-mount .woocommerce-notices-wrapper {
	width: 100%;
}

.biltmore-auction-toast,
.bap-toast-stack .woocommerce-message,
.bap-toast-stack .woocommerce-info,
.bap-toast-stack .woocommerce-error,
.biltmore-auction-toast-mount .woocommerce-message,
.biltmore-auction-toast-mount .woocommerce-info,
.biltmore-auction-toast-mount .woocommerce-error {
	position: relative;
	pointer-events: auto;
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr);
	grid-template-rows: auto auto;
	grid-template-areas:
		"icon body"
		"progress progress";
	column-gap: 12px;
	row-gap: 0;
	align-items: start;
	width: 100%;
	margin: 0 !important;
	padding: 14px 42px 12px 14px !important;
	border-radius: var(--bat-radius) !important;
	border: 1px solid var(--bat-border) !important;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 251, 249, 0.98) 100%) !important;
	box-shadow: var(--bat-shadow) !important;
	font-size: 13px !important;
	font-weight: 600;
	line-height: 1.5 !important;
	color: var(--bat-text) !important;
	overflow: hidden;
	transform: translateY(-10px);
	opacity: 0;
	animation: biltmore-auction-toast-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.biltmore-auction-toast.is-success,
.bap-toast-stack .woocommerce-message,
.biltmore-auction-toast-mount .woocommerce-message {
	border-color: var(--bat-success-border) !important;
	background:
		linear-gradient(135deg, #ffffff 0%, #f6fcf8 100%) !important;
	box-shadow:
		0 14px 36px rgba(22, 163, 74, 0.1),
		0 0 0 1px rgba(22, 163, 74, 0.06) !important;
}

.biltmore-auction-toast.is-error,
.bap-toast-stack .woocommerce-error,
.biltmore-auction-toast-mount .woocommerce-error {
	border-color: var(--bat-danger-border) !important;
	background:
		linear-gradient(135deg, #ffffff 0%, #fff8f7 100%) !important;
	box-shadow:
		0 14px 36px rgba(255, 40, 0, 0.1),
		0 0 0 1px rgba(255, 40, 0, 0.05) !important;
}

.biltmore-auction-toast.is-info,
.bap-toast-stack .woocommerce-info,
.biltmore-auction-toast-mount .woocommerce-info {
	border-color: var(--bat-info-border) !important;
	background:
		linear-gradient(135deg, #ffffff 0%, #f7faff 100%) !important;
}

.bap-toast-stack .woocommerce-message::before,
.bap-toast-stack .woocommerce-info::before,
.bap-toast-stack .woocommerce-error::before,
.biltmore-auction-toast-mount .woocommerce-message::before,
.biltmore-auction-toast-mount .woocommerce-info::before,
.biltmore-auction-toast-mount .woocommerce-error::before {
	display: none !important;
}

.biltmore-auction-toast__icon {
	grid-area: icon;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	line-height: 1;
	flex-shrink: 0;
}

.biltmore-auction-toast.is-success .biltmore-auction-toast__icon,
.biltmore-auction-toast.biltmore-auction-toast--success .biltmore-auction-toast__icon {
	background: var(--bat-success-soft);
	color: var(--bat-success);
	border: 1px solid var(--bat-success-border);
}

.biltmore-auction-toast.is-error .biltmore-auction-toast__icon,
.biltmore-auction-toast.biltmore-auction-toast--error .biltmore-auction-toast__icon {
	background: var(--bat-danger-soft);
	color: var(--bat-brand);
	border: 1px solid var(--bat-danger-border);
}

.biltmore-auction-toast.is-info .biltmore-auction-toast__icon,
.biltmore-auction-toast.biltmore-auction-toast--info .biltmore-auction-toast__icon {
	background: var(--bat-info-soft);
	color: #2563eb;
	border: 1px solid var(--bat-info-border);
}

.biltmore-auction-toast__body {
	grid-area: body;
	min-width: 0;
	padding-top: 1px;
}

.biltmore-auction-toast__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 4px;
	font-size: 10px !important;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--bat-text-secondary);
}

.biltmore-auction-toast.is-success .biltmore-auction-toast__eyebrow,
.biltmore-auction-toast.biltmore-auction-toast--success .biltmore-auction-toast__eyebrow {
	color: var(--bat-success);
}

.biltmore-auction-toast.is-error .biltmore-auction-toast__eyebrow,
.biltmore-auction-toast.biltmore-auction-toast--error .biltmore-auction-toast__eyebrow {
	color: var(--bat-brand);
}

.biltmore-auction-toast__text {
	font-size: 13px !important;
	font-weight: 600;
	line-height: 1.5 !important;
	color: var(--bat-text) !important;
}

.biltmore-auction-toast__text p {
	margin: 0 !important;
}

.biltmore-auction-toast__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(10, 11, 13, 0.05);
	color: var(--bat-text-secondary);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.biltmore-auction-toast__close:hover {
	background: var(--bat-brand-soft);
	color: var(--bat-brand);
	transform: scale(1.04);
}

.biltmore-auction-toast__progress {
	grid-area: progress;
	position: relative;
	left: -14px;
	right: -14px;
	width: calc(100% + 28px);
	margin: 12px 0 -12px;
	height: 3px;
	background: rgba(10, 11, 13, 0.05);
	overflow: hidden;
}

.biltmore-auction-toast__progress span {
	display: block;
	height: 100%;
	width: 100%;
	transform-origin: left center;
	background: linear-gradient(90deg, #ff2800, #ff6b35);
	animation: biltmore-auction-toast-progress var(--biltmore-toast-duration, 10s) linear forwards;
}

.biltmore-auction-toast.is-success .biltmore-auction-toast__progress span,
.biltmore-auction-toast.biltmore-auction-toast--success .biltmore-auction-toast__progress span {
	background: linear-gradient(90deg, #16a34a, #22c55e);
}

.biltmore-auction-toast.is-error .biltmore-auction-toast__progress span,
.biltmore-auction-toast.biltmore-auction-toast--error .biltmore-auction-toast__progress span {
	background: linear-gradient(90deg, #ff2800, #ff6b35);
}

.biltmore-auction-toast.is-dismissed,
.bap-toast-stack .woocommerce-message.is-dismissed,
.bap-toast-stack .woocommerce-info.is-dismissed,
.bap-toast-stack .woocommerce-error.is-dismissed,
.biltmore-auction-toast-mount .woocommerce-message.is-dismissed,
.biltmore-auction-toast-mount .woocommerce-info.is-dismissed,
.biltmore-auction-toast-mount .woocommerce-error.is-dismissed {
	animation: biltmore-auction-toast-out 0.28s ease forwards;
}

@keyframes biltmore-auction-toast-in {
	from {
		transform: translateY(-10px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

@keyframes biltmore-auction-toast-out {
	from {
		transform: translateY(0);
		opacity: 1;
		max-height: 120px;
		margin-bottom: 0;
	}
	to {
		transform: translateY(-6px);
		opacity: 0;
		max-height: 0;
		margin-bottom: -10px;
	}
}

@keyframes biltmore-auction-toast-progress {
	from {
		transform: scaleX(1);
	}
	to {
		transform: scaleX(0);
	}
}

@media (max-width: 767px) {
	.bap-toast-stack,
	.biltmore-auction-toast-mount {
		padding-left: 12px;
		padding-right: 12px;
	}
}
