/* ============================================================
   REDIRECT GUARD — the "you are leaving OllCorrect" screen
   Shown on every Buy Now / store click before the user is
   handed over to the shopping platform.
   ============================================================ */

#ollRedirectOverlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(11, 25, 56, 0.55);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  font-family: "Outfit", "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: #0b1938;
  overscroll-behavior: contain;
}
#ollRedirectOverlay.ollrg-on { display: flex; }

/* ---------- card ---------- */
.ollrg-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid rgba(11, 25, 56, 0.08);
  border-radius: 22px;
  box-shadow: 0 40px 90px -20px rgba(11, 25, 56, 0.45), 0 4px 14px rgba(11, 25, 56, 0.08);
  animation: ollrgIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes ollrgIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.ollrg-card:focus { outline: none; }

/* ---------- navbar strip (same logo as the site header) ---------- */
.ollrg-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(11, 25, 56, 0.07);
  background: linear-gradient(180deg, #f7fbf7 0%, #ffffff 100%);
  border-radius: 21px 21px 0 0;
  position: sticky;
  top: 0;
  z-index: 2;
}
.ollrg-nav-logo {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 3px 3px 5px rgba(0, 0, 0, 0.12),
    inset -4px -5px 9px rgba(255, 255, 255, 0.9),
    0 6px 10px rgba(11, 25, 56, 0.08);
}
.ollrg-nav-logo img { width: 40px; height: 30px; object-fit: contain; display: block; }
.ollrg-nav-name .row { display: flex; align-items: baseline; gap: 2px; }
.ollrg-nav-name .row span { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: #0b1938; }
.ollrg-nav-name .row span.ollrg-accent { color: #079f34; }
.ollrg-nav-name .sub {
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em;
  color: #64748b; margin-top: -1px; margin-left: 2px;
}
.ollrg-nav-verified {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #079f34;
  background: rgba(7, 159, 52, 0.09);
  border: 1px solid rgba(7, 159, 52, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}
.ollrg-nav-verified svg { width: 12px; height: 12px; fill: currentColor; }

/* ---------- body ---------- */
.ollrg-body { padding: 22px 22px 20px; }

.ollrg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b45309;
  background: #fef6e6;
  border: 1px solid #f6dfae;
  border-radius: 999px;
  padding: 5px 11px;
}
.ollrg-eyebrow svg { width: 12px; height: 12px; fill: currentColor; }

.ollrg-title {
  margin: 12px 0 8px;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #0b1938;
}
.ollrg-lead {
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #475569;
}
.ollrg-lead strong { color: #0b1938; font-weight: 700; }

/* ---------- product + platform card ---------- */
.ollrg-target {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border: 1px solid rgba(11, 25, 56, 0.09);
  border-radius: 16px;
  background: #f8fafc;
}
.ollrg-thumb {
  width: 62px;
  height: 62px;
  min-width: 62px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(11, 25, 56, 0.07);
  object-fit: contain;
  padding: 4px;
  display: block;
}
.ollrg-thumb--ph {
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 20px;
}
.ollrg-txt { min-width: 0; flex: 1; }
.ollrg-pname {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #0b1938;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ollrg-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}
.ollrg-store {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
  background: #fff;
  border: 1px solid rgba(11, 25, 56, 0.1);
  border-radius: 999px;
  padding: 4px 9px 4px 5px;
}
.ollrg-store img { width: 16px; height: 16px; border-radius: 3px; object-fit: contain; }
.ollrg-price { font-size: 14px; font-weight: 800; color: #079f34; }
.ollrg-price del { color: #94a3b8; font-weight: 500; font-size: 12px; margin-left: 5px; }

/* ---------- countdown ---------- */
.ollrg-bar {
  position: relative;
  height: 5px;
  margin: 16px 0 0;
  border-radius: 999px;
  background: rgba(11, 25, 56, 0.08);
  overflow: hidden;
}
.ollrg-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #079f34, #14b8a6);
  transform-origin: left center;
  animation: ollrgDrain 6s linear forwards;
}
@keyframes ollrgDrain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.ollrg-count {
  margin: 8px 0 0;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}
.ollrg-count b { color: #0b1938; }
.ollrg-cancel {
  color: #079f34;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* ---------- actions ---------- */
.ollrg-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.ollrg-btn {
  flex: 1 1 190px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.ollrg-btn:active { transform: translateY(1px); }
.ollrg-btn--go {
  background: #079f34;
  color: #fff;
  box-shadow: 0 10px 20px -8px rgba(7, 159, 52, 0.75);
}
.ollrg-btn--go:hover { background: #068c2d; }
.ollrg-btn--stay {
  flex: 0 1 auto;
  background: #fff;
  color: #334155;
  border-color: rgba(11, 25, 56, 0.16);
}
.ollrg-btn--stay:hover { background: #f1f5f9; }
.ollrg-btn svg { width: 15px; height: 15px; fill: currentColor; flex: none; }

/* ---------- footnote ---------- */
.ollrg-note {
  margin: 16px 0 0;
  padding-top: 13px;
  border-top: 1px dashed rgba(11, 25, 56, 0.13);
  font-size: 11.5px;
  line-height: 1.6;
  color: #7c8aa3;
}
.ollrg-note b { color: #5b6b85; font-weight: 700; }

/* ---------- close (top-right X) ---------- */
.ollrg-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(11, 25, 56, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: #64748b;
  cursor: pointer;
  z-index: 3;
}
.ollrg-x:hover { color: #0b1938; background: #fff; }
.ollrg-x svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ollrg-card.ollrg-manual .ollrg-x { display: flex; }

/* ---------- dark mode ---------- */
html.dark #ollRedirectOverlay { background: rgba(2, 6, 23, 0.72); }
html.dark .ollrg-card {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}
html.dark .ollrg-nav { background: linear-gradient(180deg, #132033 0%, #0f172a 100%); border-bottom-color: rgba(255, 255, 255, 0.08); }
html.dark .ollrg-nav-name .row span { color: #e2e8f0; }
html.dark .ollrg-title { color: #f1f5f9; }
html.dark .ollrg-lead { color: #a3b0c4; }
html.dark .ollrg-lead strong { color: #f1f5f9; }
html.dark .ollrg-target { background: #131f35; border-color: rgba(255, 255, 255, 0.09); }
html.dark .ollrg-thumb { background: #0b1220; border-color: rgba(255, 255, 255, 0.08); }
html.dark .ollrg-pname { color: #f1f5f9; }
html.dark .ollrg-store { background: #0b1220; color: #cbd5e1; border-color: rgba(255, 255, 255, 0.12); }
html.dark .ollrg-bar { background: rgba(255, 255, 255, 0.1); }
html.dark .ollrg-btn--stay { background: #16233a; color: #e2e8f0; border-color: rgba(255, 255, 255, 0.14); }
html.dark .ollrg-btn--stay:hover { background: #1d2c47; }
html.dark .ollrg-note { color: #8494ac; border-top-color: rgba(255, 255, 255, 0.12); }
html.dark .ollrg-note b { color: #a8b6cc; }
html.dark .ollrg-eyebrow { background: rgba(180, 83, 9, 0.16); border-color: rgba(180, 83, 9, 0.4); color: #fbbf24; }
html.dark .ollrg-x { background: #16233a; color: #94a3b8; border-color: rgba(255, 255, 255, 0.12); }

/* ---------- small screens ---------- */
@media (max-width: 520px) {
  .ollrg-body { padding: 18px 16px 16px; }
  .ollrg-nav { padding: 12px 16px; }
  .ollrg-nav-verified { display: none; }
  .ollrg-title { font-size: 21px; }
  .ollrg-lead { font-size: 13.5px; }
  .ollrg-btn { flex: 1 1 100%; }
}

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  .ollrg-card { animation: none; }
  .ollrg-bar span { animation: none; }
}
body.ollrg-lock { overflow: hidden !important; }
