/**
 * Notices WooCommerce — toasts Ride On 2026 (calque DEV).
 * Toast = messages dans `.woocommerce-notices-wrapper`.
 * Les infos login / code promo checkout restent des bandeaux inline.
 */

.woocommerce-notices-wrapper {
	position: fixed;
	top: auto;
	/* Pas de 100vw (iOS) : ancrage gauche+droite évite le débord à droite. */
	right: max(1rem, env(safe-area-inset-right, 0px));
	bottom: max(1rem, env(safe-area-inset-bottom, 0px));
	left: max(1rem, env(safe-area-inset-left, 0px));
	width: auto;
	max-width: 24rem;
	margin: 0 0 0 auto; /* colle à droite sur desktop, sans dépasser left/right */
	z-index: 100000;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.55rem;
	pointer-events: none;
	box-sizing: border-box;
}

/* Mon compte / merci : le wrapper reste dans le flux (bandeaux), pas toast fixed. */
body.woocommerce-account .woocommerce-notices-wrapper,
body.woocommerce-order-received .woocommerce-notices-wrapper {
	position: static;
	right: auto;
	bottom: auto;
	max-width: none;
	width: 100%;
	align-items: stretch;
	pointer-events: auto;
	z-index: auto;
}

.woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-notice,
body.woocommerce-checkout > .woocommerce-error,
body.woocommerce-checkout .woocommerce > .woocommerce-error,
body.woocommerce-cart .woocommerce > .woocommerce-error,
body.woocommerce-checkout form.checkout > .woocommerce-error {
	list-style: none !important;
	margin: 0 !important;
	padding: 0.85rem 1rem !important;
	display: flex !important;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 0.75rem;
	flex-wrap: nowrap;
	width: auto;
	max-width: 100%;
	pointer-events: all;
	border-radius: 14px !important;
	border: 0 !important;
	background: var(--black-pure, #0b0b0b) !important;
	color: #fff !important;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
	font-family: var(--font-main, "Space Grotesk", system-ui, sans-serif) !important;
	font-size: 0.9rem !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	letter-spacing: -0.01em;
}

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-notice {
	align-items: center;
}

.woocommerce-notices-wrapper .woocommerce-error,
body.woocommerce-checkout > .woocommerce-error,
body.woocommerce-checkout .woocommerce > .woocommerce-error,
body.woocommerce-cart .woocommerce > .woocommerce-error,
body.woocommerce-checkout form.checkout > .woocommerce-error {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	padding-left: 1.85rem !important;
	position: relative;
}

.woocommerce-notices-wrapper .woocommerce-error li,
body.woocommerce-checkout .woocommerce-error li,
body.woocommerce-cart .woocommerce-error li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	color: #fff !important;
	font-size: 0.88rem !important;
	line-height: 1.4 !important;
}

.woocommerce-notices-wrapper .woocommerce-message::before,
.woocommerce-notices-wrapper .woocommerce-info::before,
.woocommerce-notices-wrapper .woocommerce-notice::before,
.woocommerce-notices-wrapper .woocommerce-error::before,
body.woocommerce-checkout > .woocommerce-error::before,
body.woocommerce-checkout .woocommerce > .woocommerce-error::before,
body.woocommerce-cart .woocommerce > .woocommerce-error::before,
body.woocommerce-checkout form.checkout > .woocommerce-error::before {
	content: "" !important;
	flex: 0 0 auto;
	width: 0.55rem !important;
	height: 0.55rem !important;
	border-radius: 100px !important;
	background: var(--electric-lime, #e9ff00) !important;
	box-shadow: 0 0 0 3px rgba(233, 255, 0, 0.18) !important;
	position: static !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 0 !important;
	line-height: 0 !important;
	speak: none;
}

.woocommerce-notices-wrapper .woocommerce-error::before,
body.woocommerce-checkout > .woocommerce-error::before,
body.woocommerce-checkout .woocommerce > .woocommerce-error::before,
body.woocommerce-cart .woocommerce > .woocommerce-error::before,
body.woocommerce-checkout form.checkout > .woocommerce-error::before {
	background: #ff3b30 !important;
	box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.2) !important;
	position: absolute !important;
	top: 1.05rem;
	left: 0.95rem;
}

