.toast-container {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  z-index: 9999;
}
.toast-container.top-left {
  top: 20px;
  left: 20px;
  align-items: flex-start;
}
.toast-container.top-right {
  top: 20px;
  right: 20px;
  align-items: flex-end;
}
.toast-container.bottom-left {
  bottom: 20px;
  left: 20px;
  align-items: flex-start;
  flex-direction: column-reverse;
}
.toast-container.bottom-right {
  bottom: 20px;
  right: 20px;
  align-items: flex-end;
  flex-direction: column-reverse;
}
@media screen and (max-width: 768px) {
  .toast-container.top-left,
  .toast-container.top-right {
    top: 10px;
    right: 10px;
    left: 10px;
    align-items: stretch;
  }
  .toast-container.bottom-left,
  .toast-container.bottom-right {
    bottom: 10px;
    right: 10px;
    left: 10px;
    align-items: stretch;
  }
}
.toast-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  min-width: 280px;
  max-width: 400px;
  background: var(--card);
  border-radius: $border-card;
  box-shadow: $boxshadow-card-float;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-left: 4px solid transparent;
  position: relative;
  overflow: hidden;
}
@media screen and (max-width: 768px) {
  .toast-item {
    min-width: unset;
    max-width: 100%;
    width: 100%;
    transform: translateY(-20px);
  }
}
.toast-item.show {
  transform: translateX(0);
  opacity: 1;
}
@media screen and (max-width: 768px) {
  .toast-item.show {
    transform: translateY(0);
  }
}
.toast-item.hide {
  transform: translateX(120%);
  opacity: 0;
}
@media screen and (max-width: 768px) {
  .toast-item.hide {
    transform: translateY(-20px);
  }
}
.toast-container.top-left .toast-item,
.toast-container.bottom-left .toast-item {
  transform: translateX(-120%);
}
.toast-container.top-left .toast-item.show,
.toast-container.bottom-left .toast-item.show {
  transform: translateX(0);
}
.toast-container.top-left .toast-item.hide,
.toast-container.bottom-left .toast-item.hide {
  transform: translateX(-120%);
}
.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.toast-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.toast-content {
  flex: 1;
  min-width: 0;
}
.toast-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-p1);
  margin-bottom: 4px;
  line-height: 1.3;
}
.toast-message {
  font-size: 0.85rem;
  color: var(--text-p2);
  line-height: 1.4;
  word-wrap: break-word;
}
.toast-action-btn {
  margin-top: 10px;
  padding: 6px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: $border-card-s;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.toast-action-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.toast-action-btn .btn-icon {
  display: inline-flex;
  align-items: center;
}
.toast-action-btn .btn-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.toast-action-btn .btn-text {
  white-space: nowrap;
}
.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-p3);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.toast-close svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.toast-close:hover {
  background: var(--block);
  color: var(--text-p1);
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.3;
  border-radius: 0 0 0 $border-card;
  transition: width 0.1s linear;
}
.toast-item.toast-success {
  border-left-color: #10b981;
}
.toast-item.toast-success .toast-icon {
  background: rgba(16,185,129,0.1);
  color: #10b981;
}
.toast-item.toast-success .toast-progress {
  color: #10b981;
}
.toast-item.toast-error {
  border-left-color: #ef4444;
}
.toast-item.toast-error .toast-icon {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}
.toast-item.toast-error .toast-progress {
  color: #ef4444;
}
.toast-item.toast-warning {
  border-left-color: #f59e0b;
}
.toast-item.toast-warning .toast-icon {
  background: rgba(245,158,11,0.1);
  color: #f59e0b;
}
.toast-item.toast-warning .toast-progress {
  color: #f59e0b;
}
.toast-item.toast-info {
  border-left-color: #3b82f6;
}
.toast-item.toast-info .toast-icon {
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
}
.toast-item.toast-info .toast-progress {
  color: #3b82f6;
}
[data-theme="dark"] .toast-item {
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
[data-theme="dark"] .toast-item.toast-success .toast-icon {
  background: rgba(16,185,129,0.2);
}
[data-theme="dark"] .toast-item.toast-error .toast-icon {
  background: rgba(239,68,68,0.2);
}
[data-theme="dark"] .toast-item.toast-warning .toast-icon {
  background: rgba(245,158,11,0.2);
}
[data-theme="dark"] .toast-item.toast-info .toast-icon {
  background: rgba(59,130,246,0.2);
}
