/* Toast notifications (Django messages) - Toptancı Sistemi */

:root {
  --toast-bg: rgba(17, 24, 39, 0.92);
  --toast-text: #ffffff;
  --toast-muted: rgba(255, 255, 255, 0.75);
  --toast-border: rgba(255, 255, 255, 0.14);
  --toast-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);

  --toast-success: #10b981;
  --toast-error: #ef4444;
  --toast-warning: #f59e0b;
  --toast-info: #3b82f6;
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--toast-bg);
  color: var(--toast-text);
  border: 1px solid var(--toast-border);
  border-radius: 14px;
  box-shadow: var(--toast-shadow);
  overflow: hidden;
  transform: translateY(-8px);
  opacity: 0;
  animation: toast-in 240ms ease-out forwards;
}

.toast__inner {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  align-items: start;
}

.toast__bar {
  width: 10px;
  border-radius: 999px;
  background: var(--toast-info);
  height: 100%;
}

.toast--success .toast__bar { background: var(--toast-success); }
.toast--error .toast__bar { background: var(--toast-error); }
.toast--warning .toast__bar { background: var(--toast-warning); }
.toast--info .toast__bar { background: var(--toast-info); }

.toast__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.toast__message {
  margin: 0.2rem 0 0 0;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--toast-muted);
  word-break: break-word;
}

.toast__close {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.25rem 0.35rem;
  border-radius: 10px;
  cursor: pointer;
}

.toast__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.toast__progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.toast__progress > span {
  display: block;
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.35);
  transform-origin: left;
  transform: scaleX(1);
}

.toast.is-hiding {
  animation: toast-out 220ms ease-in forwards;
}

@keyframes toast-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toast-out {
  to {
    transform: translateY(-8px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
    transform: none;
    opacity: 1;
  }
  .toast.is-hiding {
    animation: none;
    opacity: 0;
  }
}






