#srs-global-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% - 12px));
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  width: min(94vw, 520px);
  max-width: min(94vw, 520px);
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

#srs-global-toast.srs-toast-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.srs-toast-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-px-lg);
  border: var(--border-width-thin) solid var(--border-transparent);
  background: linear-gradient(180deg, rgba(8, 12, 14, 0.96), rgba(8, 12, 14, 0.88));
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 18px 40px var(--shadow-light);
  color: #e7eefb;
  isolation: isolate;
}

.srs-toast-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: conic-gradient(
    from 0deg at 50% 50%,
    #6fb1ff,
    #00e0ff,
    #2fdc78,
    #ff7f50,
    #6fb1ff
  );
  opacity: 0.14;
  border-radius: inherit;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: var(--border-width-thin);
}

.srs-toast-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-px-circle);
  border: var(--border-width-thin) solid var(--border-transparent);
  background: rgba(255, 255, 255, 0.09);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.srs-toast-icon::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: var(--radius-px-circle);
  background: #6fb1ff;
  box-shadow: 0 0 12px rgba(111, 177, 255, 0.8);
}

.srs-toast-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.srs-toast-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-transform: uppercase;
}

.srs-toast-message {
  font-size: 13px;
  line-height: 1.4;
  color: #dde6ff;
  max-height: 4.2em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.srs-toast-close {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-px-circle);
  border: var(--border-width-thin) solid var(--border-transparent);
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#srs-global-toast.srs-toast--success .srs-toast-inner {
  border-color: rgba(47, 220, 120, 0.48);
  box-shadow: 0 18px 40px rgba(47, 220, 120, 0.28);
}

#srs-global-toast.srs-toast--success .srs-toast-icon::before {
  background: #2fdc78;
  box-shadow: 0 0 14px rgba(47, 220, 120, 0.9);
}

#srs-global-toast.srs-toast--error .srs-toast-inner {
  border-color: rgba(255, 83, 99, 0.6);
  box-shadow: 0 18px 40px rgba(255, 83, 99, 0.32);
}

#srs-global-toast.srs-toast--error .srs-toast-icon::before {
  background: #ff5363;
  box-shadow: 0 0 14px rgba(255, 83, 99, 0.9);
}

#srs-global-toast.srs-toast--info .srs-toast-inner {
  border-color: rgba(111, 177, 255, 0.6);
  box-shadow: 0 18px 40px rgba(111, 177, 255, 0.32);
}

#srs-global-toast.srs-toast--info .srs-toast-icon::before {
  background: #00e0ff;
  box-shadow: 0 0 14px rgba(0, 224, 255, 0.9);
}

.srs-toast-close:hover,
.srs-toast-close:focus-visible {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

#srs-global-toast:focus-visible {
  outline: var(--border-width-medium) solid rgba(111, 177, 255, 0.7);
  outline-offset: 4px;
}

@media (max-width: 768px) {
  #srs-global-toast {
    width: min(94vw, 520px);
    transform: translate(-50%, calc(-50% + 12px));
  }
  #srs-global-toast.srs-toast-visible {
    transform: translate(-50%, -50%);
  }
  .srs-toast-inner {
    padding: 12px 14px;
    grid-template-columns: auto 1fr auto;
  }
  .srs-toast-message {
    max-height: none;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
  }
  .srs-toast-title {
    font-size: 12px;
  }
  .srs-toast-message {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #srs-global-toast {
    transition: none;
  }
  .srs-toast-inner {
    transition: none;
  }
}

@supports (forced-colors: active) {
  #srs-global-toast {
    border: 1px solid ButtonText;
  }
  .srs-toast-inner {
    background: Canvas;
    color: ButtonText;
    box-shadow: none;
  }
  .srs-toast-icon::before {
    background: ButtonText;
    box-shadow: none;
  }
  .srs-toast-close {
    border-color: ButtonText;
    color: ButtonText;
  }
  .srs-toast-close:focus-visible {
    outline: var(--border-width-medium) solid ButtonText;
  }
}
