/* ======================================================
   MODAL — Mendieta Estudio Contable
   Diseño humano · corporativo · no-IA
   ====================================================== */

.mModal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}

.mModal.is-open {
  display: block;
}

/* backdrop */
.mModal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 61, 56, 0.55);
  backdrop-filter: blur(3px);
  animation: modalFade 0.25s ease forwards;
}

/* dialog */
.mModal__dialog {
  position: relative;
  margin: 22vh auto 0;
  width: min(92vw, 520px);
  background: #ffffff;
  border-radius: 22px;
  padding: 28px 26px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: modalSlide 0.35s ease forwards;
  isolation: isolate;
}

/* close */
.mModal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(5, 61, 56, 0.12);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  color: rgba(5, 61, 56, 0.7);
  transition: background 0.15s ease;
}

.mModal__close:hover {
  background: rgba(5, 61, 56, 0.06);
}

/* icon */
.mModal__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  background: rgba(12, 67, 61, 0.08);
  color: #0c433d;
  font-size: 18px;
}

/* content */
.mModal__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--m-primary);
}

.mModal__text {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(15, 23, 42, 0.78);
  font-weight: 600;
}

/* actions */
.mModal__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mModal__actions .btn {
  flex: 1 1 auto;
}

/* animations */
@keyframes modalFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 520px) {
  .mModal__dialog {
    margin: 18vh auto 0;
    padding: 24px 20px 22px;
  }

  .mModal__title {
    font-size: 18px;
  }

  .mModal__text {
    font-size: 14.5px;
  }
}
