/* ==========================================================================
   ReUseNaija popups
   Desktop: centered card (scale-in) / split image card / corner card.
   Phones (<576px): every modal becomes a bottom sheet with a drag handle.
   ========================================================================== */
.rn-pop { position: fixed; inset: 0; z-index: 2050; display: flex; align-items: center; justify-content: center; padding: 20px; }
.rn-pop[hidden] { display: none; }
.rn-pop__backdrop { position: absolute; inset: 0; background: rgba(10, 33, 25, .55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s ease; }
.rn-pop__card { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--rn-white); border-radius: var(--rn-radius-xl);
  box-shadow: 0 30px 80px rgba(10, 51, 38, .35); transform: translateY(18px) scale(.96); opacity: 0; transition: transform .38s cubic-bezier(.2, .9, .3, 1.2), opacity .25s ease; outline: none; }
.rn-pop.is-open .rn-pop__backdrop { opacity: 1; }
.rn-pop.is-open .rn-pop__card { transform: none; opacity: 1; }
.rn-pop__card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, var(--rn-emerald), var(--rn-amber)); border-radius: var(--rn-radius-xl) var(--rn-radius-xl) 0 0; z-index: 2; }
.rn-pop__close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--rn-text); display: grid; place-items: center; box-shadow: var(--rn-shadow-sm); transition: transform .15s, background .15s; }
.rn-pop__close:hover { transform: rotate(90deg); background: var(--rn-disabled); }
.rn-pop__handle { display: none; }
.rn-pop__body { padding: 34px 28px 26px; text-align: center; }
.rn-pop__icon { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; font-size: 2rem; color: var(--rn-white);
  background: radial-gradient(120% 120% at 0% 0%, #1B7553, var(--rn-emerald) 55%, var(--rn-emerald-900)); box-shadow: 0 12px 28px rgba(20, 92, 66, .35); animation: rn-pop-icon .6s .15s both; }
@keyframes rn-pop-icon { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.rn-pop--t-deals .rn-pop__icon, .rn-pop--t-wishlist_auth .rn-pop__icon { background: radial-gradient(120% 120% at 0% 0%, #FBBF4A, var(--rn-amber) 55%, var(--rn-amber-700)); color: var(--rn-text); box-shadow: 0 12px 28px rgba(245, 158, 11, .4); }
.rn-pop__title { font-size: clamp(1.35rem, 3.6vw, 1.7rem); line-height: 1.15; margin-bottom: 8px; letter-spacing: -0.03em; }
.rn-pop__sub { color: var(--rn-text-muted); font-size: 15px; margin-bottom: 18px; }
.rn-pop__text { color: var(--rn-text-muted); font-size: 14.5px; }
.rn-pop__fine { font-size: 12px; color: var(--rn-text-muted); margin: 10px 0 0; }
.rn-pop__link { display: inline-block; margin-top: 12px; border: 0; background: none; color: var(--rn-text-muted); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.rn-pop__link:hover { color: var(--rn-emerald); }
.rn-pop__form { text-align: left; }

/* Split image layout */
.rn-pop--side_image.has-visual .rn-pop__card { max-width: 820px; display: grid; grid-template-columns: 1fr 1.05fr; }
.rn-pop--side_image.has-visual .rn-pop__body { text-align: left; padding: 44px 36px 32px; display: flex; flex-direction: column; justify-content: center; }
.rn-pop__visual { position: relative; min-height: 380px; background: var(--rn-emerald-900); overflow: hidden; border-radius: var(--rn-radius-xl) 0 0 var(--rn-radius-xl); }
.rn-pop__visual > img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.rn-pop__visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(20, 92, 66, .05), rgba(10, 51, 38, .5)); pointer-events: none; }
.rn-pop__mosaic { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; padding: 6px; }
.rn-pop__mosaic img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.rn-pop__mosaic img:first-child { grid-row: span 2; }
.rn-pop__ribbon { position: absolute; left: 18px; bottom: 18px; z-index: 2; background: var(--rn-amber); color: var(--rn-text); font-weight: 800; font-size: 13px; padding: 8px 14px; border-radius: 999px; box-shadow: var(--rn-shadow); }

/* Corner card (non-blocking) */
.rn-pop--corner { inset: auto 24px 24px auto; padding: 0; display: block; }
.rn-pop--corner[hidden] { display: none; }
.rn-pop--corner .rn-pop__card { max-width: 380px; box-shadow: var(--rn-shadow-lg); }
.rn-pop--corner .rn-pop__body { text-align: left; padding: 26px 22px 20px; }
.rn-pop--corner .rn-pop__icon { width: 52px; height: 52px; font-size: 1.4rem; border-radius: 16px; margin: 0 0 10px; }
.rn-pop--corner .rn-pop__title { font-size: 1.2rem; padding-right: 30px; }

/* Bottom-sheet layout */
.rn-pop--bottom_sheet { align-items: flex-end; padding: 0; }
.rn-pop--bottom_sheet .rn-pop__card { max-width: 560px; border-radius: var(--rn-radius-xl) var(--rn-radius-xl) 0 0; transform: translateY(100%); }

/* Type-specific content */
.rn-pop__states { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rn-pop__states a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border: 1px solid var(--rn-border); border-radius: var(--rn-radius); color: var(--rn-text); font-weight: 700; font-size: 13.5px; transition: all .15s; }
.rn-pop__states a:hover { border-color: var(--rn-emerald); background: var(--rn-emerald-tint); color: var(--rn-emerald); transform: translateY(-2px); }
.rn-pop__states small { font-size: 11px; font-weight: 700; color: var(--rn-emerald); background: var(--rn-emerald-tint); padding: 0 7px; border-radius: 999px; }
.rn-pop__deals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: left; }
.rn-pop__deals a { color: var(--rn-text); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rn-pop__deal-img { position: relative; aspect-ratio: 1; border-radius: var(--rn-radius); overflow: hidden; background: var(--rn-disabled); }
.rn-pop__deal-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.rn-pop__deals a:hover img { transform: scale(1.06); }
.rn-pop__deal-img em { position: absolute; top: 6px; left: 6px; font-style: normal; background: var(--rn-emerald); color: var(--rn-white); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.rn-pop__deal-title { font-size: 12.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rn-pop__deals strong { color: var(--rn-emerald); font-size: 14px; }
.rn-pop__tips, .rn-pop__perks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; text-align: left; }
.rn-pop__tips li { display: flex; gap: 10px; font-size: 13.5px; color: var(--rn-text-muted); }
.rn-pop__tips li .bi { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--rn-emerald-tint); color: var(--rn-emerald); }
.rn-pop__tips strong { color: var(--rn-text); }
.rn-pop__perks li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
.rn-pop__perks li .bi { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--rn-amber-tint); color: var(--rn-amber-700); flex: none; }
.rn-pop__hearts { position: relative; height: 34px; margin: -6px 0 14px; }
.rn-pop__hearts .bi { position: absolute; left: 50%; color: var(--rn-emerald); opacity: 0; animation: rn-heart-float 2.4s ease-in-out infinite; }
.rn-pop__hearts .bi:nth-child(2) { animation-delay: .8s; margin-left: -28px; color: var(--rn-amber); }
.rn-pop__hearts .bi:nth-child(3) { animation-delay: 1.6s; margin-left: 22px; }
@keyframes rn-heart-float { 0% { transform: translateY(20px) scale(.6); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-14px) scale(1.1); opacity: 0; } }
.rn-pop__success { padding: 10px 0; text-align: center; }
.rn-pop__success .bi { font-size: 3rem; color: var(--rn-emerald); display: block; margin-bottom: 6px; }

/* Cookie / notice bar */
.rn-pbar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2040; display: flex; justify-content: center; transform: translateY(160%); transition: transform .45s cubic-bezier(.2, .9, .3, 1.1); pointer-events: none; }
.rn-pbar[hidden] { display: none; }
.rn-pbar.is-open { transform: none; }
.rn-pbar__inner { pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 880px; width: 100%; background: var(--rn-emerald-900); color: rgba(255, 255, 255, .88); border-radius: var(--rn-radius-lg); padding: 14px 16px; box-shadow: var(--rn-shadow-lg); font-size: 13.5px; }
.rn-pbar__inner strong { color: var(--rn-white); }
.rn-pbar__inner a { color: var(--rn-amber); font-weight: 700; margin-left: 4px; }
.rn-pbar__icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(245, 158, 11, .18); color: var(--rn-amber); display: grid; place-items: center; font-size: 1.25rem; flex: none; }
.rn-pbar__text { flex: 1; }
.rn-pbar .btn { flex: none; }

