/* Sangeet Jagat — M8.6: floating bottom nav, pagination, avatars on Explore, topic names, "Edit details". Tokens only (light/dark). */

/* Floating bottom nav (mobile). Space below the page is reserved, so nothing jumps (CLS 0). */
@media (max-width: 1023.98px) {
	:root { --wp--custom--chrome--bottom-nav: 92px; }
	.sj-bottomnav {
		left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding: 6px;
		border: 1px solid var(--sj-border); border-radius: 999px; background-color: var(--sj-surface);
		box-shadow: 0 8px 28px rgba(42, 33, 25, .16), 0 1px 3px rgba(42, 33, 25, .08);
	}
	.sj-bottomnav__list { height: 60px; gap: 4px; }
	.sj-bottomnav__link { border-radius: 999px; min-height: 44px; gap: 1px; font-size: 12.5px; transition: background-color .15s ease, color .15s ease; }
	.sj-bottomnav__icon { width: auto; height: 26px; background: none !important; }
	.sj-bottomnav__link.is-active { background-color: var(--wp--preset--color--tint-primary); color: var(--sj-primary); font-weight: 700;
		box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sj-primary) 22%, transparent); }
	.sj-bottomnav__link:focus-visible { outline: 3px solid var(--sj-accent-safe); outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) { .sj-bottomnav__link { transition: none; } }

/* Pagination: round page buttons centred, "← Previous" / "Next →", current page bold; compact on phones. Plain links (crawlable). */
.navigation.pagination, .sj-pagination, nav.pagination { margin: 28px 0 8px; }
.navigation.pagination .nav-links, .sj-pagination, nav.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 6px; box-sizing: border-box;
	border: 1px solid var(--sj-border); border-radius: 999px; background: var(--sj-surface); color: var(--sj-text); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
a.page-numbers:hover { border-color: var(--sj-primary); color: var(--sj-primary); }
.page-numbers.current { background: var(--sj-primary); border-color: var(--sj-primary); color: var(--sj-surface); }
.page-numbers.dots { border: 0; background: none; min-width: 24px; }
.page-numbers.prev, .page-numbers.next { padding: 0 18px; font-size: 0; }
.page-numbers.prev::before { content: "← Previous"; font-size: 15px; }
.page-numbers.next::after { content: "Next →"; font-size: 15px; }
.page-numbers:focus-visible { outline: 3px solid var(--sj-accent-safe); outline-offset: 2px; }
@media (max-width: 599.98px) {
	.page-numbers:not(.current):not(.prev):not(.next) { display: none; }
	.page-numbers.prev::before { content: "←"; }
	.page-numbers.next::after { content: "→"; }
	.page-numbers.prev, .page-numbers.next { padding: 0; min-width: 52px; }
}

/* Explore: real profile photos */
.sj-pchip__avatar { overflow: hidden; }
.sj-pchip__avatar img, .sj-pchip__avatar .sj-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* Topic names (English + मराठी / हिन्दी) */
.sj-topictile__dev { display: block; font-size: 14px; color: var(--sj-text-2); line-height: 1.35; }
.sj-topic__dev { font-size: 18px; color: var(--sj-text-2); margin: 6px 0 0; }

/* You: "Edit details" is visibly an action */
.sj-you__sum { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.sj-you__sum::-webkit-details-marker { display: none; }
.sj-you__edit { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--sj-primary); border-radius: 999px; color: var(--sj-primary); font-weight: 700; font-size: 15px; }
details[open] > .sj-you__sum .sj-you__edit { background: var(--sj-primary); color: var(--sj-surface); }

/* 0.18.1 Explore on phones: icon above the text so long names get the full width */
@media (max-width: 599.98px) {
	.sj-topictile { flex-direction: column; align-items: flex-start; gap: 10px; }
	.sj-topictile__name { overflow-wrap: normal; word-break: normal; hyphens: auto; }
}
.sj-topictile__name, .sj-topictile__dev { overflow-wrap: break-word; }

/* 0.18.2: You page shows the profile photo */
.sj-me__avatar { overflow: hidden; }
.sj-me__avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* 0.18.3 (M10): writing mode — desk without the bottom bar on phones/tablets */
@media (max-width: 1023px) {
	body.sj-writing { --wp--custom--chrome--bottom-nav: 0px; }
	body.sj-writing .sj-bottomnav { display: none !important; }
}
