/*
 * 通知樣式 —— 搭配 src/utils/toast.js 使用，取代原本的 toastr.min.css。
 *
 * 刻意放在 public/assets/css 並由各頁模板以 <link> 引入，而不是讓
 * webpack 打包：dev 模式的 style-loader 會注入 <style> 標籤，那需要
 * style-src 'unsafe-inline'。走靜態檔可讓 dev / prod 行為一致。
 *
 * 配色沿用 toastr 原本的色票，讓外觀維持一致。
 */

.app-notifications {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 300px;
  max-width: calc(100vw - 24px);
  pointer-events: none;
}

.app-notification {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 15px;
  border-radius: 3px;
  box-shadow: 0 0 12px #999;
  background-color: #030303;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.9;
  pointer-events: auto;
  transition: opacity 150ms ease, transform 150ms ease;
}

.app-notification:hover {
  opacity: 1;
  box-shadow: 0 0 12px #000;
  cursor: pointer;
}

.app-notification--leaving {
  opacity: 0;
  transform: translateX(12px);
}

.app-notification--success {
  background-color: #51a351;
}

.app-notification--error {
  background-color: #bd362f;
}

.app-notification--info {
  background-color: #2f96b4;
}

.app-notification--warning {
  background-color: #f89406;
}

.app-notification__text {
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.app-notification__close {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.8;
  cursor: pointer;
}

.app-notification__close:hover,
.app-notification__close:focus {
  opacity: 1;
}
