/* Shared feedback styles for Bootstrap/Tabler alerts and Toastr. */
:root {
  --pp-success-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E");
  --pp-warning-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M10.3 4 2 18a2 2 0 0 0 1.7 3h16.6a2 2 0 0 0 1.7-3L13.7 4a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9v5m0 3v1'/%3E%3C/svg%3E");
  --pp-error-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 9 6 6m0-6-6 6'/%3E%3C/svg%3E");
}
.alert-success, #toast-container > .toast-success {
  --pp-notice-bg: #f0fdf4; --pp-notice-border: #bbf7d0; --pp-notice-color: #166534; --pp-notice-accent: #16a34a; --pp-notice-icon-bg: #dcfce7; --pp-notice-icon: var(--pp-success-icon);
}
.alert-warning, .alert-info, #toast-container > .toast-warning, #toast-container > .toast-info {
  --pp-notice-bg: #fffaf2; --pp-notice-border: #fed7aa; --pp-notice-color: #9a3412; --pp-notice-accent: #ea580c; --pp-notice-icon-bg: #ffedd5; --pp-notice-icon: var(--pp-warning-icon);
}
.alert-danger, .alert-error, #toast-container > .toast-error {
  --pp-notice-bg: #fff5f5; --pp-notice-border: #fecaca; --pp-notice-color: #991b1b; --pp-notice-accent: #dc2626; --pp-notice-icon-bg: #fee2e2; --pp-notice-icon: var(--pp-error-icon);
}
.alert:is(.alert-success, .alert-warning, .alert-info, .alert-danger, .alert-error),
#toast-container > :is(.toast-success, .toast-warning, .toast-info, .toast-error) {
  position: relative;
  padding: 19px 52px 19px 66px !important;
  min-height: 60px;
  border: 1px solid var(--pp-notice-border) !important;
  border-radius: 16px !important;
  background: var(--pp-notice-bg) !important;
  color: var(--pp-notice-color) !important;
  box-shadow: 0 8px 24px -8px rgb(15 23 42 / 14%), 0 2px 6px rgb(15 23 42 / 3%) !important;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  text-align: left;
  opacity: 1;
  overflow-wrap: anywhere;
  isolation: isolate;
  animation: pp-notice-enter .24s ease-out both;
}
.alert:is(.alert-success, .alert-warning, .alert-info, .alert-danger, .alert-error)::before,
#toast-container > :is(.toast-success, .toast-warning, .toast-info, .toast-error)::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 24px;
  width: 20px;
  height: 20px;
  z-index: 1;
  background-color: var(--pp-notice-accent);
  -webkit-mask: var(--pp-notice-icon) center / contain no-repeat;
  mask: var(--pp-notice-icon) center / contain no-repeat;
}
.alert:is(.alert-success, .alert-warning, .alert-info, .alert-danger, .alert-error)::after,
#toast-container > :is(.toast-success, .toast-warning, .toast-info, .toast-error)::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pp-notice-icon-bg);
  pointer-events: none;
}
/* Existing leading icons are replaced by the shared status icon. */
.alert.pp-notice > :is(i, svg):first-child { display: none; }
#toast-container > div { width: 380px; max-width: calc(100vw - 32px); margin-bottom: 12px; }
#toast-container .toast-message, #toast-container .toast-title { color: inherit; }
#toast-container .toast-title { margin-bottom: 4px; font-weight: 650; }
#toast-container .toast-progress { background: var(--pp-notice-accent); height: 3px; opacity: .25; }
.pp-notice .close, .pp-notice .btn-close, #toast-container .toast-close-button {
  position: absolute !important;
  top: 16px !important;
  right: 12px !important;
  float: none;
  padding: 0 !important;
  width: 28px;
  height: 28px;
  border: 0;
  color: inherit !important;
  background-color: transparent;
  border-radius: 8px;
  background-size: 10px;
  text-shadow: none;
  font-size: 22px;
  line-height: 28px;
  opacity: .55;
  cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease;
}
.pp-notice .close:hover, .pp-notice .btn-close:hover, #toast-container .toast-close-button:hover { opacity: 1; background-color: var(--pp-notice-icon-bg); }
.pp-notice button:focus-visible, #toast-container button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (max-width: 480px) {
  #toast-container { left: 16px; right: 16px; width: auto; }
  #toast-container > div { width: 100%; margin-bottom: 10px; }
}
@media print { #toast-container { display: none !important; } }
@keyframes pp-notice-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .alert, #toast-container > div { animation: none !important; }
  .pp-notice button { transition: none !important; }
}
