/* falakbin.ir/apod (ApodPages). Loaded after public.css and pages.css. */

.flk-ap { margin: 18px 0 8px; }
.flk-ap-media { margin: 0 0 18px; border-radius: 22px; overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: var(--shadow); }
.flk-ap-media a { display: block; }
.flk-ap-media img { display: block; width: 100%; height: auto; max-height: 82vh; object-fit: contain; margin: 0 auto; background: #000; }
.flk-ap-media video { display: block; width: 100%; height: auto; max-height: 82vh; background: #000; }
.flk-ap-media figcaption { padding: 8px 16px; background: var(--surface); color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line-soft); }
.flk-ap-novideo { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 20px; color: #e7f5f3; text-align: center; }
.flk-ap-novideo .flk-i { width: 54px; height: 54px; color: var(--orange); }
.flk-ap-novideo p { margin: 0; }

.flk-ap-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: 22px 32px; align-items: start; }
@media (max-width: 920px) { .flk-ap-body { grid-template-columns: minmax(0, 1fr); } }
.flk-ap-text { min-width: 0; }
.flk-ap-text h1 { margin: 6px 0 4px; font-size: clamp(1.5rem, 3.8vw, 2.3rem); font-weight: 900; line-height: 1.35; }
.flk-ap-text .flk-kicker a { color: inherit; }
.flk-ap-en { margin: 0 0 6px; color: var(--muted); font-size: .95rem; text-align: right; }
.flk-ap-date { margin: 0 0 16px; color: var(--muted); font-size: .88rem; }
.flk-ap-prose { max-width: 46rem; }
.flk-ap-prose p { margin: 0 0 .9rem; line-height: 2.15; font-size: 1.04rem; }
.flk-ap-src { margin: 4px 0 18px; font-size: .9rem; }
.flk-ap-src a { display: inline-flex; align-items: center; gap: 6px; }
.flk-ap-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.flk-ap-pager a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); text-decoration: none; color: var(--fg); min-width: 0; }
.flk-ap-pager a:hover { border-color: var(--teal); }
.flk-ap-pager small { color: var(--muted); font-size: .76rem; }
.flk-ap-pager b { font-weight: 800; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flk-ap-next { text-align: left; }
.flk-ap-prev { grid-column: 1; }
.flk-ap-next { grid-column: 2; }

.flk-ap-side { display: flex; flex-direction: column; gap: 14px; }
.flk-ap-box { padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.flk-ap-box > p { margin: 0 0 10px; color: var(--muted); font-size: .88rem; line-height: 1.95; }
.flk-ap-box .flk-ap-box-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--fg); font-weight: 850; font-size: .95rem; }
.flk-ap-box-h .flk-i { color: var(--teal-ink); }
.flk-ap-actions { display: flex; flex-direction: column; gap: 8px; }
.flk-ap-actions .flk-btn { justify-content: center; }

/* ---- Galleries ---------------------------------------------------------------- */
.flk-ap-filters { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; }
/* The days before, small: a square of each picture with its date, and the archive last. */
.flk-ap-thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.flk-ap-thumbs a { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line-soft); color: var(--fg); text-decoration: none; }
.flk-ap-thumbs a:hover { border-color: var(--teal); }
.flk-ap-thumbs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.flk-ap-thumbs a:hover img { transform: scale(1.06); }
.flk-ap-thumbs small { position: absolute; inset: auto 0 0; padding: 14px 6px 4px; background: linear-gradient(0deg, rgba(0, 0, 0, .78), transparent); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; }
.flk-ap-thumb-video .flk-i { width: 30px; height: 30px; color: var(--muted); }
.flk-ap-thumbs .flk-ap-thumb-all { display: flex; flex-direction: column; justify-content: center; gap: 6px; background: var(--teal-soft); color: var(--teal-ink); font-size: .85rem; }
.flk-ap-thumb-all .flk-i { width: 26px; height: 26px; }
.flk-ap-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.flk-ap-grid a { position: relative; display: flex; flex-direction: column; height: 100%; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); color: var(--fg); text-decoration: none; }
.flk-ap-grid a:hover { border-color: var(--teal); }
.flk-ap-grid img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #000; }
.flk-ap-tile-video { display: grid; place-items: center; aspect-ratio: 3 / 2; background: radial-gradient(circle, #0b2a30, #020b0d); }
.flk-ap-tile-video .flk-i { width: 42px; height: 42px; color: var(--orange); }
.flk-ap-badge { position: absolute; top: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: rgba(3, 24, 28, .82); color: #e7f5f3; font-size: .74rem; font-weight: 800; }
.flk-ap-badge .flk-i { width: 12px; height: 12px; }
.flk-ap-tile-text { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 12px; }
.flk-ap-tile-text b { font-weight: 800; font-size: .92rem; line-height: 1.7; }
.flk-ap-tile-text small { color: var(--muted); font-size: .76rem; }

/* ---- Stats ---------------------------------------------------------------------- */
.flk-ap-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
@media (max-width: 760px) { .flk-ap-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.flk-ap-figures div { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.flk-ap-figures dt { color: var(--muted); font-size: .8rem; }
.flk-ap-figures dd { margin: 4px 0 0; font-size: 1.7rem; font-weight: 900; }
.flk-ap-figures small { font-size: .8rem; color: var(--muted); font-weight: 600; }
.flk-sk-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; }
@media (max-width: 860px) { .flk-sk-two { grid-template-columns: minmax(0, 1fr); } }
.flk-ap-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.flk-ap-bars li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 36px; align-items: center; gap: 10px; font-size: .9rem; }
.flk-ap-bars progress { width: 100%; height: 12px; appearance: none; border: 0; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.flk-ap-bars progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 6px; }
.flk-ap-bars progress::-webkit-progress-value { background: var(--c1); border-radius: 6px; }
.flk-ap-bars progress::-moz-progress-bar { background: var(--c1); border-radius: 6px; }
.flk-ap-bars b { font-variant-numeric: tabular-nums; text-align: left; }
.flk-ap-seen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: seen; }
.flk-ap-seen li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); counter-increment: seen; }
.flk-ap-seen li::before { content: counter(seen, persian); flex: none; display: grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 8px; background: var(--teal-soft); color: var(--teal-ink); font-weight: 800; }
.flk-ap-seen a { flex: 1; display: flex; flex-direction: column; color: var(--fg); text-decoration: none; min-width: 0; }
.flk-ap-seen small { color: var(--muted); font-size: .76rem; }
.flk-ap-seen span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.flk-ap-two .flk-sec { margin-top: 0; }

/* ---- The archive's months under their year, and a gallery's pages (apod_list) ---- */
.flk-ap-year { display: flex; align-items: baseline; gap: 10px; }
.flk-ap-year > b { flex: none; min-width: 3.2em; color: var(--muted); font-size: .85rem; font-weight: 800; }
.flk-ap-year .flk-chips { flex: 1; min-width: 0; }
.flk-ap-pages { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 22px 0 6px; }
.flk-ap-pages a, .flk-ap-pages span { display: inline-grid; place-items: center; min-width: 2.4em; height: 2.4em; padding: 0 10px; border-radius: 10px; font-weight: 700; font-size: .9rem; }
.flk-ap-pages a { background: var(--surface); border: 1px solid var(--line-soft); color: var(--fg); text-decoration: none; }
.flk-ap-pages a:hover { border-color: var(--teal); }
.flk-ap-pages [aria-current] { background: var(--teal-soft); color: var(--teal-ink); }
.flk-ap-year .flk-chip { padding-block: 2px; font-size: .8rem; }
