/* StarCommand toasts: messages and questions (never the browser's own boxes). Used by every app inside
   StarCommand: static/css/toast.css is the original; the league tracker and booking admin carry exact
   copies. Colours fall back to StarCommand's own when the page does not define them. */
.sc-toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.sc-toast {
  --toast: #30a0e0;
  --toast-edge: rgb(48 160 224 / 45%);
  --toast-tint: rgb(48 160 224 / 16%);

  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.7rem;
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 0.85rem;
  border: 1px solid var(--toast-edge);
  border-radius: 14px;
  background:
    linear-gradient(90deg, var(--toast-tint), transparent 60%),
    var(--panel-solid, #101e30);
  box-shadow:
    inset 4px 0 0 var(--toast),
    0 16px 36px rgb(0 0 0 / 55%);
  color: var(--text, #f0f0f0);
  pointer-events: auto;
  animation: sc-toast-in 0.2s ease-out;
}

.sc-toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sc-toast-ok {
  --toast: #3ddc84;
  --toast-edge: rgb(61 220 132 / 45%);
  --toast-tint: rgb(61 220 132 / 16%);
}

.sc-toast-error,
.sc-toast-danger {
  --toast: #ff5a5a;
  --toast-edge: rgb(255 90 90 / 45%);
  --toast-tint: rgb(255 90 90 / 16%);
}

.sc-toast-question:not(.sc-toast-danger) {
  --toast: #e02080;
  --toast-edge: rgb(224 32 128 / 45%);
  --toast-tint: rgb(224 32 128 / 16%);
}

.sc-toast-question {
  grid-template-columns: auto minmax(0, 1fr);
}

.sc-toast-mark {
  width: 12px;
  height: 12px;
  margin-top: 0.3rem;
  border-radius: 50%;
  background: var(--toast);
  box-shadow: 0 0 10px var(--toast);
}

.sc-toast-body {
  display: grid;
  gap: 0.5rem;
}

.sc-toast-text {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sc-toast-note {
  margin: 0;
  color: var(--text-2, #b4c4d4);
  font-size: 0.85rem;
}

.sc-toast-input {
  width: 100%;
  min-height: 40px;
  padding: 0 0.7rem;
  border: 1px solid var(--line-strong, rgb(112 192 232 / 20%));
  border-radius: 10px;
  background: rgb(0 0 0 / 25%);
  color: var(--text, #f0f0f0);
  font: inherit;
}

.sc-toast-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.sc-toast-close {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2, #b4c4d4);
  cursor: pointer;
}

.sc-toast-close::before,
.sc-toast-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: currentcolor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.sc-toast-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.sc-toast-close:hover {
  background: rgb(255 255 255 / 6%);
  color: var(--text, #f0f0f0);
}

@keyframes sc-toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (width <= 600px) {
  .sc-toast-stack {
    right: 16px;
    left: 16px;
    width: auto;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-toast,
  .sc-toast.is-leaving {
    animation: none;
    transition: none;
  }
}

.sc-toast-btn {
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--line-strong, rgb(112 192 232 / 20%));
  border-radius: 10px;
  background: rgb(255 255 255 / 4%);
  color: var(--text, #f0f0f0);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.sc-toast-btn:hover,
.sc-toast-btn:focus-visible {
  border-color: var(--blue-soft, #70c0e8);
}

.sc-toast-btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue, #30a0e0), var(--magenta, #e02080));
}

.sc-toast-btn-danger {
  border-color: var(--red, #ff5a5a);
  background: rgb(255 90 90 / 14%);
  color: #ffb4b4;
}

.sc-toast-stack,
.sc-toast-stack * {
  box-sizing: border-box;
}

.sc-toast-text,
.sc-toast-note {
  font-family: inherit;
}
