/**
 * RR Notices — Frontend
 * Version: 1.0.0
 *
 * Success  → toast fixed top-right (JS mută .woocommerce-message aici)
 * Info     → inline restilizat (rămâne în pagină — conține toggle-uri funcționale pe checkout)
 * Error    → inline restilizat (fără auto-dismiss, lângă formular)
 *
 * Fonturi: Inter / Cormorant Garamond — încărcate de Elementor Pro, fără @import.
 */

/* ══════════════════════════════════════════
   INLINE — restilizare .woocommerce-error / -info
   (și .woocommerce-message ca fallback fără JS)
══════════════════════════════════════════ */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
	background: #FFFFFF !important;
	border: 1px solid #ECECEC !important;
	border-left-width: 3px !important;
	border-radius: 0 !important;
	color: #1A1A1A !important;
	font-family: "Inter", sans-serif !important;
	font-size: .85rem;
	line-height: 1.55;
	letter-spacing: .01em;
	padding: 14px 18px 14px 44px !important;
	margin: 0 0 20px !important;
	position: relative;
	list-style: none !important;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
	word-wrap: break-word;
}

.woocommerce-error { border-left-color: #800020 !important; }
.woocommerce-info { border-left-color: #D9B382 !important; background: #F9F9F9 !important; }
.woocommerce-message { border-left-color: #D9B382 !important; }

/* Elimină iconițele default ale temelor/WooCommerce */
.woocommerce-error::before,
.woocommerce-info::before,
.woocommerce-message::before {
	content: "" !important;
	position: absolute;
	left: 18px;
	top: 17px;
	width: 14px;
	height: 14px;
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 14px 14px;
	font-family: inherit !important;
}

.woocommerce-error::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23800020' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
}

.woocommerce-info::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9B382' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
}

.woocommerce-message::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9B382' stroke-width='2'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* Liste de erori (checkout trimite <ul class="woocommerce-error"><li>…) */
.woocommerce-error li,
.woocommerce-info li,
.woocommerce-message li {
	list-style: none !important;
	margin: 0 0 6px !important;
	padding: 0 !important;
}
.woocommerce-error li:last-child,
.woocommerce-info li:last-child,
.woocommerce-message li:last-child { margin-bottom: 0 !important; }

/* Link-uri și butoane din notice-uri */
.woocommerce-error a:not(.button),
.woocommerce-info a:not(.button),
.woocommerce-message a:not(.button) {
	color: #800020 !important;
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 500;
}

.woocommerce-error .button,
.woocommerce-info .button,
.woocommerce-message .button {
	float: right;
	margin: -4px 0 0 16px;
	background: transparent !important;
	border: 1px solid #800020 !important;
	border-radius: 0 !important;
	color: #800020 !important;
	font-family: "Inter", sans-serif !important;
	font-size: .68rem !important;
	font-weight: 500 !important;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: 7px 14px !important;
	line-height: 1 !important;
	transition: all .2s ease;
}
.woocommerce-error .button:hover,
.woocommerce-info .button:hover,
.woocommerce-message .button:hover {
	background: #800020 !important;
	color: #FFFFFF !important;
}

/* ══════════════════════════════════════════
   TOAST CONTAINER + TOAST (success)
══════════════════════════════════════════ */
.rr-nt-toasts {
	position: fixed;
	top: 24px;
	right: 24px;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: min(340px, calc(100vw - 32px));
	pointer-events: none;
}

body.admin-bar .rr-nt-toasts { top: 56px; }

.rr-nt-toast {
	pointer-events: auto;
	position: relative;
	background: #1A1A1A;
	color: #FFFFFF;
	border-left: 2px solid #D9B382;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .22);
	padding: 13px 38px 15px 16px;
	display: flex;
	align-items: flex-start;
	gap: 11px;
	font-family: "Inter", sans-serif;
	font-size: .8rem;
	line-height: 1.5;
	overflow: hidden;
	transform: translateX(calc(100% + 32px));
	transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
	opacity: 1;
}

.rr-nt-toast.rr-nt-show { transform: translateX(0); }
.rr-nt-toast.rr-nt-hide { opacity: 0; transform: translateX(30px); }

.rr-nt-toast-check {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	border-radius: 50%;
	background: rgba(42, 157, 92, .18);
	display: flex;
	align-items: center;
	justify-content: center;
}
.rr-nt-toast-check svg {
	width: 10px;
	height: 10px;
	stroke: #2a9d5c;
	fill: none;
	stroke-width: 2.4;
}

.rr-nt-toast-body { flex: 1; min-width: 0; }

.rr-nt-toast-label {
	font-size: .56rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #D9B382;
	margin-bottom: 2px;
}

.rr-nt-toast-text {
	color: #FFFFFF;
	font-weight: 400;
	overflow-wrap: break-word;
}

.rr-nt-toast-text a {
	color: #D9B382;
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 500;
}
.rr-nt-toast-text a:hover { color: #FFFFFF; }

.rr-nt-toast-action {
	display: inline-block;
	margin-top: 7px;
	font-size: .62rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #D9B382 !important;
	text-decoration: none !important;
	border-bottom: 1px solid rgba(217, 179, 130, .45);
	padding-bottom: 1px;
	transition: all .2s ease;
}
.rr-nt-toast-action:hover {
	color: #FFFFFF !important;
	border-bottom-color: #FFFFFF;
}

.rr-nt-toast-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 22px;
	height: 22px;
	background: none;
	border: none;
	cursor: pointer;
	color: rgba(255, 255, 255, .45);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: color .2s ease;
}
.rr-nt-toast-close:hover { color: #FFFFFF; }
.rr-nt-toast-close svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Bara de progres auto-dismiss */
.rr-nt-toast-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 2px;
	width: 100%;
	background: #D9B382;
	transform-origin: left;
	animation: rr-nt-progress linear forwards;
}
.rr-nt-toast:hover .rr-nt-toast-progress { animation-play-state: paused; }

@keyframes rr-nt-progress {
	from { transform: scaleX(1); }
	to { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
	.rr-nt-toast { transition: opacity .2s ease; transform: none; }
	.rr-nt-toast.rr-nt-hide { transform: none; }
}

@media (max-width: 480px) {
	.rr-nt-toasts { top: 12px; right: 12px; left: 12px; max-width: none; }
}
