/* =====================================================================
   Branded notification system — toasts + confirm modal
   Replaces native alert()/confirm() across the site & admin.
   ===================================================================== */
.moe-toasts {
  position: fixed; top: 22px; right: 22px; z-index: 9999;
  display: flex; flex-direction: column; gap: 12px; max-width: 380px;
}
.moe-toast {
  display: flex; align-items: flex-start; gap: 12px; background: #fff;
  border-radius: 12px; padding: 14px 16px; box-shadow: 0 18px 48px rgba(8,40,22,.22);
  border-left: 5px solid var(--green, #0b6e33); transform: translateX(120%);
  animation: toastIn .45s cubic-bezier(.18,.89,.32,1.28) forwards; position: relative; overflow: hidden;
}
.moe-toast.out { animation: toastOut .35s ease forwards; }
.moe-toast .t-ico { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; }
.moe-toast .t-body { flex: 1; }
.moe-toast .t-title { font-weight: 700; font-size: .92rem; color: #1c2b21; margin: 0 0 2px; font-family: "Raleway", sans-serif; }
.moe-toast .t-msg { font-size: .85rem; color: #5d6b62; margin: 0; }
.moe-toast .t-close { background: none; border: 0; color: #9aa8a0; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.moe-toast .t-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: currentColor; opacity: .35; animation: toastBar 4s linear forwards; }

.moe-toast.success { border-left-color: #1f9d4d; }
.moe-toast.success .t-ico, .moe-toast.success .t-bar { background: #1f9d4d; color: #1f9d4d; }
.moe-toast.error { border-left-color: #d63b3b; }
.moe-toast.error .t-ico, .moe-toast.error .t-bar { background: #d63b3b; color: #d63b3b; }
.moe-toast.warning { border-left-color: #e7a008; }
.moe-toast.warning .t-ico, .moe-toast.warning .t-bar { background: #e7a008; color: #e7a008; }
.moe-toast.info { border-left-color: #2b7cd6; }
.moe-toast.info .t-ico, .moe-toast.info .t-bar { background: #2b7cd6; color: #2b7cd6; }

@keyframes toastIn { to { transform: translateX(0); } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }
@keyframes toastBar { from { width: 100%; } to { width: 0; } }

/* Loading overlay — shown during navigation / processing */
.moe-loader {
  position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center;
  background: rgba(12,51,36,.62); backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden; transition: opacity .25s ease;
}
.moe-loader.show { opacity: 1; visibility: visible; }
.moe-loader .loader-box {
  background: #fffdf8; border-radius: 16px; padding: 30px 42px; text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.4); transform: scale(.92); transition: transform .3s cubic-bezier(.18,.89,.32,1.28);
}
.moe-loader.show .loader-box { transform: scale(1); }
.moe-loader .spinner { width: 56px; height: 56px; margin: 0 auto 16px; position: relative; }
.moe-loader .spinner::before,
.moe-loader .spinner::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 4px solid transparent; }
.moe-loader .spinner::before { border-color: #e8e2d4; }
.moe-loader .spinner::after { border-top-color: #b9822f; border-right-color: #b9822f; animation: moeSpin .8s linear infinite; }
@keyframes moeSpin { to { transform: rotate(360deg); } }
.moe-loader p { margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 600; color: #134d35; font-size: 1.05rem; }
.moe-loader small { display: block; margin-top: 4px; color: #54605a; font-size: .8rem; letter-spacing: .04em; }

/* Confirm / alert modal */
.moe-modal-overlay {
  position: fixed; inset: 0; background: rgba(6,40,22,.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 10000; opacity: 0;
  transition: opacity .25s ease; padding: 20px;
}
.moe-modal-overlay.show { opacity: 1; }
.moe-modal {
  background: #fff; border-radius: 16px; max-width: 430px; width: 100%; padding: 28px;
  text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.35); transform: scale(.9);
  transition: transform .3s cubic-bezier(.18,.89,.32,1.28);
}
.moe-modal-overlay.show .moe-modal { transform: scale(1); }
.moe-modal .m-ico { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff; background: var(--green, #0b6e33); }
.moe-modal.danger .m-ico { background: #d63b3b; }
.moe-modal h3 { margin: 0 0 .5rem; font-family: "Raleway", sans-serif; color: #1c2b21; }
.moe-modal p { color: #5d6b62; margin: 0 0 1.5rem; font-size: .95rem; }
.moe-modal .m-actions { display: flex; gap: 12px; justify-content: center; }
.moe-modal .m-btn { padding: .7rem 1.5rem; border-radius: 50px; font-weight: 700; border: 0; cursor: pointer; font-family: "Raleway", sans-serif; transition: .2s; }
.moe-modal .m-cancel { background: #eef2ef; color: #45554b; }
.moe-modal .m-cancel:hover { background: #e0e7e2; }
.moe-modal .m-ok { background: var(--green, #0b6e33); color: #fff; }
.moe-modal.danger .m-ok { background: #d63b3b; }
.moe-modal .m-ok:hover { filter: brightness(1.08); }
