/* MAOS — unico feedback per le azioni asincrone. Nessuna percentuale simulata. */
.mp-feedback[hidden] { display: none !important; }
.mp-feedback { position: fixed; z-index: 2147483000; right: max(16px,env(safe-area-inset-right)); bottom: max(18px,env(safe-area-inset-bottom)); width: min(400px,calc(100vw - 32px)); padding: 17px 46px 17px 17px; display: flex; align-items: flex-start; gap: 13px; border: 1px solid rgba(36,61,75,.14); border-radius: 16px; box-shadow: 0 18px 55px rgba(0,0,0,.23); background: #fff; color: #193443; font-family: Montserrat,system-ui,sans-serif; font-size: 13px; line-height: 1.45; box-sizing: border-box; }
.mp-feedback[data-state=error] { border-color: #b34641; }
.mp-feedback[data-state=complete] { border-color: #27846b; }
.mp-text { flex: 1; min-width: 0; } .mp-title { display: block; font-weight: 650; } .mp-detail { display: block; margin-top: 3px; opacity: .85; } .mp-detail:empty { display: none; }
.mp-spin { flex: 0 0 21px; width: 21px; height: 21px; border-radius: 50%; border: 2px solid #dce3e7; border-top-color: #267e77; animation: mp-rotate .75s linear infinite; margin-top: 1px; }
.mp-feedback[data-state=complete] .mp-spin { border-color: #27846b; animation: none; position: relative; } .mp-feedback[data-state=complete] .mp-spin::after { content:'✓'; position: absolute; inset:0; color: #fff; background: #27846b; text-align: center; line-height: 21px; font-size: 14px; }
.mp-feedback[data-state=error] .mp-spin { border-color: #b34641; animation: none; position: relative; } .mp-feedback[data-state=error] .mp-spin::after { content:'!'; position: absolute; inset:0; color: #fff; background: #b34641; text-align:center; line-height:21px; }
.mp-track { height: 4px; margin-top: 10px; border-radius: 6px; overflow: hidden; background: #e6edee; } .mp-track span { display: block; height: 100%; width: 0; background: #267e77; transition: width .18s linear; }
.mp-track.mp-indeterminate span { width: 35%; animation: mp-slide 1.3s ease-in-out infinite; }
.mp-feedback[data-state=complete] .mp-track,.mp-feedback[data-state=error] .mp-track { display:none; }
.mp-close { position:absolute; right: 12px; top: 10px; border:0; background: transparent; color: inherit; font-size: 24px; cursor:pointer; padding: 3px; line-height:1; }
.mp-close[hidden] { display:none; }
.mp-button-busy { cursor: progress !important; opacity: .72; }
button.mp-button-busy::after, label.mp-button-busy::after { content:''; display:inline-block; width:12px; height:12px; vertical-align:-2px; margin-left:8px; border: 2px solid currentColor; border-right-color:transparent; border-radius:50%; animation: mp-rotate .75s linear infinite; }
label[data-mp-locked="1"] { pointer-events: none !important; }
@keyframes mp-rotate { to { transform: rotate(360deg); } }
@keyframes mp-slide { 0% { transform:translateX(-110%); } 100% { transform:translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .mp-spin,button.mp-button-busy::after,label.mp-button-busy::after { animation-duration: 2.2s; } .mp-track.mp-indeterminate span { animation: none; width: 100%; opacity:.7; } }
@media (max-width: 600px) { .mp-feedback { left: 16px; right: 16px; width:auto; bottom:max(12px, env(safe-area-inset-bottom)); } }
