/* Shared feedback for public site, accounts, guardians, educators, and backoffice. */
:where(button, input[type="submit"], input[type="button"], a[href], summary, [role="button"]) {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
:where(button, input[type="submit"], input[type="button"], a[href], summary, [role="button"]):focus-visible {
  outline: 3px solid #8d6bec;
  outline-offset: 3px;
}
:where(button, input[type="submit"], input[type="button"], a[href], summary, [role="button"]):not(:disabled):active,
:where(button, input[type="submit"], input[type="button"], a[href], summary, [role="button"]).sfe-pressed {
  filter: brightness(.88) saturate(1.12);
}
:where(button, input[type="submit"], input[type="button"], [role="button"]).sfe-busy {
  cursor: progress !important;
  pointer-events: none;
  filter: saturate(.85);
}
.sfe-button-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-inline-start: 8px;
  font-size: .82em;
  font-weight: 650;
  white-space: nowrap;
  vertical-align: middle;
}
.sfe-spinner {
  display: inline-block;
  inline-size: 14px;
  block-size: 14px;
  flex: 0 0 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: sfe-spin .7s linear infinite;
}
.sfe-progress {
  position: fixed;
  z-index: 2147483000;
  inset: 0 0 auto 0;
  pointer-events: none;
  height: 3px;
  overflow: hidden;
  background: transparent;
}
.sfe-progress[hidden] { display: none !important; }
.sfe-progress::before {
  content: "";
  display: block;
  height: 100%;
  width: 38%;
  background: linear-gradient(90deg, #37a6e7, #7851d9, #9e83ef);
  border-radius: 0 3px 3px 0;
  animation: sfe-progress 1.35s ease-in-out infinite;
}
.sfe-toasts {
  position: fixed;
  z-index: 2147483001;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}
.sfe-toast {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  padding: 14px 13px;
  border-radius: 15px;
  background: #fff;
  color: #242341;
  border: 1px solid #e4e1ee;
  border-left: 4px solid #8062da;
  box-shadow: 0 14px 34px rgba(24,25,57,.19);
  font: 600 13px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  pointer-events: auto;
  animation: sfe-enter .23s ease-out both;
}
.sfe-toast-success { border-left-color: #19855c; }
.sfe-toast-error { border-left-color: #c73b56; }
.sfe-toast-warning { border-left-color: #c78121; }
.sfe-toast-symbol {
  display: grid;
  place-items: center;
  inline-size: 28px;
  block-size: 28px;
  border-radius: 50%;
  background: #ede7ff;
  color: #5d37a9;
  font-weight: 900;
  font-size: 16px;
}
.sfe-toast-success .sfe-toast-symbol { background: #e2f6ee; color: #157750; }
.sfe-toast-error .sfe-toast-symbol { background: #ffebef; color: #b52d49; }
.sfe-toast-warning .sfe-toast-symbol { background: #fff1da; color: #a36a10; }
.sfe-toast-text { overflow-wrap: anywhere; }
.sfe-toast-close {
  border: 0;
  background: transparent;
  color: #68657f;
  cursor: pointer;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  height: 24px;
  width: 24px;
}
@keyframes sfe-spin { to { transform: rotate(360deg); } }
@keyframes sfe-progress {
  from { transform: translateX(-100%); }
  to { transform: translateX(270%); }
}
@keyframes sfe-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
  .sfe-toasts {
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
  }
  .sfe-toast { padding: 12px; }
  .sfe-button-indicator { font-size: .75em; gap: 4px; margin-left: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .sfe-progress::before, .sfe-spinner, .sfe-toast { animation: none !important; }
  .sfe-progress::before { width: 100%; opacity: .55; }
}
