/**
 * EMPORAS — Global Notification Component
 *
 * Reusable success/error/warning/info messages across the site:
 *   - Login page errors
 *   - Registration form feedback
 *   - Contact form submission status
 *   - B2B dashboard alerts
 *   - WooCommerce notices (success, error, info)
 *   - Custom inline confirmations
 *
 * Usage in PHP/HTML:
 *   <div class="emporas-notice emporas-notice--success">
 *       <div class="emporas-notice__icon">✓ SVG here</div>
 *       <div class="emporas-notice__body">
 *           <strong class="emporas-notice__title">Επιτυχία!</strong>
 *           <p class="emporas-notice__text">Το μήνυμα στάλθηκε.</p>
 *       </div>
 *       <button class="emporas-notice__close" aria-label="Κλείσιμο">×</button>
 *   </div>
 *
 * Variants:
 *   --success  green
 *   --error    red
 *   --warning  amber
 *   --info     navy/blue
 *
 * @package EMPORAS
 * @since   1.6.7
 */

.emporas-notice {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	margin: 0 0 16px;
	border-radius: 10px;
	border: 1px solid transparent;
	font-family: var(--font-body, 'Inter', sans-serif);
	font-size: 14px;
	line-height: 1.5;
	position: relative;
	background: #ffffff;
}

/* Icon */
.emporas-notice__icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 1px;
}
.emporas-notice__icon svg {
	width: 22px;
	height: 22px;
	stroke-width: 2.2;
}

/* Body */
.emporas-notice__body {
	flex: 1;
	min-width: 0;
}
.emporas-notice__title {
	display: block;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.2px;
	margin: 0 0 2px;
}
.emporas-notice__text {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: inherit;
	opacity: 0.92;
}
.emporas-notice__text a {
	color: inherit;
	text-decoration: underline;
	font-weight: 600;
}

/* Close button (optional) */
.emporas-notice__close {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: inherit;
	opacity: 0.55;
	font-size: 20px;
	line-height: 1;
	padding: 0;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.15s ease, background 0.15s ease;
}
.emporas-notice__close:hover {
	opacity: 1;
	background: rgba(0, 0, 0, 0.06);
}

/* ============================================
   VARIANTS
   ============================================ */

/* Success — green */
.emporas-notice--success {
	background: #f0fdf4;
	border-color: #bbf7d0;
	color: #166534;
}
.emporas-notice--success .emporas-notice__icon {
	color: #16a34a;
}

/* Error — red */
.emporas-notice--error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}
.emporas-notice--error .emporas-notice__icon {
	color: #dc2626;
}

/* Warning — amber */
.emporas-notice--warning {
	background: #fffbeb;
	border-color: #fde68a;
	color: #92400e;
}
.emporas-notice--warning .emporas-notice__icon {
	color: #f59e0b;
}

/* Info — navy */
.emporas-notice--info {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: var(--emporas-navy, #1e2a5e);
}
.emporas-notice--info .emporas-notice__icon {
	color: var(--emporas-navy, #1e2a5e);
}

/* ============================================
   STYLE VARIANTS
   ============================================ */

/* Compact — for inline form errors */
.emporas-notice--compact {
	padding: 10px 12px;
	font-size: 13px;
	gap: 8px;
}
.emporas-notice--compact .emporas-notice__icon {
	width: 18px;
	height: 18px;
}
.emporas-notice--compact .emporas-notice__icon svg {
	width: 16px;
	height: 16px;
}

/* Solid — strong attention */
.emporas-notice--solid.emporas-notice--success {
	background: #16a34a;
	border-color: #16a34a;
	color: #ffffff;
}
.emporas-notice--solid.emporas-notice--error {
	background: #dc2626;
	border-color: #dc2626;
	color: #ffffff;
}
.emporas-notice--solid.emporas-notice--warning {
	background: #f59e0b;
	border-color: #f59e0b;
	color: #ffffff;
}
.emporas-notice--solid.emporas-notice--info {
	background: var(--emporas-navy, #1e2a5e);
	border-color: var(--emporas-navy, #1e2a5e);
	color: #ffffff;
}
.emporas-notice--solid .emporas-notice__icon {
	color: #ffffff !important;
}

/* Toast — floats top-right */
.emporas-notice--toast {
	position: fixed;
	top: 80px;
	right: 20px;
	z-index: 9999;
	max-width: 380px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
	animation: emporas-notice-slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes emporas-notice-slide-in {
	from { transform: translateX(110%); opacity: 0; }
	to { transform: translateX(0); opacity: 1; }
}
.emporas-notice--toast.is-hiding {
	animation: emporas-notice-slide-out 0.25s ease forwards;
}
@keyframes emporas-notice-slide-out {
	to { transform: translateX(110%); opacity: 0; }
}
@media (max-width: 600px) {
	.emporas-notice--toast {
		top: auto;
		bottom: 80px;
		right: 12px;
		left: 12px;
		max-width: none;
	}
	@keyframes emporas-notice-slide-in {
		from { transform: translateY(120%); opacity: 0; }
		to { transform: translateY(0); opacity: 1; }
	}
}

/* ============================================
   WOOCOMMERCE INTEGRATION
   Restyle WC's default notices to match.
   ============================================ */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice {
	display: flex !important;
	align-items: flex-start !important;
	gap: 12px !important;
	padding: 14px 16px !important;
	margin: 0 0 16px !important;
	border-radius: 10px !important;
	border: 1px solid transparent !important;
	font-family: var(--font-body, 'Inter', sans-serif) !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
	position: relative !important;
	background: #ffffff !important;
}

/* Hide WC's default ::before icons (use our own coloring instead) */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	position: static !important;
	margin-right: 4px !important;
	color: inherit !important;
}

.woocommerce-message {
	background: #f0fdf4 !important;
	border-color: #bbf7d0 !important;
	color: #166534 !important;
}
.woocommerce-info {
	background: #eff6ff !important;
	border-color: #bfdbfe !important;
	color: var(--emporas-navy, #1e2a5e) !important;
}
.woocommerce-error {
	background: #fef2f2 !important;
	border-color: #fecaca !important;
	color: #991b1b !important;
}
.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
	list-style: none !important;
	color: inherit !important;
}

/* WC notice buttons (e.g., "View cart") */
.woocommerce-message .button,
.woocommerce-info .button {
	margin-left: auto !important;
	padding: 6px 14px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	background: currentColor !important;
	color: #ffffff !important;
	border-radius: 6px !important;
	text-decoration: none !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	min-height: 0 !important;
	border: 0 !important;
}
.woocommerce-message .button {
	background: #16a34a !important;
}
.woocommerce-info .button {
	background: var(--emporas-navy, #1e2a5e) !important;
}

/* Mobile */
@media (max-width: 600px) {
	.emporas-notice,
	.woocommerce-message,
	.woocommerce-info,
	.woocommerce-error {
		padding: 12px 14px !important;
		gap: 10px !important;
		font-size: 13px !important;
	}
	.emporas-notice__title { font-size: 13px; }
	.emporas-notice__text  { font-size: 12px; }
}
