/* ==========================================================
 * MOYAMOVA 1.12.36 — Unified confirm / message modal
 * Visual language aligned with refreshed toasts, onboarding and mobile UI.
 * ========================================================== */

.mm-modal-open{overflow:hidden}

.mm-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:2147483643;
  display:grid;
  place-items:center;
  padding:18px;
  box-sizing:border-box;
  background:rgba(5,12,24,.38);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  opacity:1;
  transition:opacity .18s ease;
}
.mm-modal-backdrop.hide{opacity:0}

.mm-modal{
  --mm-accent:#5b7cfa;
  width:min(100%,430px);
  padding:20px;
  box-sizing:border-box;
  border:1px solid #dfe6ef;
  border-radius:20px;
  background:rgba(255,255,255,.98);
  color:#182235;
  box-shadow:0 24px 60px rgba(31,45,74,.22);
  text-align:center;
  transform:translateY(0) scale(1);
  transition:transform .18s ease,opacity .18s ease;
}
.mm-modal-backdrop.hide .mm-modal{
  transform:translateY(8px) scale(.985);
  opacity:0;
}

.mm-modal[data-mm-type="success"]{--mm-accent:#38a17e}
.mm-modal[data-mm-type="warning"]{--mm-accent:#e9a72f}
.mm-modal[data-mm-type="error"]{--mm-accent:#d75c70}
.mm-modal[data-mm-type="info"]{--mm-accent:#5b7cfa}

.mm-modal__icon{
  width:48px;
  height:48px;
  margin:0 auto 10px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:color-mix(in srgb,var(--mm-accent) 12%,transparent);
  color:var(--mm-accent);
  font-size:25px;
  line-height:1;
}

.mm-modal__title{
  margin:0;
  color:inherit;
  font:800 20px/1.2 Montserrat,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
}

.mm-modal__text{
  margin:9px auto 0;
  max-width:360px;
  color:#657286;
  font:500 13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
}

.mm-modal__btns{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-top:18px;
}

.mm-btn{
  min-height:44px;
  padding:0 14px;
  border-radius:12px;
  font:750 13px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  cursor:pointer;
  box-sizing:border-box;
}

.mm-btn--ghost{
  border:1px solid #cfd8e5;
  background:#f7f9fc;
  color:#445269;
}
.mm-btn--primary{
  border:1px solid var(--mm-accent);
  background:var(--mm-accent);
  color:#fff;
  box-shadow:0 5px 14px color-mix(in srgb,var(--mm-accent) 20%,transparent);
}
.mm-btn:active{transform:scale(.985)}

html[data-theme="dark"] .mm-modal,
html.dark .mm-modal{
  background:rgba(18,30,43,.985);
  border-color:#263d52;
  color:#edf5ff;
  box-shadow:0 28px 70px rgba(0,0,0,.38);
}
html[data-theme="dark"] .mm-modal__text,
html.dark .mm-modal__text{color:#a6b4c5}
html[data-theme="dark"] .mm-btn--ghost,
html.dark .mm-btn--ghost{
  background:#162231;
  border-color:#33495f;
  color:#dce7f5;
}

@media(max-width:899px){
  .mm-modal-backdrop{
    padding:max(14px,env(safe-area-inset-top))
            14px
            max(14px,env(safe-area-inset-bottom));
  }
  .mm-modal{
    width:min(100%,420px);
    padding:18px 16px 16px;
    border-radius:18px;
  }
  .mm-modal__icon{
    width:44px;height:44px;border-radius:13px;font-size:23px;
  }
  .mm-modal__title{font-size:18px}
  .mm-modal__text{font-size:12px;line-height:1.45}
  .mm-modal__btns{margin-top:16px}
  .mm-btn{min-height:43px;font-size:12.5px}
}

@media(max-width:360px){
  .mm-modal__btns{grid-template-columns:1fr}
}

@media(prefers-reduced-motion:reduce){
  .mm-modal-backdrop,.mm-modal{transition:none}
}
