:root {
  --patho-toast-bg: rgba(12, 12, 12, 0.97);
  --patho-toast-border: rgba(255, 255, 255, 0.13);
  --patho-toast-text: #f7f7f7;
  --patho-toast-muted: #a3a3a3;
}

#patho-toast-region {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: min(390px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: visible;
  pointer-events: none;
  font-family: inherit;
}

.patho-toast {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 30px;
  align-items: start;
  gap: 11px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 13px 16px;
  overflow: hidden;
  color: var(--patho-toast-text);
  background: var(--patho-toast-bg);
  border: 1px solid var(--patho-toast-border);
  border-radius: 15px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .36), 0 2px 8px rgba(0, 0, 0, .22);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  animation: patho-toast-enter .24s cubic-bezier(.2, .8, .2, 1) both;
  will-change: transform, opacity;
}

.patho-toast[data-state="closing"] {
  animation: patho-toast-leave .18s ease-in both;
}

.patho-toast__icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: none;
  color: #fff;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 11px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.patho-toast__content {
  min-width: 0;
  padding-top: 1px;
}

.patho-toast__title {
  margin: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .075em;
  line-height: 1.25;
  text-transform: uppercase;
}

.patho-toast__message {
  margin: 4px 0 0;
  color: #dedede;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.patho-toast__close {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  padding: 0;
  color: #a3a3a3;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 21px;
  line-height: 1;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.patho-toast__close:hover,
.patho-toast__close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .13);
  outline: none;
}

.patho-toast__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(255, 255, 255, .17);
  transform-origin: left center;
  animation: patho-toast-progress linear both;
}

.patho-toast__progress::after {
  display: block;
  width: 100%;
  height: 100%;
  content: "";
  background: rgba(255, 255, 255, .72);
}

@keyframes patho-toast-enter {
  from { opacity: 0; transform: translate3d(18px, -7px, 0) scale(.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes patho-toast-leave {
  to { opacity: 0; transform: translate3d(18px, -4px, 0) scale(.985); }
}

@keyframes patho-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 600px) {
  #patho-toast-region {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: min(390px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
  }

  .patho-toast {
    grid-template-columns: 33px minmax(0, 1fr) 28px;
    gap: 9px;
    padding: 12px 11px 14px;
    border-radius: 13px;
  }

  .patho-toast__icon { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .patho-toast,
  .patho-toast[data-state="closing"],
  .patho-toast__progress {
    animation-duration: .01ms !important;
  }
}
