/* ============================================================
   MEA Reviews — CTA Button
   The single call-to-action primitive used across every review and
   category page. Three shapes, one system:

     .mea-cta--primary    filled gradient "Play now / Get bonus"
     .mea-cta--secondary  outline / ghost "Read review / Visit site"
     .mea-cta-sticky      mobile-only fixed bottom action bar

   Light "tech / computer" theme, znaki-style. Tokens are scoped to
   the component roots so a page can drop the buttons anywhere without
   leaking variables. Per-category accent via
   .mea-cta--{casino|betting|slots|crash} (works on buttons and on the
   sticky bar). Self-contained — no external CSS or JS, inline SVG only.
   ============================================================ */

.mea-cta,
.mea-cta-sticky {
  --cta-bg: #ffffff;
  --cta-surface: #f4f4f4;
  --cta-border: #dbe3ee;
  --cta-text: #1f2733;
  --cta-muted: #5b6676;
  --cta-faint: #8a94a6;
  --cta-accent: #0f62fe;
  --cta-accent-2: #06b6d4;

  --cta-radius: 0;
  --cta-radius-sm: 0;

  --cta-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --cta-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --cta-duration: 200ms;
  --cta-ease: cubic-bezier(0.16, 1, 0.3, 1);

  font-family: var(--cta-sans);
}

/* per-category accent */
.mea-cta--casino,  .mea-cta-sticky--casino  { --cta-accent: #0f62fe; --cta-accent-2: #06b6d4; }
.mea-cta--betting, .mea-cta-sticky--betting { --cta-accent: #16a34a; --cta-accent-2: #22d3ee; }
.mea-cta--slots,   .mea-cta-sticky--slots   { --cta-accent: #7c3aed; --cta-accent-2: #ec4899; }
.mea-cta--crash,   .mea-cta-sticky--crash   { --cta-accent: #ea580c; --cta-accent-2: #f59e0b; }

/* ============================================================
   Base button — shared geometry for primary + secondary
   ============================================================ */
.mea-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--cta-radius-sm);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--cta-duration) var(--cta-ease),
              box-shadow var(--cta-duration) var(--cta-ease),
              background-color var(--cta-duration) var(--cta-ease),
              border-color var(--cta-duration) var(--cta-ease),
              color var(--cta-duration) var(--cta-ease);
}
.mea-cta svg { width: 16px; height: 16px; flex: 0 0 auto; }

.mea-cta:focus-visible {
  outline: 2px solid var(--cta-accent);
  outline-offset: 2px;
}

/* the arrow nudges on hover */
.mea-cta .mea-cta__arrow { transition: transform var(--cta-duration) var(--cta-ease); }
.mea-cta:hover .mea-cta__arrow { transform: translateX(3px); }

/* ---------- Primary: filled gradient (high-visibility "Play" action) ---------- */
.mea-cta--primary {
  color: #fff;
  padding: 0.95rem 1.7rem;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cta-accent), color-mix(in srgb, var(--cta-accent-2) 60%, var(--cta-accent)));
  /* coloured glow lifts the button off the flat light page so it can't be missed */
  box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--cta-accent) 82%, transparent),
              0 2px 8px -2px color-mix(in srgb, var(--cta-accent) 45%, transparent);
}
/* periodic light sweep to draw the eye to the primary CTA */
.mea-cta--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 42%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg);
  animation: mea-cta-sheen 4.5s ease-in-out infinite;
  pointer-events: none;
}
.mea-cta--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -10px color-mix(in srgb, var(--cta-accent) 92%, transparent),
              0 3px 10px -2px color-mix(in srgb, var(--cta-accent) 55%, transparent);
}
.mea-cta--primary:active { transform: translateY(-1px); }

@keyframes mea-cta-sheen {
  0%   { left: -60%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .mea-cta--primary::after { animation: none; opacity: 0; }
  .mea-cta--primary:hover { transform: none; }
}

/* ---------- Secondary: outline / ghost ---------- */
.mea-cta--secondary {
  color: var(--cta-accent);
  background: var(--cta-bg);
  border-color: color-mix(in srgb, var(--cta-accent) 40%, var(--cta-border));
  box-shadow: none;
}
.mea-cta--secondary:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--cta-accent) 7%, var(--cta-bg));
  border-color: var(--cta-accent);
}
.mea-cta--secondary:active { transform: translateY(0); }

/* ---------- Size + width modifiers ---------- */
.mea-cta--sm  { padding: 0.55rem 1rem;   font-size: 0.85rem; border-radius: 0; }
.mea-cta--lg  { padding: 1rem 1.9rem;    font-size: 1.05rem; }
.mea-cta--block { display: flex; width: 100%; }

/* disabled / non-interactive */
.mea-cta[aria-disabled="true"],
.mea-cta:disabled {
  opacity: 0.5;
  pointer-events: none;
  box-shadow: none;
}

/* ============================================================
   Mobile sticky action bar
   Hidden on desktop; pinned to the bottom of the viewport on
   narrow screens so the offer + primary CTA follow the reader.
   ============================================================ */
.mea-cta-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none; /* shown < 780px */
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--cta-bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid var(--cta-border);
  box-shadow: none;
}

/* thin accent line along the top edge */
.mea-cta-sticky::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cta-accent), var(--cta-accent-2));
}

.mea-cta-sticky__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1 1 auto;
}
.mea-cta-sticky__avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: linear-gradient(150deg, var(--cta-accent), var(--cta-accent-2));
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}
.mea-cta-sticky__avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.mea-cta-sticky__copy { display: grid; gap: 0.1rem; min-width: 0; }
.mea-cta-sticky__offer {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--cta-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mea-cta-sticky__offer b { color: var(--cta-accent); }
.mea-cta-sticky__terms {
  font-size: 0.66rem;
  color: var(--cta-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mea-cta-sticky .mea-cta { flex: 0 0 auto; }

/* show the sticky bar only where it belongs, and lift the primary
   button padding so it stays thumb-friendly */
@media (max-width: 780px) {
  .mea-cta-sticky { display: flex; }
}
@media (max-width: 420px) {
  .mea-cta-sticky__terms { display: none; }
  .mea-cta-sticky .mea-cta { padding: 0.7rem 1.05rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .mea-cta,
  .mea-cta .mea-cta__arrow { transition: none; }
  .mea-cta:hover { transform: none; }
  .mea-cta:hover .mea-cta__arrow { transform: none; }
}