/* Keep corner cards clear of the notice bar while it's visible */
.rn-bar-open .rn-pop--corner { bottom: 112px; transition: bottom .3s ease; }

@media (max-width: 991.98px) {
  .rn-bar-open .rn-pop--corner { bottom: calc(var(--rn-bottom-nav-h) + 150px + env(safe-area-inset-bottom)); }
  .rn-pbar { bottom: calc(var(--rn-bottom-nav-h) + 12px + env(safe-area-inset-bottom)); }
  .rn-pop--corner { inset: auto 12px calc(var(--rn-bottom-nav-h) + 12px + env(safe-area-inset-bottom)) 12px; }
  .rn-pop--corner .rn-pop__card { max-width: none; }
}

/* Phones: modal layouts become bottom sheets */
@media (max-width: 575.98px) {
  .rn-pop:not(.rn-pop--corner) { align-items: flex-end; padding: 0; }
  .rn-pop:not(.rn-pop--corner) .rn-pop__card { max-width: none; max-height: 92vh; border-radius: 26px 26px 0 0; transform: translateY(100%); opacity: 1; transition: transform .42s cubic-bezier(.2, .9, .3, 1); padding-bottom: env(safe-area-inset-bottom); }
  .rn-pop:not(.rn-pop--corner) .rn-pop__card::before { border-radius: 26px 26px 0 0; }
  .rn-pop.is-open .rn-pop__card { transform: none; }
  .rn-pop__handle { display: block; width: 44px; height: 5px; border-radius: 999px; background: #DDDDDD; margin: 12px auto 0; }
  .rn-pop__body { padding: 18px 20px 22px; }
  .rn-pop--side_image.has-visual .rn-pop__card { display: block; }
  .rn-pop--side_image.has-visual .rn-pop__body { padding: 20px 20px 24px; text-align: center; }
  .rn-pop__visual { height: 150px; min-height: 0; border-radius: 0; margin-top: 10px; }
  .rn-pop__mosaic { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr; }
  .rn-pop__mosaic img:first-child { grid-row: auto; }
  .rn-pop__icon { width: 60px; height: 60px; font-size: 1.6rem; border-radius: 18px; }
  .rn-pop__states a { padding: 10px 4px; font-size: 12.5px; }
  .rn-pop__deals { gap: 8px; }
  .rn-pbar__inner { flex-wrap: wrap; }
  .rn-pbar__icon { display: none; }
  .rn-pbar .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .rn-pop__card, .rn-pbar { transition: none !important; } .rn-pop__hearts { display: none; } }
body.rn-pop-open { overflow: hidden; }

/* ==========================================================================
   Install-app & notification prompts (.rn-appsheet)
   Desktop: corner card. Phones: full-width bottom sheet with a backdrop.
   ========================================================================== */
.rn-appsheet { z-index: 2060; }
.rn-appsheet .rn-pop__card { max-width: 400px; }
.rn-appsheet .rn-pop__body { text-align: left; padding: 24px 22px 18px; }
.rn-appsheet__head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding-right: 34px; }
.rn-appsheet__icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 8px 20px rgba(20, 92, 66, .28); flex-shrink: 0; }
.rn-appsheet__bell { width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.5rem; color: var(--rn-text);
  background: radial-gradient(120% 120% at 0% 0%, #FBBF4A, var(--rn-amber) 60%); box-shadow: 0 10px 24px rgba(245, 158, 11, .35); animation: rn-bell 1.6s .4s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes rn-bell { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }
.rn-appsheet .rn-pop__title { font-size: 1.3rem; margin: 0; padding: 0; }
.rn-appsheet__meta { margin: 4px 0 0; font-size: 14px; color: var(--rn-text-muted); }
.rn-appsheet__perks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; font-size: 15px; }
.rn-appsheet__perks i { color: var(--rn-emerald); width: 22px; display: inline-block; }
.rn-appsheet__steps { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.rn-appsheet__steps li { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 10px; font-size: 15px; background: var(--rn-disabled); border-radius: 14px; padding: 10px 12px; }
.rn-appsheet__n { width: 26px; height: 26px; border-radius: 50%; background: var(--rn-emerald); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; flex-shrink: 0; }
.rn-appsheet__glyph { vertical-align: middle; margin: 0 2px; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #fff; color: #0A84FF; font-size: 1.05rem; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.rn-appsheet__pointer { text-align: center; color: var(--rn-emerald); font-size: 1.6rem; line-height: 1; animation: rn-point 1.2s ease-in-out infinite; }
@keyframes rn-point { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.rn-appsheet__preview { display: flex; gap: 10px; align-items: center; background: var(--rn-disabled); border-radius: 14px; padding: 10px 12px; margin: 4px 0 16px; font-size: 14px; }
.rn-appsheet__preview img { border-radius: 9px; flex-shrink: 0; }
.rn-appsheet__preview div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.rn-appsheet__preview small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--rn-text-muted); font-weight: 700; }
.rn-appsheet__preview span { color: var(--rn-text-muted); }
.rn-appsheet .rn-pop__link { display: block; margin: 10px auto 0; }
.rn-appsheet .rn-pop__fine { text-align: center; }
body.rn-bar-open .rn-appsheet.rn-pop--corner { bottom: 110px; }

@media (max-width: 575.98px) {
  .rn-appsheet.rn-pop--corner { inset: 0; display: flex; align-items: flex-end; }
  .rn-appsheet.rn-pop--corner[hidden] { display: none; }
  .rn-appsheet.rn-pop--corner::before { content: ""; position: absolute; inset: 0; background: rgba(10, 33, 25, .5); opacity: 0; transition: opacity .3s; }
  .rn-appsheet.is-open::before { opacity: 1; }
  .rn-appsheet .rn-pop__card { max-width: none; border-radius: 26px 26px 0 0; transform: translateY(100%); opacity: 1; transition: transform .42s cubic-bezier(.2, .9, .3, 1);
    padding-bottom: env(safe-area-inset-bottom); max-height: 92vh; }
  .rn-appsheet .rn-pop__card::before { border-radius: 26px 26px 0 0; }
  .rn-appsheet.is-open .rn-pop__card { transform: none; }
  body.rn-bar-open .rn-appsheet.rn-pop--corner { bottom: 0; }
}

/* Installed-app niceties */
.rn-standalone [data-rn-install-open] { display: none !important; }
