/* Guest membership incentive on category listings — Mnk storefront */

.mnk-mem-prompt {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding:
    max(0.75rem, env(safe-area-inset-top, 0px))
    max(0.75rem, env(safe-area-inset-right, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px))
    max(0.75rem, env(safe-area-inset-left, 0px));
  background: rgba(42, 36, 34, 0.48);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: mnk-mem-prompt-fade 0.22s ease-out;
  overscroll-behavior: contain;
}

.mnk-mem-prompt[hidden] {
  display: none !important;
}

@keyframes mnk-mem-prompt-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mnk-mem-prompt__card {
  position: relative;
  width: min(400px, 100%);
  max-height: min(90dvh, 90vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1.5rem 1.35rem 1.35rem;
  background:
    radial-gradient(420px 180px at 12% 0%, #f0d5cf 0%, transparent 60%),
    linear-gradient(180deg, #fffdfb 0%, #faf6f3 100%);
  border: 1px solid var(--line, #eadfd9);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(80, 40, 30, 0.16);
  color: var(--ink, #2a2422);
  animation: mnk-mem-prompt-rise 0.28s ease-out;
  box-sizing: border-box;
}

@keyframes mnk-mem-prompt-rise {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .mnk-mem-prompt,
  .mnk-mem-prompt__card {
    animation: none;
  }
}

.mnk-mem-prompt__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 253, 251, 0.85);
  color: var(--muted, #7a6f6c);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mnk-mem-prompt__close:hover,
.mnk-mem-prompt__close:active {
  background: rgba(208, 71, 62, 0.1);
  color: var(--ink, #2a2422);
}

.mnk-mem-prompt__close:focus-visible {
  outline: 2px solid var(--brand, #d0473e);
  outline-offset: 2px;
}

.mnk-mem-prompt__eyebrow {
  margin: 0 2.5rem 0.35rem 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand, #d0473e);
}

.mnk-mem-prompt__title {
  margin: 0 2.75rem 0.55rem 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(1.2rem, 4.2vw, 1.45rem);
  font-weight: 650;
  line-height: 1.28;
  color: var(--ink, #2a2422);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mnk-mem-prompt__text {
  margin: 0 0 1.15rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted, #7a6f6c);
  overflow-wrap: anywhere;
}

.mnk-mem-prompt__actions {
  display: grid;
  gap: 0.7rem;
}

.mnk-mem-prompt__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--brand, #d0473e);
  color: #fff !important;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mnk-mem-prompt__cta:hover,
.mnk-mem-prompt__cta:active {
  background: var(--brand-soft, #c45a52);
  text-decoration: none !important;
}

.mnk-mem-prompt__cta:focus-visible {
  outline: 2px solid var(--brand, #d0473e);
  outline-offset: 2px;
}

.mnk-mem-prompt__google-wrap {
  display: grid;
  gap: 0.45rem;
}

.mnk-mem-prompt__google-hint {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--muted, #7a6f6c);
  text-align: center;
}

.mnk-mem-prompt .auth-social-btn {
  width: 100%;
  max-width: none;
  min-height: 48px;
  padding: 12px 14px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mnk-mem-prompt .auth-social-btn__label {
  white-space: normal;
  text-align: center;
}

.mnk-mem-prompt__later {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--muted, #7a6f6c);
  font: inherit;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mnk-mem-prompt__later:hover,
.mnk-mem-prompt__later:active {
  color: var(--ink, #2a2422);
}

.mnk-mem-prompt__later:focus-visible {
  outline: 2px solid var(--brand, #d0473e);
  outline-offset: 2px;
  border-radius: 6px;
}

body.mnk-mem-prompt-open {
  overflow: hidden;
  touch-action: none;
}

/* Narrow phones (~390px): bottom sheet, safer insets, larger tap targets */
@media (max-width: 480px) {
  .mnk-mem-prompt {
    place-items: end center;
    padding:
      max(0.5rem, env(safe-area-inset-top, 0px))
      max(0.5rem, env(safe-area-inset-right, 0px))
      max(0.5rem, env(safe-area-inset-bottom, 0px))
      max(0.5rem, env(safe-area-inset-left, 0px));
  }

  .mnk-mem-prompt__card {
    width: 100%;
    max-height: min(85dvh, 85vh);
    padding: 1.25rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 12px 12px;
    animation-name: mnk-mem-prompt-sheet;
  }

  @keyframes mnk-mem-prompt-sheet {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .mnk-mem-prompt__close {
    top: 0.35rem;
    right: 0.35rem;
    width: 3rem;
    height: 3rem;
  }

  .mnk-mem-prompt__title {
    font-size: 1.22rem;
    margin-right: 3rem;
  }

  .mnk-mem-prompt__text {
    font-size: 0.92rem;
    margin-bottom: 1rem;
  }

  .mnk-mem-prompt__actions {
    gap: 0.75rem;
  }

  .mnk-mem-prompt__cta,
  .mnk-mem-prompt .auth-social-btn {
    min-height: 50px;
  }
}

/* Very short viewports (landscape phone / small height) */
@media (max-height: 520px) {
  .mnk-mem-prompt {
    place-items: center;
  }

  .mnk-mem-prompt__card {
    max-height: min(92dvh, 92vh);
    padding: 1rem 1rem 0.9rem;
  }

  .mnk-mem-prompt__text {
    margin-bottom: 0.75rem;
  }

  .mnk-mem-prompt__actions {
    gap: 0.5rem;
  }
}
