/**
 * Mercado Mayor / Bazarial — "Accede a precios mayoristas" invitation modal
 * ---------------------------------------------------------------------------
 * Printed by inc/join-popup.php, driven by js/mm-join-popup.js. Loaded only on
 * the requests that actually render it.
 *
 * The dialog keeps the site's own type and colour rather than the flat grey of
 * the pattern it follows: it is the first thing many visitors will see, so it
 * has to read as this marketplace and not as a generic overlay.
 */

.mm-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mm-popup[hidden] {
  display: none;
}

.mm-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 17, .55);
  opacity: 0;
  transition: opacity .22s var(--mm-ease, ease);
}

.mm-popup.is-open .mm-popup__backdrop {
  opacity: 1;
}

.mm-popup__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 40px 40px 0;
  background: var(--mm-surface, #fff);
  border-radius: var(--mm-radius-lg, 12px);
  box-shadow: 0 24px 64px rgba(20, 18, 17, .28);
  text-align: center;
  opacity: 0;
  transform: translateY(12px) scale(.98);
  transition: opacity .22s var(--mm-ease, ease), transform .22s var(--mm-ease, ease);
}

.mm-popup.is-open .mm-popup__dialog {
  opacity: 1;
  transform: none;
}

/* Someone who has asked for less motion still gets the dialog, just without
   the entrance. */
@media (prefers-reduced-motion: reduce) {
  .mm-popup__backdrop,
  .mm-popup__dialog {
    transition: none;
    transform: none;
  }
}

.mm-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--mm-ink-subtle, #8A8A8A);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .18s var(--mm-ease, ease), color .18s var(--mm-ease, ease);
}

.mm-popup__close svg {
  width: 18px;
  height: 18px;
}

.mm-popup__close:hover,
.mm-popup__close:focus-visible {
  color: var(--mm-ink, #1E1E1E);
  background: var(--mm-surface-sunken, #F5F4F2);
}

.mm-popup__brand {
  margin: 0 0 22px;
  font-family: var(--mm-font-display, Georgia, serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--mm-accent, #D23D2D);
  text-transform: uppercase;
}

.mm-popup__logo {
  display: block;
  width: auto;
  height: 56px;
  max-width: 100%;
  margin: 0 auto;
}

.mm-popup__title {
  margin: 0 0 8px;
  font-family: var(--mm-font-display, Georgia, serif);
  font-size: 26px;
  line-height: 1.25;
  color: var(--mm-ink, #1E1E1E);
}

.mm-popup__lead {
  margin: 0 0 24px;
  font-family: var(--mm-font-ui, inherit);
  font-size: .875rem;
  line-height: 1.6;
  color: var(--mm-ink-muted, #5A5A5A);
}

.mm-popup__form {
  text-align: left;
}

.mm-popup__label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mm-font-ui, inherit);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--mm-ink, #1E1E1E);
}

.mm-popup__input {
  width: 100%;
  padding: 13px 14px;
  font-family: var(--mm-font-ui, inherit);
  font-size: .9375rem;
  color: var(--mm-ink, #1E1E1E);
  background: var(--mm-surface, #fff);
  border: 1px solid var(--mm-border-strong, #D4D3CF);
  border-radius: var(--mm-radius, 8px);
  transition: border-color .18s var(--mm-ease, ease), box-shadow .18s var(--mm-ease, ease);
}

.mm-popup__input:focus {
  outline: none;
  border-color: var(--mm-accent, #D23D2D);
  box-shadow: 0 0 0 3px rgba(210, 61, 45, .12);
}

.mm-popup__input.has-error {
  border-color: #EF4444;
}

.mm-popup__error {
  margin: 8px 0 0;
  font-family: var(--mm-font-ui, inherit);
  font-size: .8125rem;
  color: #B91C1C;
}

.mm-popup__error[hidden] {
  display: none;
}

.mm-popup__submit {
  width: 100%;
  margin-top: 14px;
  padding: 14px 20px;
  font-family: var(--mm-font-ui, inherit);
  font-size: .9375rem;
  font-weight: 700;
  color: #fff;
  background: var(--mm-ink, #1E1E1E);
  border: 0;
  border-radius: var(--mm-radius, 8px);
  cursor: pointer;
  transition: background-color .18s var(--mm-ease, ease);
}

.mm-popup__submit:hover,
.mm-popup__submit:focus-visible {
  background: #000;
}

.mm-popup__legal {
  margin: 16px 0 24px;
  font-family: var(--mm-font-ui, inherit);
  font-size: .75rem;
  line-height: 1.6;
  color: var(--mm-ink-subtle, #8A8A8A);
  text-align: left;
}

.mm-popup__legal a {
  color: var(--mm-ink-muted, #5A5A5A);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mm-popup__legal a:hover {
  color: var(--mm-accent, #D23D2D);
}

/* Full-bleed footer strip, mirroring the "are you a brand?" band on the
   pattern this follows. Negative margins undo the dialog's own padding so the
   band reaches both edges. */
.mm-popup__foot {
  margin: 0 -40px;
  padding: 18px 40px;
  background: var(--mm-surface-sunken, #F5F4F2);
  border-top: 1px solid var(--mm-border, #E5E4E1);
  border-radius: 0 0 var(--mm-radius-lg, 12px) var(--mm-radius-lg, 12px);
  font-family: var(--mm-font-ui, inherit);
  font-size: .8125rem;
  color: var(--mm-ink-muted, #5A5A5A);
}

.mm-popup__foot a {
  color: var(--mm-ink, #1E1E1E);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mm-popup__foot a:hover {
  color: var(--mm-accent, #D23D2D);
}

/* Stop the page behind from scrolling while the dialog owns the screen. */
body.mm-popup-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .mm-popup {
    padding: 12px;
  }

  .mm-popup__dialog {
    padding: 32px 24px 0;
  }

  .mm-popup__title {
    font-size: 22px;
  }

  .mm-popup__foot {
    margin: 0 -24px;
    padding: 16px 24px;
  }
}
