.pf-alert-toast-host {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  z-index: 1200;
  width: min(460px, calc(100vw - 28px));
  display: grid;
  gap: 10px;
  pointer-events: none;
  transform: translateX(-50%);
}

.pf-alert-toast {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(224, 214, 200, 0.92);
  border-radius: 14px;
  color: #1d1b16;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(29, 27, 22, 0.14);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  animation: pfAlertToastIn 180ms ease-out;
}

.pf-alert-toast.is-leaving {
  animation: pfAlertToastOut 170ms ease-in forwards;
}

.pf-alert-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #cf542d;
  background: #fff0e8;
}

.pf-alert-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pf-alert-toast-title,
.pf-alert-modal-title {
  margin: 0;
  color: #17130f;
  font-weight: 800;
  letter-spacing: 0;
}

.pf-alert-toast-title {
  font-size: 0.96rem;
  line-height: 1.25;
}

.pf-alert-toast-message,
.pf-alert-modal-message {
  margin: 4px 0 0;
  color: #5f5750;
  line-height: 1.45;
}

.pf-alert-toast-message {
  font-size: 0.86rem;
}

.pf-alert-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #7a6f64;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 1.18rem;
  line-height: 1;
}

.pf-alert-close:hover {
  color: #1d1b16;
  background: #f6efe8;
}

.pf-alert-toast.success .pf-alert-icon,
.pf-alert-modal.success .pf-alert-icon {
  color: #247a3d;
  background: #eaf7ed;
}

.pf-alert-toast.warning .pf-alert-icon,
.pf-alert-modal.warning .pf-alert-icon {
  color: #b35a00;
  background: #fff3dd;
}

.pf-alert-toast.error .pf-alert-icon,
.pf-alert-modal.error .pf-alert-icon {
  color: #b42318;
  background: #fff0ee;
}

.pf-alert-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 18, 20, 0.52);
  backdrop-filter: blur(4px);
}

.pf-alert-modal-backdrop.open {
  display: flex;
  animation: pfAlertFadeIn 160ms ease-out;
}

.pf-alert-modal {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid rgba(224, 214, 200, 0.96);
  border-radius: 18px;
  color: #1d1b16;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(10, 12, 16, 0.26);
  animation: pfAlertModalIn 180ms ease-out;
}

.pf-alert-modal-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.pf-alert-modal .pf-alert-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.pf-alert-modal-title {
  font-size: 1.2rem;
  line-height: 1.25;
}

.pf-alert-modal-message {
  font-size: 0.94rem;
}

.pf-alert-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.pf-alert-btn {
  min-width: 104px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 16px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
}

.pf-alert-btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #e14e22, #c94b26);
  box-shadow: 0 10px 20px rgba(207, 84, 45, 0.22);
}

.pf-alert-btn.secondary {
  color: #cf542d;
  border-color: rgba(207, 84, 45, 0.72);
  background: rgba(255, 255, 255, 0.74);
}

.pf-alert-btn:hover {
  transform: translateY(-1px);
}

@keyframes pfAlertToastIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pfAlertToastOut {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

@keyframes pfAlertFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pfAlertModalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .pf-alert-toast {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 12px;
  }

  .pf-alert-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .pf-alert-modal {
    padding: 18px;
  }

  .pf-alert-modal-head {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .pf-alert-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pf-alert-btn {
    width: 100%;
  }
}
