/* ============================================================
   FutureBatao — Components
   Buttons, navbar, footer, cards, badges, pills.
   Shared across all pages.
   ============================================================ */

/* ---------- Buttons (yellow pills + white outline, Astrotalk style) ---------- */
.btn-fb {
  --_bg: var(--c-yellow-400);
  --_bgh: var(--c-yellow-500);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: var(--fw-bold); font-size: var(--fs-base);
  line-height: 1; padding: .85rem 1.7rem; border: 0; border-radius: var(--r-pill);
  color: var(--c-on-yellow); background: var(--_bg); cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn-fb:hover { background: var(--_bgh); color: var(--c-on-yellow); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.btn-fb:active { transform: translateY(0); }

/* Chat CTA = the primary yellow pill (Astrotalk's "Get Free Chat") */
.btn-fb--chat { --_bg: var(--c-yellow-400); --_bgh: var(--c-yellow-500); color: var(--c-on-yellow); box-shadow: var(--sh-glow); }
.btn-fb--chat:hover { box-shadow: 0 10px 26px rgba(255,180,46,.55); }

/* White / outline secondary ("Download The App", "Compatibility") */
.btn-fb--ghost {
  background: #fff; color: var(--c-plum-900);
  box-shadow: inset 0 0 0 1.5px var(--c-line);
}
.btn-fb--ghost:hover { color: var(--c-plum-900); background: #fff; box-shadow: inset 0 0 0 1.5px var(--c-plum-300); transform: translateY(-1px); }
.btn-fb--chat-ghost { background: #fff; color: var(--c-plum-900); box-shadow: inset 0 0 0 1.5px var(--c-line); }
.btn-fb--chat-ghost:hover { background: #fff; box-shadow: inset 0 0 0 1.5px var(--c-plum-300); }

.btn-fb--gold { --_bg: var(--c-gold-500); --_bgh: var(--c-gold-600); color: #3a2a06; }
.btn-fb--light { --_bg: #fff; --_bgh: #fff; color: var(--c-plum-900); box-shadow: var(--sh-sm); }

.btn-fb--sm { padding: .55rem 1.05rem; font-size: var(--fs-sm); }
.btn-fb--lg { padding: 1.05rem 2.1rem; font-size: var(--fs-md); }
.btn-fb--block { width: 100%; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .42rem .85rem; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-semi); letter-spacing: .02em;
  background: var(--c-saffron-50); color: var(--c-saffron-700);
  border: 1px solid var(--c-saffron-100);
}
.pill--gold { background: #FBF2D6; color: var(--c-gold-600); border-color: var(--c-gold-300); }
.pill--live { background: rgba(46,158,107,.12); color: var(--c-success); border-color: rgba(46,158,107,.25); }
.pill--live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-success); box-shadow: 0 0 0 0 rgba(46,158,107,.6); animation: fb-pulse 1.8s infinite; }
@keyframes fb-pulse { 0% { box-shadow: 0 0 0 0 rgba(46,158,107,.55); } 70% { box-shadow: 0 0 0 7px rgba(46,158,107,0); } 100% { box-shadow: 0 0 0 0 rgba(46,158,107,0); } }

/* ---------- Card ---------- */
.fb-card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-md); box-shadow: var(--sh-xs);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.fb-card--hover:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--c-saffron-200); }

/* ---------- Astrologer card (photo-driven marketplace, shared) ---------- */
.astro-card { height: 100%; padding: var(--s-4); display: flex; flex-direction: column; text-align: center; align-items: center; }
.astro-card__head { display: flex; flex-direction: column; align-items: center; gap: .15rem; color: inherit; width: 100%; }
.astro-card__head:hover { color: inherit; }
.astro-card__head:hover .astro-card__name { color: var(--c-saffron-700); }

/* circular photo with green "online" ring */
.astro-card__pic {
  position: relative; width: 76px; height: 76px; border-radius: 50%; flex: 0 0 auto;
  margin-bottom: var(--s-3); padding: 3px; background: var(--c-line);
}
.astro-card__pic.is-online { background: var(--c-green-500); }
.astro-card__pic img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; border: 2px solid #fff; background: var(--c-cream); }
.astro-card__pic.is-online::after {
  content: ""; position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--c-green-500); border: 2px solid #fff;
  animation: fb-ping 2s ease-out infinite;
}
@keyframes fb-ping {
  0% { box-shadow: 0 0 0 0 rgba(31,168,81,.5); }
  70% { box-shadow: 0 0 0 7px rgba(31,168,81,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,168,81,0); }
}

.astro-card__id { min-width: 0; width: 100%; }
.astro-card__name { font-size: var(--fs-md); font-weight: var(--fw-semi); margin: 0; transition: color var(--dur-fast) var(--ease); }
.astro-card__skills { font-size: var(--fs-sm); color: var(--c-ink-soft); margin: .1rem 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.astro-card__langs { font-size: var(--fs-xs); color: var(--c-muted); margin: .1rem 0 0; }
.astro-card__meta { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: var(--s-3) 0; font-size: var(--fs-sm); }
.astro-card__rating { font-weight: var(--fw-semi); color: var(--c-plum-900); }
.astro-card__rating::before { content: "★ "; color: var(--c-gold-500); }
.astro-card__foot { display: flex; flex-direction: column; gap: var(--s-2); margin-top: auto; width: 100%; }
.astro-card__price { font-size: var(--fs-sm); }
.astro-card__price s { color: var(--c-muted); }
.astro-card__price b { color: var(--c-plum-900); font-size: var(--fs-base); }

/* tags chip (profile page + horoscope traits) */
.astro-tag {
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
  padding: .28rem .6rem; border-radius: var(--r-pill);
  background: var(--c-saffron-50); color: var(--c-saffron-700); border: 1px solid var(--c-saffron-100);
}

/* ---------- Zodiac card (shared: homepage strip + horoscope index) ---------- */
.zodiac-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-3); }
.zodiac-card {
  --_tint: var(--c-saffron-300);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: .15rem; padding: var(--s-4) var(--s-2);
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md);
  color: var(--c-plum-800); box-shadow: var(--sh-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.zodiac-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--_tint); color: var(--c-plum-900); }
