/* --- OVERLAY + MODAL INSTAL·LACIÓ MolaMath --- */

/* Fons amb blur que ocupa tota la pantalla */
.mm-install-overlay {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #efefe56e;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Estat visible/invisible */
.mm-install-overlay.mm-visible {
  opacity: 1;
  pointer-events: auto;
}

.mm-install-overlay.mm-hidden {
  display: block; /* es manté al flux però invisible al principi */
}

/* La “caixa” del modal al mig */
.mm-install-modal {
  width: 100%;
  max-width: 360px;
  background: #ffffff;              /* fons blanc */
  color: var(--neutral);            /* color base del text */
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Quan el contenidor és visible, animem el modal */
.mm-install-overlay.mm-visible .mm-install-modal {
  transform: scale(1);
  opacity: 1;
}

/* Contingut: logo + text en columna, centrat */
.mm-install-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.mm-install-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Logo dins del modal */
.mm-install-logo-img {
  width: 20%;         /* 20% de l’ample del modal */
  height: auto;
  display: block;
  margin: 0 auto;     /* centrat horitzontalment */
}

/* Text del modal */
.mm-install-text h3 {
  margin: 15px;
  font-size: 20px;
  font-weight: 600;
  color: var(--neutral);
}

.mm-install-text p {
  margin: 0;
  font-size: clamp(12px, 3vw, 18px);
  font-weight: 500;
  line-height: 1.35;
  color: #676767;
}

/* Icona del botó compartir d’Apple (iOS) */
.mm-share-icon {
  height: 35px;
  width: auto;
margin-bottom: 5px;

}
.mm-share-arrow {
  height: 26px;
  width: auto;
  margin: 5px;
}
    

/* Accions (botons) */
.mm-install-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* Botons estil MolaMath */
.mm-btn {
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.mm-btn-primary {
  background: #1f5ae2;
  color: white;
  /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); */
  padding: 10px 20px 10px 20px;
  width: 100%;
  margin-top: 20px;
}
.mm-btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mm-btn-ghost {
  background: transparent;
  color: var(--neutral);
  border: 1px solid #e5e7eb;
  width: 100%;
  padding: 10px 20px 10px 20px;
}

.mm-btn-ghost:active {
  background: rgba(0, 0, 0, 0.03);
}

/* Responsive petit ajust per pantalles molt petites */
@media (max-width: 360px) {
  .mm-install-modal {
    max-width: 320px;
  }
  .mm-install-text h3 {
    font-size: 16px;
  }
  .mm-install-text p {
    font-size: 12px;
  }
}
