/* Sticky notifications + busy submit feedback */

.flash-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  width: min(40rem, calc(100% - 1.5rem));
  box-sizing: border-box;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .85rem 1rem;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.flash-toast--error {
  background: #ffebee;
  color: #b71c1c;
  border-color: #ef9a9a;
}

.flash-toast--warning {
  background: #fff3e0;
  color: #e65100;
  border-color: #ffcc80;
}

.flash-toast--info {
  background: #e3f2fd;
  color: #0d47a1;
  border-color: #90caf9;
}

.flash-toast__list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
}

.flash-toast__item {
  margin: 0;
  white-space: pre-line;
  line-height: 1.4;
}

.flash-toast__item + .flash-toast__item {
  margin-top: .45rem;
}

.flash-toast__close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 .15rem;
  opacity: .75;
}

.flash-toast__close:hover,
.flash-toast__close:focus-visible {
  opacity: 1;
}

.page-busy-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(255, 255, 255, .55);
  cursor: wait;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

body.page-is-busy .page-busy-overlay {
  display: flex;
}

.page-busy-overlay__panel {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  padding: .9rem 1.15rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: Arial, sans-serif;
  font-size: .95rem;
}

.page-busy-overlay__spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid #d8dee4;
  border-top-color: #005eaa;
  border-radius: 50%;
  animation: page-busy-spin .8s linear infinite;
}

@keyframes page-busy-spin {
  to { transform: rotate(360deg); }
}

button.is-busy,
input[type="submit"].is-busy {
  opacity: .85;
  cursor: wait;
}

button[disabled].is-busy,
input[type="submit"][disabled].is-busy {
  cursor: wait;
}
