/* ============================================
 * Magic Darkroom · Toast
 *
 * Floating notification with typewriter text.
 * Position: top center, stacks downward.
 *
 * Structure (generated by toast.js):
 *   .md-toast-container            fixed top-center stack
 *     .md-toast[data-type][data-typing]
 *       .md-toast__icon
 *       .md-toast__text
 * ============================================ */

.md-toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.md-toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  background: var(--c-bg-content);
  box-shadow:
    0 4px 16px rgba(107, 92, 67, 0.18),
    0 2px 0 0 var(--sh-input);
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  pointer-events: auto;
  animation: md-toast-in 0.3s var(--ease-pop) both;
  white-space: nowrap;
  max-width: 420px;
}

.md-toast--exiting {
  animation: md-toast-out 0.25s ease forwards;
}

/* ---- Icon dot ---- */
.md-toast__icon {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-text-3);
}

.md-toast[data-type="success"] .md-toast__icon { background: var(--c-success); }
.md-toast[data-type="error"]   .md-toast__icon { background: var(--c-error); }
.md-toast[data-type="warn"]    .md-toast__icon { background: var(--c-warn); }
.md-toast[data-type="info"]    .md-toast__icon { background: var(--c-mint); }

/* ---- Typewriter caret ---- */
.md-toast__text::after {
  content: "\2588";
  display: inline-block;
  margin-left: 2px;
  animation: md-caret 0.7s steps(1) infinite;
  opacity: 0;
  color: var(--c-text-3);
  font-weight: 400;
  font-size: 12px;
}
.md-toast[data-typing="true"] .md-toast__text::after {
  opacity: 1;
}
