﻿/* MedManagement loaders - page loader (while a page opens) and action loader (after any button / link / postback). */
#mmPageLoader { position: fixed; inset: 0; z-index: 100000; background: rgba(248, 250, 252, .92); display: flex; align-items: center; justify-content: center;
                transition: opacity .25s ease, visibility .25s ease; }
#mmPageLoader.done { opacity: 0; visibility: hidden; pointer-events: none; }
/* fail-safe without JavaScript: if the loader script is slow or blocked, the page loader still clears itself */
#mmPageLoader { animation: mm-pl-out .3s ease 6s forwards; }
@keyframes mm-pl-out { to { opacity: 0; visibility: hidden; pointer-events: none; } }
#mmPageLoader .mm-pl-box { display: flex; flex-direction: column; align-items: center; gap: 14px; font-family: 'Segoe UI', Roboto, Arial, sans-serif; }
#mmPageLoader .mm-pl-text { font-size: 13px; font-weight: 700; color: #0f766e; letter-spacing: .3px; }

.mm-ring { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #ccfbf1; border-top-color: #0f766e; animation: mm-spin .8s linear infinite; }
.mm-ring.sm { width: 18px; height: 18px; border-width: 3px; }
@keyframes mm-spin { to { transform: rotate(360deg); } }

/* thin progress bar across the top while anything is loading */
#mmTopBar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100001; background: linear-gradient(90deg, #14b8a6, #0f766e, #5eead4); box-shadow: 0 0 8px rgba(20, 184, 166, .7);
            transition: width .4s ease, opacity .3s ease; opacity: 0; }
#mmTopBar.on { opacity: 1; width: 80%; transition: width 8s cubic-bezier(.1, .7, .2, 1), opacity .2s; }
#mmTopBar.end { opacity: 0; width: 100%; transition: width .2s ease, opacity .4s ease .2s; }

/* action loader: blocks the page (no double clicks on payments) and says what is happening */
#mmActionLoader { position: fixed; inset: 0; z-index: 99998; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .28);
                  backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility .15s ease; font-family: 'Segoe UI', Roboto, Arial, sans-serif; }
#mmActionLoader.show { opacity: 1; visibility: visible; }
#mmActionLoader .mm-al-card { background: #fff; border-radius: 14px; padding: 20px 26px; display: flex; align-items: center; gap: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); min-width: 260px; max-width: 420px; }
#mmActionLoader .mm-al-t { font-weight: 800; color: #0f172a; font-size: 14.5px; }
#mmActionLoader .mm-al-s { font-size: 12.5px; color: #64748b; margin-top: 2px; }
.mm-busy { pointer-events: none; opacity: .75; }