.woocommerce-notices-wrapper .woocommerce-message a,
.woocommerce-notices-wrapper .woocommerce-info a,
.woocommerce-notices-wrapper .woocommerce-error a,
.woocommerce-notices-wrapper .woocommerce-notice a,
body.woocommerce-checkout .woocommerce-error a,
body.woocommerce-cart .woocommerce-error a {
	color: var(--electric-lime, #e9ff00) !important;
	font-weight: 700 !important;
	text-decoration: none !important;
}

.woocommerce-notices-wrapper .woocommerce-message .button,
.woocommerce-notices-wrapper .woocommerce-info .button {
	float: none !important;
	margin: 0 0 0 auto !important;
	min-height: 34px;
	border-radius: 100px !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	background: rgba(255, 255, 255, 0.08) !important;
	color: #fff !important;
	font-size: 0.75rem !important;
	letter-spacing: 0.04em;
	text-transform: none !important;
	padding: 7px 12px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	flex-shrink: 0;
}

.woocommerce-notices-wrapper .woocommerce-message .button:hover,
.woocommerce-notices-wrapper .woocommerce-info .button:hover {
	background: rgba(255, 255, 255, 0.14) !important;
	color: #fff !important;
}

.woocommerce-notice__dismiss,
.rideon-woo-notice-dismiss {
	appearance: none;
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.72);
	cursor: pointer;
	font-size: 1.15rem;
	line-height: 1;
	padding: 0.15rem 0.2rem;
	margin-left: auto;
	flex-shrink: 0;
}

.woocommerce-notices-wrapper .woocommerce-error .rideon-woo-notice-dismiss {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	margin: 0;
}

.woocommerce-notice__dismiss:hover,
.rideon-woo-notice-dismiss:hover {
	color: #fff;
}

/* Login : lien compact (pas bandeau / pas toast) */
body.woocommerce-checkout .woocommerce-form-login-toggle .woocommerce-info {
	position: static !important;
	display: block !important;
	width: auto !important;
	max-width: 36rem !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: rgba(0, 0, 0, 0.62) !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	pointer-events: all !important;
	font-size: 0.9rem !important;
	font-weight: 500 !important;
	text-align: left !important;
}

body.woocommerce-checkout .woocommerce-form-login-toggle .woocommerce-info::before {
	display: none !important;
	content: none !important;
}

body.woocommerce-checkout .woocommerce-form-login-toggle .woocommerce-info a {
	color: #0b0b0b !important;
	font-weight: 700 !important;
	text-decoration: underline !important;
	text-underline-offset: 0.15em;
}

body.woocommerce-checkout .woocommerce-form-coupon-toggle,
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
	display: none !important;
}

@media (max-width: 782px) {
	.woocommerce-notices-wrapper {
		top: calc(var(--site-top-offset, 80px) + 0.5rem);
		bottom: auto;
		left: max(0.75rem, env(safe-area-inset-left, 0px));
		right: max(0.75rem, env(safe-area-inset-right, 0px));
		width: auto;
		max-width: none;
		margin: 0;
		align-items: stretch;
		box-sizing: border-box;
	}

	.woocommerce-notices-wrapper .woocommerce-message,
	.woocommerce-notices-wrapper .woocommerce-info,
	.woocommerce-notices-wrapper .woocommerce-error,
	.woocommerce-notices-wrapper .woocommerce-notice,
	body.woocommerce-checkout > .woocommerce-error,
	body.woocommerce-checkout .woocommerce > .woocommerce-error,
	body.woocommerce-cart .woocommerce > .woocommerce-error,
	body.woocommerce-checkout form.checkout > .woocommerce-error {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
		overflow-wrap: anywhere;
	}
}
