/* NookHaven toast notifications (js/toast.js) and the registration age notice. */
.nh-toast-region {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.nh-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border-radius: 12px;
  border: 1px solid #D4E5EF;
  border-left: 4px solid #4F89A8;
  background: linear-gradient(145deg, #FFFFFF, #F5FAFD);
  color: #254A67;
  box-shadow: 0 12px 30px rgba(43, 86, 116, .15);
  font: 500 14px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease;
}
.nh-toast.is-visible { opacity: 1; transform: translateY(0); }
.nh-toast-icon {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  background: #4F89A8;
}
.nh-toast-text { margin: 1px 0 0; flex: 1; overflow-wrap: anywhere; }
.nh-toast-close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #66849A;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  border-radius: 6px;
}
.nh-toast-close:hover { color: #254A67; }
.nh-toast-close:focus-visible { outline: 2px solid #6CA8C0; outline-offset: 2px; }
/* A toast with a link and/or a button under its message (options.link / options.action). */
.nh-toast-body { flex: 1; min-width: 0; }
.nh-toast-body .nh-toast-text { flex: none; }
.nh-toast-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.nh-toast-link { color: #2F6F93; font-weight: 700; font-size: 13px; text-decoration: none; }
.nh-toast-link:hover { text-decoration: underline; }
.nh-toast-action {
  border: 0;
  border-radius: 9px;
  padding: 7px 14px;
  background: #2F6587;
  color: #FFFFFF;
  font: 700 13px/1.2 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
}
.nh-toast-action:hover { background: #24526F; }
.nh-toast-action:disabled { opacity: .65; cursor: wait; }
.nh-toast-link:focus-visible, .nh-toast-action:focus-visible { outline: 2px solid #6CA8C0; outline-offset: 2px; }
.nh-toast-success { border-left-color: #4C9A87; }
.nh-toast-success .nh-toast-icon { background: #4C9A87; }
.nh-toast-error { border-left-color: #C56E7A; }
.nh-toast-error .nh-toast-icon { background: #C56E7A; }
.nh-toast-warning { border-left-color: #C08B45; }
.nh-toast-warning .nh-toast-icon { background: #C08B45; }

@media (max-width: 600px) {
  .nh-toast-region { top: auto; bottom: 16px; right: 16px; left: 16px; width: auto; }
  .nh-toast { transform: translateY(8px); }
  /* App and Tools pages: the navigation bar runs along the bottom (76px, css/base/theme.css),
     so toasts sit just above it instead of covering it. */
  body.lavender-app.editorial-app .nh-toast-region { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .nh-toast { transition: opacity .01s; transform: none; }
}

/* Registration: shown when "Under 18" is selected (js/register-ui.js). */
.nh-age-notice {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(200, 67, 90, .35);
  background: #FFF4F6;
  color: #6B2234;
  font-size: 13px;
  line-height: 1.5;
}
.nh-age-notice a { color: inherit; font-weight: 600; }

/* Inline message under a form or section: a problem the student must act on
   (nhToast.inline in js/core/toast.js). Plain text, like the field messages below,
   not a toast-style box. Colours by type: red for errors that stop the student (a field to
   fix, a save or load that failed), amber for cautions that don't block, green for
   confirmations, blue-grey for neutral notes. */
.nh-inline-message {
  --nh-inline-color: #9B2C3F;
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--nh-inline-color);
  text-align: left;
}
.nh-inline-message[hidden] { display: none; }
.nh-inline-message.is-warning { --nh-inline-color: #8A5A12; }
.nh-inline-message.is-success { --nh-inline-color: #2F6B57; }
.nh-inline-message.is-info { --nh-inline-color: #3D5F78; }
/* Cards style their paragraphs grey (for example the email reminder and feature pages);
   keep the message colour there too. */
p.nh-inline-message.nh-inline-message.nh-inline-message,
body.editorial-app .nh-feature-screen p.nh-inline-message.nh-inline-message { color: var(--nh-inline-color); }
/* Where some inline messages sit: above the calendar, and above the Companion message box. */
#academicLoadError { margin: 0 0 14px; }
#contactsNotice { margin: 0 0 12px; }
.admin-logout-all-error { margin: 14px 26px 0; }
.admin-dialog-message { margin: 14px 26px 0; }
/* Links inside an inline message (for example "see emergency hotlines") keep its colour. */
.nh-inline-message a { color: inherit; font-weight: 700; text-decoration: underline; }
.sp-status-card .sp-help-link { color: #2F6587; font-weight: 700; text-decoration: underline; }
.nh-chat-notice { margin: 10px 24px 0; }
/* Under a form, keep a little space before the button that follows. */
.nh-inline-message:not([hidden]) + .login-btn, .nh-inline-message:not([hidden]) + button { margin-top: 12px; }

/* Live inline form messages (js/live-validation.js), e.g. on the sign-up form. */
.nh-field-message {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 600;
  color: #9B2C3F;
}
