/*
 * Store Listing — Android (Play Store) template styles.
 * Sourced from the Spinvoidhub theme front-page.php design.
 */

/* ── Reset ── */
/* box-sizing applies to everything in the Android-body scope — safe,
   useful, and nothing to fight with. */
.sl-body--android,
.sl-body--android *,
.sl-body--android *::before,
.sl-body--android *::after { box-sizing: border-box; }

/* Margin/padding reset wrapped in :where() so it has ZERO specificity.
   That means any rule with even a single class — our own page-shell
   styles, the overlay/splash/lightbox styles in sl-install.css, even a
   simple `.section { padding: 20px 0 }` — wins cleanly. Source order
   then decides ties. Without :where() the reset was either too broad
   (killing overlay padding) or too specific (beating the content
   rules). This gives us a clean baseline that loses every fight. */
:where(.sl-body--android,
       .sl-body--android *,
       .sl-body--android *::before,
       .sl-body--android *::after) {
  margin: 0;
  padding: 0;
}
.sl-body--android { font-family: 'Google Sans', Roboto, Arial, sans-serif; font-size: 14px; font-weight: 400; line-height: 1.4; background: #fff; color: #202124; -webkit-font-smoothing: antialiased; overflow-y: scroll; }
.sl-body--android a { text-decoration: none; color: inherit; }
.sl-body--android ul { list-style: none; }
.sl-body--android button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; padding: 0; }
.sl-body--android img { border: none; vertical-align: middle; }

.sl-body--android .material-icons {
  font-family: 'Material Icons'; font-weight: normal; font-style: normal;
  font-size: 24px; display: inline-block; line-height: 1; text-transform: none;
  letter-spacing: normal; word-wrap: normal; white-space: nowrap; direction: ltr;
  -webkit-font-smoothing: antialiased;
}

/* ══ TOP NAV ══ */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: #fff; height: 56px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  display: flex; align-items: center;
}
.nav-logo {
  display: flex; align-items: center; gap: 0;
  font-size: 1.375rem; font-weight: 500; color: #5f6368;
  height: 100%; padding: 0 8px 0 16px;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  letter-spacing: 0; line-height: 1.75rem; white-space: nowrap;
}
.nav-logo svg { width: 40px; height: 40px; margin-right: 8px; }
.nav-logo span { color: #5f6368; }

.nav-cat-tabs { display: none; height: 100%; }
@media (min-width: 840px) {
  .top-nav { height: 64px; }
  .nav-cat-tabs { display: flex; margin-left: 8px; }
  .nav-cat-tabs button {
    height: 100%; padding: 0 16px;
    font-size: .875rem; font-weight: 500; color: #5f6368;
    position: relative; font-family: 'Google Sans', Roboto, Arial, sans-serif;
    letter-spacing: .0178571em; white-space: nowrap;
  }
  .nav-cat-tabs button.active { color: #174ea6; }
  .nav-cat-tabs button.active::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; background: #174ea6; border-radius: 3px 3px 0 0;
  }
}

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; margin-right: 8px; }
.nav-actions button {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #5f6368;
}
.nav-actions button:hover { background: #f1f3f4; }

/* ══ MOBILE BOTTOM TABS ══ */
.cat-tabs-mobile {
  display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: #fff; height: 56px; border-top: 1px solid #dadce0;
  justify-content: space-around; align-items: center;
}
.cat-tabs-mobile .tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; color: #5f6368;
  font-size: .68rem; font-weight: 500; padding: 4px 0; cursor: pointer;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
}
.cat-tabs-mobile .tab-item .material-icons { font-size: 22px; }
.cat-tabs-mobile .tab-item.active,
.cat-tabs-mobile .tab-item.active .material-icons { color: #174ea6; }
@media (min-width: 840px) { .cat-tabs-mobile { display: none; } }

/* ══ PAGE WRAPPER ══ */
.page-wrapper { margin-top: 56px; padding-bottom: 72px; }
@media (min-width: 840px) { .page-wrapper { margin-top: 64px; padding-bottom: 32px; } }

.content-inner { max-width: 1296px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 840px) { .content-inner { padding: 0 48px; } }

/* ══ APP HEADER ══ */
.app-header { padding: 24px 0 24px; }
.app-top { display: flex; align-items: flex-start; gap: 16px; margin-top: 24px; }
@media (min-width: 840px) { .app-top { gap: 24px; margin-top: 48px; } }

.app-icon-wrap {
  width: 72px; height: 72px; border-radius: 16px; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, #1a3a6b, #2d6eb5);
  display: flex; align-items: center; justify-content: center; font-size: 36px;
  box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}
.app-icon-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 840px) { .app-icon-wrap { width: 80px; height: 80px; } }

