/* ============================================
   SPODIC - Shared Toast Notifications
   ============================================ */

.spodic-toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 340;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.spodic-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(214, 57, 68, 0.28);
  background: rgba(34, 18, 20, 0.95);
  color: var(--text, #e0e0e0);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  animation: spodicToastIn 180ms ease-out;
}

.spodic-toast.leaving {
  animation: spodicToastOut 180ms ease-in forwards;
}

.spodic-toast[data-type="warning"] {
  border-color: rgba(225, 173, 20, 0.35);
  background: rgba(39, 31, 16, 0.95);
}

.spodic-toast[data-type="info"] {
  border-color: rgba(64, 184, 196, 0.35);
  background: rgba(18, 31, 34, 0.95);
}

.spodic-toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(214, 57, 68, 0.18);
  color: var(--accent, #d63944);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.spodic-toast[data-type="warning"] .spodic-toast-icon {
  background: rgba(225, 173, 20, 0.18);
  color: #e1ad14;
}

.spodic-toast[data-type="info"] .spodic-toast-icon {
  background: rgba(64, 184, 196, 0.18);
  color: #40b8c4;
}

.spodic-toast-message {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.spodic-toast-close {
  border: none;
  background: transparent;
  color: var(--text-muted, #9a9a9a);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  flex-shrink: 0;
}

.spodic-toast-close:hover {
  color: var(--text, #e0e0e0);
  background: rgba(255, 255, 255, 0.08);
}

.spodic-toast-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

@keyframes spodicToastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spodicToastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (max-width: 768px) {
  .spodic-toast-container {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}
