/* Finoforce — toast notification alerts */
#wn-toast-host {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.wn-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.96), rgba(10, 18, 34, 0.98));
  border: 1px solid rgba(68, 138, 255, 0.35);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 24px rgba(68, 138, 255, 0.12);
  color: #e8eef7;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateX(24px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.wn-toast.wn-toast-show {
  transform: translateX(0);
  opacity: 1;
}

.wn-toast.wn-toast-hide {
  transform: translateX(24px);
  opacity: 0;
}

.wn-toast-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #448aff, #3b82f6);
  color: #fff;
  box-shadow: 0 6px 16px rgba(68, 138, 255, 0.35);
}

.wn-toast.wn-toast-success .wn-toast-icon {
  background: linear-gradient(135deg, #00c853, #00a844);
  box-shadow: 0 6px 16px rgba(0, 200, 83, 0.35);
}

.wn-toast.wn-toast-success {
  border-color: rgba(0, 200, 83, 0.35);
}

.wn-toast.wn-toast-error .wn-toast-icon {
  background: linear-gradient(135deg, #ff5252, #e53935);
  box-shadow: 0 6px 16px rgba(255, 82, 82, 0.35);
}

.wn-toast.wn-toast-error {
  border-color: rgba(255, 82, 82, 0.35);
}

.wn-toast.wn-toast-warning .wn-toast-icon {
  background: linear-gradient(135deg, #ffa726, #fb8c00);
  box-shadow: 0 6px 16px rgba(255, 167, 38, 0.35);
}

.wn-toast.wn-toast-warning {
  border-color: rgba(255, 167, 38, 0.35);
}

.wn-toast-body {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.wn-toast-title {
  margin: 0 0 4px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.wn-toast-message {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #b8c4d6;
  word-break: break-word;
}

.wn-toast-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.wn-toast-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.wn-toast-progress {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.wn-toast {
  position: relative;
  padding-bottom: 16px;
}

.wn-toast-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #448aff, #60a5fa);
  animation: wn-toast-progress linear forwards;
}

.wn-toast.wn-toast-success .wn-toast-progress > span {
  background: linear-gradient(90deg, #00c853, #69f0ae);
}

.wn-toast.wn-toast-error .wn-toast-progress > span {
  background: linear-gradient(90deg, #ff5252, #ff8a80);
}

@keyframes wn-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 640px) {
  #wn-toast-host {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}
