/* ============================================================
   LenaDena.in -- Internal Ad System Stylesheet
   Promotes Abhay's own ventures to free users.
   Premium users (localStorage.lenadenaPremium === 'true') see no ads.
   ============================================================ */

/* Base ad card -- looks native, not spammy */
.ld-ad {
  position: relative;
  background: linear-gradient(135deg, var(--surface, #fff) 0%, var(--bg-paper, #FBF6E9) 100%);
  border: 1px solid var(--line, #E8E0CC);
  border-radius: var(--radius, 14px);
  padding: 16px 18px;
  margin: 14px 0;
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: var(--ink, #0D1B2A);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.ld-ad:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 27, 42, 0.10);
  border-color: var(--brand-accent, #F4C430);
}

/* Tiny "Ad" label (transparent, ethical) */
.ld-ad::before {
  content: 'Ad · Apna venture';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-fade, #8B95A3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.85);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

/* Icon block */
.ld-ad-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--bg-cream, #F5EFE0);
}
.ld-ad-icon.brand-byd  { background: linear-gradient(135deg, #F4C430, #D4A017); color: #0D1B2A; }
.ld-ad-icon.brand-dw   { background: linear-gradient(135deg, #C0392B, #7F1D1D); color: #fff; }
.ld-ad-icon.brand-sssk { background: linear-gradient(135deg, #1B7943, #064E3B); color: #fff; }

.ld-ad-body { flex: 1; min-width: 0; }
.ld-ad-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 3px;
  color: var(--ink, #0D1B2A);
}
.ld-ad-tag {
  font-size: 12.5px;
  color: var(--ink-soft, #4A5568);
  margin: 0 0 6px;
  line-height: 1.4;
}
.ld-ad-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-accent-deep, #D4A017);
  letter-spacing: 0.02em;
}

/* -- BANNER variant (wide, top of dashboard) -- */
.ld-ad.ld-ad-banner {
  padding: 12px 16px;
  margin: 10px 0 16px;
}
.ld-ad-banner .ld-ad-icon { width: 44px; height: 44px; font-size: 22px; border-radius: 10px; }
.ld-ad-banner .ld-ad-title { font-size: 14px; }
.ld-ad-banner .ld-ad-tag { font-size: 12px; -webkit-line-clamp: 1; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

/* -- COMPACT variant (in-feed, between ledger entries) -- */
.ld-ad.ld-ad-compact {
  padding: 10px 12px;
  background: var(--bg-cream, #F5EFE0);
  border-style: dashed;
}
.ld-ad-compact .ld-ad-icon { width: 40px; height: 40px; font-size: 20px; }
.ld-ad-compact .ld-ad-title { font-size: 13.5px; }
.ld-ad-compact .ld-ad-tag { font-size: 11.5px; }

/* -- EMPTY-STATE variant (3 cards in a row, when list is empty) -- */
.ld-ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.ld-ads-grid .ld-ad {
  flex-direction: column;
  text-align: center;
  align-items: center;
  padding: 22px 16px;
}
.ld-ads-grid .ld-ad-icon { width: 64px; height: 64px; font-size: 32px; }

/* -- STICKY FOOTER variant (mobile-friendly small banner) -- */
.ld-ad-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface, #fff);
  border-top: 1px solid var(--line, #E8E0CC);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 90;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: var(--ink, #0D1B2A);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.ld-ad-sticky-icon { font-size: 22px; flex-shrink: 0; }
.ld-ad-sticky-text { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.3; }
.ld-ad-sticky-text b { font-family: 'Fraunces', serif; font-weight: 700; }
.ld-ad-sticky-close {
  background: transparent;
  border: none;
  color: var(--ink-fade, #8B95A3);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* -- PREMIUM badge (shown to non-premium users instead of nothing) -- */
.ld-premium-promo {
  background: linear-gradient(135deg, #FFF8DC, #F4C430);
  border: 1px solid #D4A017;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
  font-size: 13px;
  color: #0D1B2A;
  text-align: center;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.ld-premium-promo b { font-family: 'Fraunces', serif; font-size: 15px; }
.ld-premium-promo a {
  display: inline-block;
  margin-top: 8px;
  background: #0D1B2A;
  color: #F4C430;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 12.5px;
}
.ld-premium-promo a:hover { background: #1A3352; }

/* -- HIDE all ads when premium -- */
body.lenadena-premium .ld-ad,
body.lenadena-premium .ld-ad-sticky,
body.lenadena-premium .ld-ads-grid,
body.lenadena-premium .ld-premium-promo {
  display: none !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .ld-ad { padding: 12px 14px; gap: 10px; }
  .ld-ad-icon { width: 48px; height: 48px; font-size: 24px; }
  .ld-ad-title { font-size: 14px; }
  .ld-ad-tag { font-size: 12px; }
}
