/* Shared toolkit styles (toasts, confirm dialog, drawer, small utilities). Scripts: includes/scripts/ux/00-core.js (FmUI). */

/* ---------- toasts ---------- */
.fmx-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 600000; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 36px)); }
.fmx-toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #0f2a3d; color: #fff; box-shadow: 0 14px 36px rgba(8, 47, 73, .35); font-size: 14px; line-height: 1.4; opacity: 0; transform: translateY(10px); transition: opacity .22s, transform .22s; }
.fmx-toast.is-in { opacity: 1; transform: none; }
.fmx-toast i { margin-top: 2px; font-size: 16px; }
.fmx-toast span { flex: 1; overflow-wrap: anywhere; }
.fmx-toast button { background: none; border: 0; color: inherit; opacity: .6; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.fmx-toast button:hover { opacity: 1; }
.fmx-toast--success i { color: #34d399; }
.fmx-toast--error { background: #7f1d1d; } .fmx-toast--error i { color: #fecaca; }
.fmx-toast--warn i { color: #fbbf24; }
.fmx-toast--info i { color: #7dd3fc; }
#msg { display: none !important; } /* the legacy slide-down bar: its text is shown as a toast instead */

/* ---------- confirm dialog ---------- */
.fmx-modal { position: fixed; inset: 0; z-index: 600001; background: rgba(8, 25, 40, .5); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 18px; opacity: 0; transition: opacity .18s; }
.fmx-modal.is-in { opacity: 1; }
.fmx-modal__box { background: #fff; border-radius: 18px; padding: 24px 24px 18px; width: min(420px, 100%); box-shadow: 0 30px 80px rgba(8, 47, 73, .35); transform: translateY(8px); transition: transform .18s; }
.fmx-modal.is-in .fmx-modal__box { transform: none; }
.fmx-modal__box h3 { font-size: 18px; margin: 0 0 6px; }
.fmx-modal__box p { color: #5b6b7d; margin: 0 0 18px; }
.fmx-modal__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- drawer ---------- */
.fmx-drawer { position: fixed; inset: 0; z-index: 560000; pointer-events: none; }
.fmx-drawer__scrim { position: absolute; inset: 0; background: rgba(8, 25, 40, .45); opacity: 0; transition: opacity .22s; }
.fmx-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; max-width: 720px; background: #fff; box-shadow: -20px 0 60px rgba(8, 47, 73, .25); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.fmx-drawer.is-open { pointer-events: auto; }
.fmx-drawer.is-open .fmx-drawer__scrim { opacity: 1; }
.fmx-drawer.is-open .fmx-drawer__panel { transform: none; }
.fmx-drawer__panel > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #e4e8f0; }
.fmx-drawer__panel > header h3 { margin: 0; font-size: 16px; }
.fmx-drawer__x { background: #f1f5f9; border: 0; width: 34px; height: 34px; border-radius: 10px; font-size: 20px; line-height: 1; cursor: pointer; }
.fmx-drawer__body { flex: 1; overflow: auto; }
.fmx-drawer__body iframe { width: 100%; height: 100%; border: 0; display: block; }
body.fmx-noscroll { overflow: hidden; }

/* ---------- small utilities ---------- */
.fmx-kbd { display: inline-block; padding: 1px 6px; border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 6px; font: 600 11px/1.5 Inter, system-ui, sans-serif; color: #475569; background: #f8fafc; }
.fmx-skeleton { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%); background-size: 400% 100%; animation: fmx-sk 1.3s ease infinite; border-radius: 8px; }
@keyframes fmx-sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .fmx-toast, .fmx-modal, .fmx-modal__box, .fmx-drawer__panel, .fmx-drawer__scrim { transition: none !important; } .fmx-skeleton { animation: none; } }
