/* =============================================================================
 * Landing MultiPost+ overlay — popup wrapper.
 *
 * Réutilise le panel admin (multipost_panel_only.html) verbatim et le pose
 * dans une carte overlay (backdrop noir, card blanche, scroll interne). Le
 * .mp-root admin est laissé tel quel (white theme, layout responsive). Cette
 * feuille gère uniquement la couche overlay/animation/responsive de la popup.
 * ============================================================================= */

.zh-mp-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.zh-mp-overlay[hidden] {
  display: none;
}

.zh-mp-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.zh-mp-overlay-card {
  position: relative;
  width: 100%;
  max-width: 1100px;
  max-height: calc(100vh - 48px);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(12px) scale(0.985);
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.zh-mp-overlay.is-open .zh-mp-overlay-card {
  transform: translateY(0) scale(1);
}

/* Bouton close de la popup (au-dessus du panel admin). */
.zh-mp-overlay-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms, transform 160ms;
}

.zh-mp-overlay-close:hover {
  background: #f3f4f6;
  transform: scale(1.05);
}

.zh-mp-overlay-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* Le panel admin (.mp-root) à l'intérieur de la carte overlay : on désactive
 * sa min-height (qui assume une page entière dans l'admin) pour qu'il occupe
 * juste la hauteur disponible. */
.zh-mp-overlay-card .mp-root {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  border-radius: 18px;
}

/* Le header admin perd son padding-right pour éviter de chevaucher le close. */
.zh-mp-overlay-card .mp-head {
  padding-right: 64px !important;
}

/* Empêche le double-scroll : on laisse seulement le .mp-root scroller. */
body.zh-mp-overlay-open {
  overflow: hidden;
}

/* Mobile : full-screen sheet. */
@media (max-width: 700px) {
  .zh-mp-overlay {
    padding: 0;
  }

  .zh-mp-overlay-card {
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .zh-mp-overlay-card .mp-root {
    border-radius: 0;
  }
}