.app-info { flex: 1; min-width: 0; }
.app-name {
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  font-size: 1.4rem; font-weight: 500; line-height: 1.3; color: #202124;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.app-name .badge-svg { display: inline-flex; align-items: center; }
.app-name .badge-svg svg { width: 28px; height: 28px; }
.app-developer {
  color: #174ea6; font-weight: 500; font-size: .95rem; margin-top: 4px;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
}
.app-ads-info { color: #5f6368; font-size: .75rem; margin-top: 2px; font-family: Roboto, Arial, sans-serif; }

/* Stats */
.app-stats {
  display: flex; overflow-x: auto; margin: 16px -24px;
  padding: 8px 24px; -ms-overflow-style: none; scrollbar-width: none;
}
.app-stats::-webkit-scrollbar { display: none; }
@media (min-width: 840px) { .app-stats { margin: 16px 0; padding: 8px 0; } }

.stat-block { flex-shrink: 0; min-width: 96px; padding: 0 16px; position: relative; text-align: center; }
.stat-block:first-child { padding-left: 0; }
.stat-block:not(:first-child)::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 24px; background: #e8eaed;
}
.stat-val {
  font-family: 'Google Sans', Roboto, Arial, sans-serif; font-size: .875rem;
  font-weight: 500; color: #202124; height: 24px;
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
}
.stat-val .material-icons { font-size: 16px; color: #174ea6; }
.stat-lbl { font-size: .72rem; color: #5f6368; margin-top: 2px; white-space: nowrap; font-family: Roboto, Arial, sans-serif; }

/* Install button */
.sl-body--android a.btn-install,
.sl-body--android .btn-install {
  background-color: #174ea6; color: #fff; border-radius: 8px;
  height: 40px; width: 100%; max-width: none;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  font-size: .9rem; font-weight: 500;
  display: flex;
  align-items: center; justify-content: center;
  margin: 8px 0; cursor: pointer; transition: background .2s;
  text-decoration: none;
  position: relative; overflow: hidden;
}
.sl-body--android a.btn-install:hover,
.sl-body--android .btn-install:hover { background-color: #1845a1; color: #fff; }

/* Fake-progress fill that sweeps across the button while the
   user "downloads" the app. Absolute-positioned strip behind
   the label; width animates 0% → 100% over the configured
   duration. Pointer-events: none so taps still reach the
   anchor's click handler. */
.btn-install__fill {
  position: absolute; inset: 0 auto 0 0;
  width: 0; height: 100%;
  background: rgba(255, 255, 255, 0.22);
  pointer-events: none;
}
.btn-install__label {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-variant-numeric: tabular-nums;
}

.sl-body--android .btn-install.is-loading { cursor: progress; }

/* Ready state — flips the button green like Play Store's "Open"
   after a real install completes. Selector chain mirrors the base
   rule so the gradient/colour wins against `a { color: inherit }`. */
.sl-body--android a.btn-install.is-ready,
.sl-body--android .btn-install.is-ready { background-color: #01875f; }
.sl-body--android a.btn-install.is-ready:hover,
.sl-body--android .btn-install.is-ready:hover { background-color: #016b4d; }

.btn-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  color: #174ea6; font-size: .875rem; font-weight: 500;
  padding: 0 8px; height: 36px; border-radius: 4px; transition: background .2s;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
}
.btn-secondary:hover { background: #e8f0fe; }
.btn-secondary.is-active { background: #e8f0fe; }
.btn-secondary .material-icons { font-size: 18px; }

.success-bar {
  display: flex; align-items: center; gap: 12px;
  color: #5f6368; font-size: .875rem; margin-top: 14px;
  font-family: Roboto, Arial, sans-serif;
}
.success-bar .material-icons { font-size: 20px; flex-shrink: 0; }

/* Bonus banner (carried over from existing template) */
.bonus-banner {
  margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg,#0d8f4f 0%,#01875f 100%);
  color: #fff; font-weight: 600; font-size: 14px;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
}

/* ══ SCREENSHOTS ══ */
.screenshots {
  overflow-x: auto; display: flex; gap: 12px;
  margin: 20px -24px 0; padding: 0 24px 8px;
  scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none;
}
.screenshots::-webkit-scrollbar { display: none; }
@media (min-width: 840px) { .screenshots { margin: 20px 0 0; padding: 0 0 8px; } }

.screenshot-item { flex-shrink: 0; scroll-snap-align: start; }
.screenshot-item img {
  height: 204px; width: auto; border-radius: 8px; display: block;
  box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
  cursor: pointer; transition: transform .15s ease;
}
.screenshot-item img:active { transform: scale(0.98); }
.screenshot-placeholder {
  height: 204px; min-width: 115px; border-radius: 8px;
  background: linear-gradient(135deg, #c8d6f0, #e8eef7, #c8d6f0);
  display: flex; align-items: center; justify-content: center;
  color: #174ea6; font-size: .7rem; font-weight: 500; text-align: center;
  box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}

/* ══ SECTIONS ══ */
.section { padding: 20px 0; border-bottom: 1px solid #e8eaed; }
.section:last-of-type { border-bottom: none; }

.section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px; color: #202124;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  font-size: 1.1rem; font-weight: 500;
}
.section-header h2 { font: inherit; font-size: 1.1rem; }
.section-header .material-icons { font-size: 20px; color: #5f6368; cursor: pointer; flex-shrink: 0; margin-top: 2px; }

/* About */
.about-text {
  font-family: Roboto, Arial, sans-serif; font-size: .875rem;
  line-height: 1.25rem; color: #5f6368; letter-spacing: .014em;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.about-text.expanded { display: block; }
.update-info { margin-top: 20px; }
.update-label { font-size: .875rem; font-weight: 500; color: #202124; font-family: 'Google Sans', Roboto, Arial, sans-serif; }
.update-date { font-size: .875rem; color: #5f6368; margin-top: 4px; font-family: Roboto, Arial, sans-serif; }

/* Data safety */
.safety-box { border: 1px solid #dadce0; border-radius: 8px; padding: 16px 20px; margin-top: 16px; }
.safety-item { display: flex; align-items: flex-start; gap: 16px; }
.safety-item:not(:first-child) { margin-top: 16px; }
.safety-item .material-icons { font-size: 20px; color: #5f6368; flex-shrink: 0; margin-top: 1px; }
.safety-item-title { font-size: .875rem; color: #202124; }
.safety-item-sub { font-size: .72rem; color: #5f6368; margin-top: 2px; font-family: Roboto, Arial, sans-serif; }
.safety-item-sub span { text-decoration: underline; cursor: pointer; }
.see-details {
  display: inline-flex; align-items: center; color: #174ea6;
  font-size: .875rem; font-weight: 500; margin-top: 4px; padding: 6px 8px;
  border-radius: 4px; cursor: pointer; font-family: 'Google Sans', Roboto, Arial, sans-serif;
}
.see-details:hover { background: #e8f0fe; }

/* Ratings */
.verified-note {
  display: flex; align-items: center; gap: 4px;
  font-size: .72rem; color: #5f6368; margin-top: 4px; cursor: pointer;
  font-family: Roboto, Arial, sans-serif;
}
.verified-note .material-icons { font-size: 14px; }

.ratings-row { display: flex; gap: 20px; align-items: flex-start; padding: 4px 0 16px; }
.rating-big {
  font-size: 3.5rem; font-weight: 400; color: #202124;
  line-height: 1; font-family: 'Google Sans', Roboto, Arial, sans-serif;
}
.stars-row { display: flex; align-items: center; gap: 1px; margin-top: 4px; }
.star { display: inline-block; }
.star svg { width: 16px; height: 16px; display: block; }
.star.full svg { fill: #174ea6; }
.star.half svg { fill: url("#halfGrad"); }
.star.empty svg { fill: #f1f3f4; }
.rating-count { font-size: .75rem; color: #5f6368; margin-top: 4px; font-family: Roboto, Arial, sans-serif; }

.bars-col { flex: 1; }
.bar-row { display: grid; grid-template-columns: 12px 1fr; align-items: center; gap: 10px; margin-bottom: 5px; }
.bar-num { font-size: .72rem; color: #5f6368; text-align: right; font-family: Roboto, Arial, sans-serif; }
.bar-track { background: #e8eaed; border-radius: 9999px; height: 8px; overflow: hidden; }
.bar-fill { background: #174ea6; height: 100%; border-radius: inherit; }

/* Review cards */
.review-card { padding: 16px 0; border-bottom: 1px solid #f1f3f4; }
.review-card:last-of-type { border-bottom: none; }
.review-header { display: flex; align-items: center; justify-content: space-between; }
.reviewer-left { display: flex; align-items: center; gap: 12px; }
.avatar-placeholder {
  width: 32px; height: 32px; border-radius: 50%; background: #e8eaed;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #5f6368; flex-shrink: 0;
}
.reviewer-name { font-size: .875rem; color: #202124; font-family: Roboto, Arial, sans-serif; }
.review-meta { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.review-meta .stars-row .star svg { width: 12px; height: 12px; }
.review-date { font-size: .72rem; color: #5f6368; margin-left: 4px; font-family: Roboto, Arial, sans-serif; }
.review-text { font-size: .875rem; line-height: 1.4; margin-top: 8px; color: #202124; word-break: break-word; font-family: Roboto, Arial, sans-serif; }
.review-helpful { font-size: .72rem; color: #5f6368; margin-top: 12px; font-family: Roboto, Arial, sans-serif; }
.review-footer { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.helpful-label { font-size: .72rem; color: #5f6368; font-family: Roboto, Arial, sans-serif; }
.helpful-btns { display: flex; gap: 10px; }
.helpful-btn {
  border: 1px solid #dadce0; border-radius: 9999px; padding: 2px 14px;
  font-size: .75rem; font-weight: 500; color: #5f6368; background: #fff;
  cursor: pointer; line-height: 20px; transition: all .15s;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
}
.helpful-btn:hover { background: #f8f9fa; }
.helpful-btn.active { background: #e6f3ef; color: #056449; border-color: #056449; }

.dev-reply { background: #f8f9fa; border-radius: 4px; padding: 12px 16px; margin-top: 14px; }
.dev-reply-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.dev-reply-name { font-size: .875rem; font-weight: 500; color: #202124; font-family: Roboto, Arial, sans-serif; }
.dev-reply-date { font-size: .72rem; color: #5f6368; font-family: Roboto, Arial, sans-serif; }
.dev-reply-text { font-size: .875rem; color: #5f6368; line-height: 1.4; font-family: Roboto, Arial, sans-serif; }

.see-all-btn {
  color: #174ea6; font-size: .875rem; font-weight: 500;
  display: inline-flex; align-items: center; padding: 6px 8px;
  border-radius: 4px; transition: background .2s; margin-top: 8px;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
}
.see-all-btn:hover { background: #e8f0fe; }

/* Footer */
.page-footer { padding: 36px 0 16px; color: #5f6368; font-size: .75rem; }
.footer-divider { border: none; border-top: 1px solid #e8eaed; margin-bottom: 32px; }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 840px) { .footer-cols { grid-template-columns: 220px 1fr; } }
.footer-section-title { font-size: .875rem; font-weight: 500; color: #5f6368; line-height: 32px; font-family: 'Google Sans', Roboto, Arial, sans-serif; }
.footer-item { font-size: .875rem; color: #5f6368; line-height: 32px; cursor: pointer; font-family: 'Google Sans', Roboto, Arial, sans-serif; }
.footer-item:hover { color: #01875f; }
.footer-links { display: flex; flex-wrap: wrap; margin-top: 24px; }
.footer-link { font-size: .75rem; color: #5f6368; line-height: 48px; margin-right: 24px; cursor: pointer; font-family: 'Google Sans', Roboto, Arial, sans-serif; }
.footer-link:hover { color: #01875f; }

/* Terms copy (carried over from existing template) */
.terms-copy {
  font-size: 11px; color: #888; padding: 16px 0; line-height: 1.5;
  font-family: Roboto, Arial, sans-serif;
}

/* ══ SCREENSHOT LIGHTBOX ══ */
.sl-lightbox[hidden] { display: none; }
.sl-lightbox {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,0.92);
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity .18s ease;
}
.sl-lightbox.is-open { opacity: 1; }
body.sl-lightbox-open { overflow: hidden; }

.sl-lightbox__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.sl-lightbox__close:hover { background: rgba(255,255,255,0.22); }
.sl-lightbox__close .material-icons { font-size: 24px; color: #fff; }

.sl-lightbox__viewport {
  flex: 1; display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none; scrollbar-width: none;
  scroll-behavior: smooth;
}
.sl-lightbox__viewport::-webkit-scrollbar { display: none; }

.sl-lightbox__slide {
  flex: 0 0 100%; width: 100%;
  scroll-snap-align: start;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 16px 40px;
}
.sl-lightbox__slide img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 6px; display: block;
}

.sl-lightbox__counter {
  position: absolute; bottom: 16px; left: 0; right: 0; z-index: 2;
  text-align: center; color: #fff;
  font-size: .8rem; font-family: Roboto, Arial, sans-serif;
  letter-spacing: 0.04em;
}

