/* Notifications belong to the game frame and never capture gameplay input. */
#message.gameNotifications {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(420px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  text-align: left;
  color: #edf1f5;
  pointer-events: none;
}
#gameFrame > #message.gameNotifications {
  position: absolute;
  z-index: 34;
  top: var(--game-notification-top, 14px);
  left: var(--game-notification-left, 28%);
  width: var(--game-notification-width, 44%);
  min-height: 0;
  max-width: calc(100% - 24px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  pointer-events: none;
  user-select: none;
  text-align: left;
  color: #edf1f5;
}
#message.gameNotifications[hidden] { display: none !important; }
.gameNotifications .gameNotification {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid #a8bed12b;
  border-left: 2px solid #9aaebe;
  border-radius: 7px;
  background: #111923ed;
  box-shadow: 0 4px 18px #0004;
  font: 500 12px/1.45 system-ui, sans-serif;
  pointer-events: none;
  animation: gameNotificationIn 140ms ease-out both;
}
.gameNotifications .gameNotificationKind {
  grid-column: 1;
  color: #b9c9d8;
  font: 700 9px/1.2 system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.gameNotifications .gameNotificationCopy {
  grid-column: 1;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
  overflow: hidden;
}
.gameNotifications .gameNotificationCount {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  border-radius: 4px;
  padding: 2px 5px;
  color: #c8d2dc;
  background: #ffffff0b;
  font: 600 10px/1.4 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.gameNotifications .gameNotificationCount[hidden] { display: none; }
.gameNotifications .gameNotification[data-kind="reward"] { border-left-color: #d6b777; }
.gameNotifications .gameNotification[data-kind="reward"] .gameNotificationKind { color: #e8ce97; }
.gameNotifications .gameNotification[data-kind="error"] { border-left-color: #d98d87; }
.gameNotifications .gameNotification[data-kind="error"] .gameNotificationKind { color: #f1b2ac; }
.gameNotifications .gameNotification[data-kind="hint"] { border-left-color: #8cb9c3; }
#gameFrame #message.gameNotifications[data-compact="true"] .gameNotification { padding: 7px 10px; font-size: 11px; }
#gameFrame #message.gameNotifications[data-compact="true"] .gameNotificationCopy { -webkit-line-clamp: 2; }
/* Overrides the old mobile rule that discarded all messages outside the canvas. */
body.touchDevice.mobileMatchMode #gameFrame > #message.gameNotifications:not([hidden]) { display: flex !important; }
/* Touch: one notice lane between the thumbs, just above the XP strip, instead
   of the top centre where notices landed on the wizard. game-notifications.js
   places it (data-lane) and keeps at most two notices, one line each. */
body.touchDevice.mobileMatchMode #gameFrame > #message.gameNotifications[data-lane="true"] {
  top: auto;
  bottom: var(--game-notification-bottom, 56px);
  max-width: calc(100% - 16px);
  gap: 4px;
}
body.touchDevice.mobileMatchMode #gameFrame > #message.gameNotifications[data-lane="true"] .gameNotification {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font: 600 12px/1.3 system-ui, sans-serif;
}
body.touchDevice.mobileMatchMode #gameFrame > #message.gameNotifications[data-lane="true"] .gameNotificationKind { display: none; }
body.touchDevice.mobileMatchMode #gameFrame > #message.gameNotifications[data-lane="true"] .gameNotificationCopy {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.touchDevice.mobileMatchMode #gameFrame > #message.gameNotifications[data-lane="true"] .gameNotificationCount {
  grid-column: 2;
  grid-row: 1;
  padding: 0 5px;
  font-size: 11px;
}
/* Quest progress during a fight becomes a count on the Quest toggle. */
body.touchDevice.mobileMatchMode #hudQuestToggle[data-quest-updates]::before {
  content: attr(data-quest-updates);
  position: absolute;
  z-index: 1;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 10px;
  background: #d6b777;
  box-shadow: 0 0 0 2px #0d1928;
  color: #14100a;
  font: 800 11px/20px system-ui, sans-serif;
  text-align: center;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .gameNotifications .gameNotification { animation: none; }
}
@keyframes gameNotificationIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