.zodiac-card__sym {
  font-size: 1.7rem; line-height: 1; width: 46px; height: 46px; margin-bottom: .35rem;
  display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--_tint) 16%, white); color: var(--_tint);
}
.zodiac-card__name { font-weight: var(--fw-semi); font-size: var(--fs-sm); }
.zodiac-card__dates { font-size: var(--fs-xs); color: var(--c-muted); }
.zodiac-card--fire  { --_tint: #E8622C; }
.zodiac-card--earth { --_tint: #2E9E6B; }
.zodiac-card--air   { --_tint: #3A6BE0; }
.zodiac-card--water { --_tint: #7A3AE0; }
@media (max-width: 860px) { .zodiac-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .zodiac-grid { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   PROMO STRIP + FLOATING PILL NAVBAR (Astrotalk style)
   ============================================================ */
.promo-strip {
  background: transparent; color: var(--c-ink-soft);
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
  text-align: center; padding: .5rem var(--s-4) .2rem;
}
.promo-strip b { font-weight: var(--fw-bold); color: var(--c-plum-900); }
.promo-strip a { color: var(--c-coral-500); text-decoration: underline; text-underline-offset: 2px; }

/* Full-width nav. Solid on interior pages; transparent over a dark hero
   (homepage) until the user scrolls, then it solidifies. */
.fb-nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: #fff; border-bottom: 1px solid var(--c-line);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fb-nav.is-scrolled { box-shadow: var(--sh-sm); }
.fb-nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  height: var(--nav-h); display: flex; align-items: center; gap: var(--s-5);
  padding-inline: var(--s-5);
}

.fb-brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: var(--fw-x); font-size: 1.35rem; color: var(--c-plum-900); }
.fb-brand:hover { color: var(--c-plum-900); }
.fb-brand__mark {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-yellow-400); color: #2B2C33; flex: 0 0 auto;
}
.fb-brand__mark svg { width: 21px; height: 21px; }
.fb-brand b { color: var(--c-plum-900); font-weight: var(--fw-x); }

.fb-nav__links { display: flex; align-items: center; gap: var(--s-1); margin-inline: auto; }
.fb-nav__link {
  position: relative; padding: .5rem .85rem; border-radius: var(--r-pill);
  color: var(--c-plum-800); font-weight: var(--fw-medium); font-size: var(--fs-sm);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.fb-nav__link:hover { color: var(--c-plum-900); background: var(--c-yellow-50); }
.fb-nav__link.is-active { color: var(--c-plum-900); font-weight: var(--fw-bold); }
.fb-nav__link.is-active::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: 4px; height: 2.5px; border-radius: 2px; background: var(--c-yellow-400); }

.fb-nav__cta { display: flex; align-items: center; gap: var(--s-2); }

/* --- transparent over the dark cosmic hero (homepage) --- */
.fb-nav--over-hero {
  position: fixed; left: 0; right: 0; top: 0;
  background: transparent; border-bottom-color: transparent;
}
.fb-nav--over-hero .fb-brand,
.fb-nav--over-hero .fb-brand b,
.fb-nav--over-hero .fb-nav__link { color: #fff; }
.fb-nav--over-hero .fb-nav__link:hover { color: #fff; background: rgba(255,255,255,.16); }
.fb-nav--over-hero .fb-nav__toggle span { background: #fff; }
.fb-nav--over-hero.is-scrolled {
  background: #fff; border-bottom-color: var(--c-line); box-shadow: var(--sh-sm);
}
.fb-nav--over-hero.is-scrolled .fb-brand,
.fb-nav--over-hero.is-scrolled .fb-brand b,
.fb-nav--over-hero.is-scrolled .fb-nav__link { color: var(--c-plum-800); }
.fb-nav--over-hero.is-scrolled .fb-brand,
.fb-nav--over-hero.is-scrolled .fb-brand b { color: var(--c-plum-900); }
.fb-nav--over-hero.is-scrolled .fb-nav__toggle span { background: var(--c-plum-800); }

/* Mobile toggle */
.fb-nav__toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.fb-nav__toggle span { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--c-plum-800); border-radius: 2px; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.fb-nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fb-nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.fb-nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.fb-nav__mobile {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: var(--z-nav);
  background: var(--c-cream); border-bottom: 1px solid var(--c-line);
  box-shadow: var(--sh-md); padding: var(--s-4) var(--s-5) var(--s-6);
  display: grid; gap: .35rem;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.fb-nav__mobile.is-open { transform: none; opacity: 1; pointer-events: auto; }
.fb-nav__mobile a.fb-nav__link { font-size: var(--fs-md); padding: .8rem .9rem; }
.fb-nav__mobile .fb-nav__cta { margin-top: var(--s-3); flex-direction: column; align-items: stretch; }

@media (max-width: 880px) {
  .fb-nav__links, .fb-nav__inner > .fb-nav__cta { display: none; }
  .fb-nav__toggle { display: block; margin-left: auto; }
}

/* ============================================================
   FOOTER (rendered by js/components.js)
   ============================================================ */
.fb-footer { background: var(--c-plum-900); color: rgba(255,255,255,.74); padding-block: var(--s-8) var(--s-6); }
.fb-footer a { color: rgba(255,255,255,.74); }
.fb-footer a:hover { color: var(--c-gold-400); }
.fb-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--s-6); }
.fb-footer__brand .fb-brand { color: #fff; }
.fb-footer__brand .fb-brand b { color: var(--c-gold-400); }
.fb-footer__brand p { color: rgba(255,255,255,.6); max-width: 34ch; margin-top: var(--s-3); }
.fb-footer h5 { font-family: var(--font-body); font-weight: var(--fw-semi); font-size: var(--fs-sm); letter-spacing: .1em; text-transform: uppercase; color: var(--c-gold-400); margin-bottom: var(--s-4); }
.fb-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; font-size: var(--fs-sm); }
.fb-footer__social { display: flex; gap: .6rem; margin-top: var(--s-4); }
.fb-footer__social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.fb-footer__social a:hover { background: var(--g-saffron); color: #fff; transform: translateY(-3px); }
.fb-footer__social svg { width: 18px; height: 18px; }
.fb-footer__bottom { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; font-size: var(--fs-xs); color: rgba(255,255,255,.55); }

@media (max-width: 880px) {
  .fb-footer__grid { grid-template-columns: 1fr 1fr; }
  .fb-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .fb-footer__grid { grid-template-columns: 1fr; }
}
