.gxm-lock {
  overflow: hidden;
}

.gxm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .28s ease;
}

.gxm-backdrop[hidden] {
  display: none;
}

.gxm-backdrop.gxm-visible {
  opacity: 1;
}

/* Una sola columna: logo arriba, contenido debajo. */
.gxm-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  color: #4a4a4a;
  border-radius: 16px;
  box-shadow: 0 24px 60px -12px rgba(11, 50, 40, .42), 0 0 0 1px rgba(11, 50, 40, .04);
  font-family: inherit;
  opacity: 0;
  transform: scale(.95);
  transition: opacity .3s ease, transform .3s cubic-bezier(.22, 1, .36, 1);
}

.gxm-backdrop.gxm-visible .gxm-modal {
  opacity: 1;
  transform: scale(1);
}

/* Carzo: el logo va centrado y sin caja de color (el prototipo lo lleva sobre
   blanco). El recuadro sigue existiendo: se apaga poniendo el "Color del panel"
   en #FFFFFF desde el BO. */
.gxm-panel {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 28px 28px 0;
  background-color: transparent;
  background-position: center;
  background-size: cover;
}

/* Velo sobre la imagen de fondo, teñido con el color de panel configurado. */
.gxm-modal--image .gxm-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--gxm-panel, #F2F3F6) 82%, transparent);
}

/* La caja gris que enmarca el logo. */
.gxm-panel-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--gxm-panel, #F2F3F6);
  border-radius: 8px;
}

.gxm-logo {
  display: block;
  width: 96px;
  max-width: 100%;
  height: auto;
}

.gxm-tagline {
  max-width: 180px;
  margin: 0;
  color: rgba(11, 50, 40, .72);
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: .02em;
}

.gxm-rule {
  width: 38px;
  height: 3px;
  border-radius: 2px;
  background: var(--gxm-accent, #5B9423);
}

.gxm-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 22px 28px 28px;
  background: #fff;
}

/* Titulo en tinta, no en el acento: en el prototipo de Carzo el naranja es
   solo para los iconos. */
.gxm-title {
  margin: 0;
  color: #1D1D1D;
  font-family: inherit;
  /* 22px: con 27 el titulo cortaba en dos lineas y el prototipo lo tiene en una */
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.gxm-subtitle {
  margin: 0;
  color: #4a4a4a;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.gxm-benefits {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gxm-benefit {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.gxm-benefit-icon {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--gxm-accent, #5B9423);
  border-radius: 8px;
  background: #F2F3F6;
}

.gxm-benefit-icon svg,
.gxm-close svg,
.gxm-cta svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gxm-benefit-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gxm-benefit-copy strong {
  color: #3B3B3B;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.gxm-benefit-copy span {
  color: #8a8a8a;
  font-size: 13.5px;
  line-height: 1.45;
}

.gxm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.gxm-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  background: var(--gxm-cta, var(--gxm-accent, #5B9423));
  border: 1px solid var(--gxm-cta, var(--gxm-accent, #5B9423));
  border-radius: 8px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}

/* El popup se imprime dentro del footer, donde el tema tiene
   `#footer-container-main a{color:#777}`. Un ID le gana a esa regla sin
   recurrir a !important: por eso los enlaces van prefijados con #gxm-popup. */
#gxm-popup .gxm-cta {
  color: #fff;
}

/* Mismo hover en outline que el resto de los botones del sitio. */
#gxm-popup .gxm-cta:hover,
#gxm-popup .gxm-cta:focus {
  color: var(--gxm-cta, var(--gxm-accent, #5B9423));
  background: transparent;
  text-decoration: none;
}

/* El prototipo no lleva flecha en el CTA. */
.gxm-cta svg {
  display: none;
}

.gxm-secondary {
  align-self: center;
  padding: 7px;
  color: #8a8a8a;
  background: transparent;
  border: 0;
  font: 400 13.5px/1.25 inherit;
  cursor: pointer;
}

.gxm-secondary:hover,
.gxm-secondary:focus {
  color: #0B3228;
  text-decoration: underline;
}

.gxm-login {
  margin: 0;
  color: #6b7280;
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
}

/* !important porque el Theme Editor tiene una regla huerfana del diseño viejo
   (`.gxm-login a{color:var(--gxm-panel)!important}` en custom_s_1.css) que con
   el panel claro deja el enlace casi blanco sobre blanco. Conviene borrarla de
   ahi; mientras tanto, esta gana por especificidad entre importantes. */
#gxm-popup .gxm-login a {
  color: #2f8cff !important;
  font-weight: 400;
  text-decoration: underline;
}

#gxm-popup .gxm-login a:hover,
#gxm-popup .gxm-login a:focus {
  text-decoration: underline;
}

.gxm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #4a4a4a;
  background: #F2F3F6;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.gxm-close:hover,
.gxm-close:focus {
  color: #0B3228;
  background: #e5e6ea;
}

.gxm-close svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

@media (max-width: 639px) {
  .gxm-backdrop {
    padding: 14px;
  }

  .gxm-modal {
    width: min(400px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    border-radius: 14px;
  }

  .gxm-panel {
    padding: 22px 22px 0;
    background-image: none !important;
  }

  .gxm-logo {
    width: 84px;
  }

  .gxm-body {
    padding: 18px 22px 22px;
    gap: 16px;
  }

  .gxm-title {
    font-size: 22px;
  }

  .gxm-subtitle {
    font-size: 14px;
  }

  .gxm-benefit-icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .gxm-benefit-copy strong {
    font-size: 14px;
  }

  .gxm-benefit-copy span {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gxm-backdrop,
  .gxm-modal,
  .gxm-cta {
    transition: none;
  }

  .gxm-modal,
  .gxm-backdrop.gxm-visible .gxm-modal {
    transform: none;
  }
}
