.fox-toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10650;
  width: min(380px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.fox-toast-container[data-position="top-left"] {
  left: 16px;
  right: auto;
}

.fox-toast-container[data-position="bottom-right"] {
  top: auto;
  bottom: 16px;
}

.fox-toast-container[data-position="bottom-left"] {
  top: auto;
  right: auto;
  left: 16px;
  bottom: 16px;
}

.fox-toast-container[data-position="center"] {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
}

.fox-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
  background: #ffffff;
  color: #14213d;
  overflow: hidden;
  position: relative;
  transform: translate3d(0, -8px, 0);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}

.fox-toast.is-visible {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.fox-toast--anim-fade {
  transform: none;
}

.fox-toast--anim-fade.is-visible {
  transform: none;
}

.fox-toast--anim-fade.is-leaving {
  transform: none;
  opacity: 0;
}

.fox-toast--anim-zoom {
  transform: scale(.92);
}

.fox-toast--anim-zoom.is-visible {
  transform: scale(1);
}

.fox-toast--anim-zoom.is-leaving {
  transform: scale(.94);
  opacity: 0;
}

.fox-toast.is-leaving {
  transform: translate3d(0, -10px, 0);
  opacity: 0;
}

.fox-toast--success { border-left: 4px solid #28a745; }
.fox-toast--warning { border-left: 4px solid #f0ad4e; }
.fox-toast--error { border-left: 4px solid #dc3545; }
.fox-toast--info { border-left: 4px solid #17a2b8; }
.fox-toast--loading { border-left: 4px solid #465af1; }

.fox-toast--dark,
body.fox-toast-dark .fox-toast {
  background: rgba(14, 21, 35, 0.96);
  color: #f3f7ff;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.fox-toast__icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
}

.fox-toast--success .fox-toast__icon { background: #28a745; }
.fox-toast--warning .fox-toast__icon { background: #f0ad4e; }
.fox-toast--error .fox-toast__icon { background: #dc3545; }
.fox-toast--info .fox-toast__icon { background: #17a2b8; }
.fox-toast--loading .fox-toast__icon { background: #465af1; }

.fox-toast__body {
  min-width: 0;
  flex: 1 1 auto;
}

.fox-toast__title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 4px;
}

.fox-toast__message {
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.fox-toast__close {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 2px;
  line-height: 1;
  opacity: .65;
  cursor: pointer;
}

.fox-toast__close:hover {
  opacity: 1;
}

.fox-toast__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: foxToastSpin .8s linear infinite;
}

.fox-toast__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(20, 33, 61, 0.08);
  overflow: hidden;
}

.fox-toast__progress-bar {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  animation-name: foxToastProgress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.fox-toast--success .fox-toast__progress-bar { background: #28a745; }
.fox-toast--warning .fox-toast__progress-bar { background: #f0ad4e; }
.fox-toast--error .fox-toast__progress-bar { background: #dc3545; }
.fox-toast--info .fox-toast__progress-bar { background: #17a2b8; }
.fox-toast--loading .fox-toast__progress { display: none; }

@keyframes foxToastSpin {
  to { transform: rotate(360deg); }
}

@keyframes foxToastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (prefers-color-scheme: dark) {
  body:not(.fox-toast-light) .fox-toast {
    background: rgba(14, 21, 35, 0.96);
    color: #f3f7ff;
    border-color: rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 767px) {
  .fox-toast-container {
    top: 10px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .fox-toast-container[data-position="bottom-right"],
  .fox-toast-container[data-position="bottom-left"] {
    top: auto;
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .fox-toast {
    padding: 13px 14px;
    border-radius: 12px;
  }
}
