/*
 * DS-10 messages (canvas MessagesKit, Toast, InlineMessage; assets/js/toast.js, inc/messages.php).
 * Rule: a field's message under the field (C-12); one item's message on that item (InlineMessage,
 * or a callout on desktop); the whole visit = the toast at the top; a section that failed = an
 * InlineMessage in that section. Tokens only (theme.json custom msg colours).
 */

/* ---------- Toast: top, 8px under the sticky header, overlays the page ---------- */
.eh-toaster { position: fixed; left: 0; right: 0; top: 8px; z-index: 1000; display: flex; flex-direction: column; align-items: center; padding: 0 20px; pointer-events: none; }
.eh-toaster > div { width: 100%; max-width: 560px; }
.eh-toaster > div:empty { display: none; }
.eh-toast2 {
	pointer-events: auto; display: flex; align-items: center; gap: 12px; box-sizing: border-box; width: 100%;
	padding: 12px 16px 12px 18px; background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--sans); font-size: 15px; line-height: 1.45; box-shadow: 0 8px 24px rgba(26, 26, 26, .18);
	opacity: 0; transform: translateY(-12px); transition: opacity var(--wp--custom--eh--motion), transform var(--wp--custom--eh--motion);
}
.eh-toast2.is-in { opacity: 1; transform: none; }
.eh-toast2__i { display: inline-flex; flex: none; }
.eh-toast2--success .eh-toast2__i { color: var(--wp--custom--eh--msg--on-ink-success); }
.eh-toast2--info .eh-toast2__i { color: var(--wp--custom--eh--msg--on-ink-info); }
.eh-toast2--warning .eh-toast2__i { color: var(--wp--custom--eh--msg--on-ink-warning); }
.eh-toast2--error .eh-toast2__i { color: var(--wp--custom--eh--msg--on-ink-error); }
.eh-toast2__msg { flex: 1 1 auto; min-width: 0; }
.eh-toast2__act, .eh-toast2__act:visited {
	margin: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: 500; white-space: nowrap; cursor: pointer;
	color: var(--wp--preset--color--yellow); text-decoration: underline; text-underline-offset: 4px;
}
.eh-toast2__x { flex: none; width: var(--wp--custom--eh--tap); height: var(--wp--custom--eh--tap); margin: -10px -12px -10px 0; padding: 0; border: 0; background: none; color: var(--wp--preset--color--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.eh-toast2__act:focus-visible, .eh-toast2__x:focus-visible { outline: 2px solid var(--wp--preset--color--yellow); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .eh-toast2__x:hover { color: var(--wp--preset--color--yellow); } .eh-toast2__act:hover { text-decoration-thickness: 2px; } }
@media (max-width: 689.98px) {
	.eh-toaster > div { max-width: none; }
	.eh-toast2 { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.eh-toast2 { transform: none; transition: opacity var(--wp--custom--eh--motion); }
}
/* The old bottom toast (favourites, 26 Nov) is retired. */
.eh-toast { display: none !important; }

/* ---------- InlineMessage: on the item, warm paper ---------- */
.eh-msg { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 0; padding: 12px 14px; background: var(--wp--preset--color--paper); color: var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--sans); font-size: 14px; line-height: 1.5; text-align: left; }
.eh-msg[hidden] { display: none; }
.eh-msg__i { display: inline-flex; flex: none; margin-top: 2px; }
.eh-msg--success .eh-msg__i { color: var(--wp--custom--eh--msg--success); }
.eh-msg--info .eh-msg__i { color: var(--wp--custom--eh--msg--info); }
.eh-msg--warning .eh-msg__i { color: var(--wp--custom--eh--msg--warning); }
.eh-msg--error .eh-msg__i { color: var(--wp--custom--eh--msg--error); }
.eh-msg__t { flex: 1 1 auto; min-width: 0; }
.eh-msg__a, .eh-msg__a:visited { margin: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: 500; white-space: nowrap; cursor: pointer; color: var(--wp--preset--color--ink); text-decoration: underline; text-underline-offset: 4px; }
.eh-msg__a:focus-visible { outline: var(--wp--custom--eh--focus); outline-offset: 2px; }
/* Callout (desktop): ink panel with a pointer, 280px max, 44px close. */
.eh-msg--callout { position: relative; max-width: 280px; background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); box-shadow: 0 8px 24px rgba(26, 26, 26, .18); }
.eh-msg--callout::before { content: ""; position: absolute; top: -6px; right: 18px; width: 12px; height: 12px; background: var(--wp--preset--color--ink); transform: rotate(45deg); }
.eh-msg--callout .eh-msg__a { color: var(--wp--preset--color--yellow); }
.eh-msg--callout.eh-msg--success .eh-msg__i { color: var(--wp--custom--eh--msg--on-ink-success); }
.eh-msg--callout.eh-msg--info .eh-msg__i { color: var(--wp--custom--eh--msg--on-ink-info); }
.eh-msg--callout.eh-msg--warning .eh-msg__i { color: var(--wp--custom--eh--msg--on-ink-warning); }
.eh-msg--callout.eh-msg--error .eh-msg__i { color: var(--wp--custom--eh--msg--on-ink-error); }
.eh-msg__x { flex: none; width: var(--wp--custom--eh--tap); height: var(--wp--custom--eh--tap); margin: -12px -14px -12px 0; padding: 0; border: 0; background: none; color: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.eh-msg__x:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* AL-14 guest heart callout: placed under the heart by favourites.js. */
.eh-fav-callout { position: absolute; z-index: 60; width: 280px; box-sizing: border-box; margin: 0; }
.eh-fav-callout::before { left: var(--eh-callout-x, 250px); right: auto; }
