/* scripts/activation/pages-template/overlay.css
 * Compliance-frozen overlay. Do not edit copy, buttons, or sizing without a
 * product + compliance review. This file is served verbatim to visitors.
 *
 * Layout:
 *   - Full-viewport backdrop (blurred client-website screenshot).
 *   - Overlay: bottom-sheet on mobile, centered card on desktop.
 *   - Dismiss X: 44x44px minimum tap target, always visible when overlay is.
 *   - Footer: small, persistent, bottom-left.
 */

:root {
  --rm-gold:          #DCA028;
  --rm-gold-hover:    #C98F1F;
  --rm-ink:           #1A1A1A;
  --rm-muted:         #6B6B6B;
  --rm-surface:       #FFFFFF;
  --rm-shadow:        0 10px 40px rgba(0, 0, 0, 0.18);
  --rm-radius:        14px;
  --rm-transition:    320ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --rm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  height: 100%;
  font-family: var(--rm-font);
  background: #0a0a0a;
  color: var(--rm-ink);
  overflow: hidden;
}

/* ── Backdrop ─────────────────────────────────────────────────────────── */
.repmark-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.repmark-backdrop img,
.repmark-backdrop picture {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  filter: blur(6px) saturate(0.9) brightness(0.88);
  transform: scale(1.08);
}

/* Darkening gradient so white overlay stays legible on any backdrop. */
.repmark-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.35) 100%);
}

/* ── Overlay ──────────────────────────────────────────────────────────── */
.repmark-overlay {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(0);
  width: min(92vw, 440px);
  background: var(--rm-surface);
  border-radius: var(--rm-radius);
  box-shadow: var(--rm-shadow);
  opacity: 1;
  transition: transform var(--rm-transition), opacity var(--rm-transition);
  will-change: transform, opacity;
}
.repmark-overlay--hidden {
  transform: translateX(-50%) translateY(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}
.repmark-overlay--dismissed {
  transform: translateX(-50%) translateY(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}

/* Desktop (≥768px): center on viewport as a card, not a bottom-sheet. */
@media (min-width: 768px) {
  .repmark-overlay {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: 480px;
  }
  .repmark-overlay--hidden {
    transform: translate(-50%, -40%);
    opacity: 0;
  }
  .repmark-overlay--dismissed {
    transform: translate(-50%, -60%);
    opacity: 0;
  }
}

.repmark-overlay__inner {
  position: relative;
  padding: 24px 22px 22px;
}

.repmark-overlay__title {
  margin: 0 0 10px;
  padding-right: 36px; /* reserve room for dismiss X */
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--rm-ink);
}
@media (min-width: 768px) {
  .repmark-overlay__title { font-size: 20px; }
}

.repmark-overlay__subtext {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--rm-muted);
}

.repmark-overlay__buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Secondary action row — Call + Directions. Sits below the primary buttons,
 * smaller, links not buttons. Hidden if neither has data wired in.
 */
.repmark-overlay__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.repmark-overlay__action {
  flex: 1 1 0;
  min-height: 40px;
  padding: 10px 14px;
  text-align: center;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--rm-ink);
  background: #F4F4F6;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.repmark-overlay__action[hidden] { display: none; }
.repmark-overlay__action:hover { background: #ECECEF; }
.repmark-overlay__action:focus-visible {
  outline: 2px solid var(--rm-gold);
  outline-offset: 2px;
}
.repmark-overlay__action:active { transform: translateY(1px); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.repmark-overlay__button {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, transform 120ms ease;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.repmark-overlay__button:focus-visible {
  outline: 2px solid var(--rm-gold);
  outline-offset: 2px;
}
.repmark-overlay__button:active {
  transform: translateY(1px);
}

.repmark-overlay__button--primary {
  flex: 2 1 60%;
  background: var(--rm-gold);
  color: #111111;
}
.repmark-overlay__button--primary:hover {
  background: var(--rm-gold-hover);
}

.repmark-overlay__button--secondary {
  flex: 1 1 30%;
  background: transparent;
  color: var(--rm-muted);
  border: 1px solid #DADADA;
}
.repmark-overlay__button--secondary:hover {
  background: #F6F6F6;
  color: var(--rm-ink);
}

/* ── Dismiss ──────────────────────────────────────────────────────────── */
.repmark-overlay__dismiss {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rm-muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 22px;
  transition: background-color 150ms ease, color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.repmark-overlay__dismiss:hover {
  background: #F0F0F0;
  color: var(--rm-ink);
}
.repmark-overlay__dismiss:focus-visible {
  outline: 2px solid var(--rm-gold);
  outline-offset: 2px;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.repmark-footer {
  position: fixed;
  z-index: 5;
  left: 12px;
  bottom: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  letter-spacing: 0.2px;
}
.repmark-footer__link {
  color: inherit;
  text-decoration: none;
  padding: 4px 6px;
}
.repmark-footer__link:hover {
  text-decoration: underline;
}
.repmark-footer__sep {
  opacity: 0.7;
  user-select: none;
}

/* On mobile, keep the overlay clear of the footer. */
@media (max-width: 767px) {
  .repmark-footer { left: 10px; bottom: 4px; }
}

/* Respect reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  .repmark-overlay { transition: opacity var(--rm-transition); }
  .repmark-overlay--hidden,
  .repmark-overlay--dismissed { transform: translateX(-50%) translateY(0); }
  @media (min-width: 768px) {
    .repmark-overlay--hidden,
    .repmark-overlay--dismissed { transform: translate(-50%, -50%); }
  }
}
