/**
 * Theme-agnostic frontend styles for apkstore.
 * Scoped under .apkstore-* to avoid theme collisions.
 */

.apkstore-page {
	--apkstore-accent: #0b6e4f;
	--apkstore-border: #d9e2ec;
	--apkstore-bg: #f7fafc;
	--apkstore-text: #102a43;
	--apkstore-muted: #486581;
	color: var(--apkstore-text);
	line-height: 1.65;
	max-width: 100%;
	box-sizing: border-box;
}

.apkstore-page *,
.apkstore-page *::before,
.apkstore-page *::after {
	box-sizing: border-box;
}

.apkstore-section {
	margin: 2rem 0;
	scroll-margin-top: 80px;
}

/* Intro → Download: avoid stacked 2rem + 2rem gap */
.apkstore-block--intro > .apkstore-section.apkstore-intro {
	margin-bottom: 0.5rem;
}

.apkstore-block--intro + .apkstore-block--download > .apkstore-section.apkstore-download {
	margin-top: 0.35rem;
}

.apkstore-intro .apkstore-short-intro {
	margin-bottom: 0;
}

.apkstore-block {
	margin: 0;
}

.apkstore-block-children {
	margin: 0 0 0 1rem;
	padding-left: 1rem;
	border-left: 3px solid var(--apkstore-border);
}

.apkstore-block-children .apkstore-section {
	margin-top: 1.25rem;
}

.apkstore-h1 {
	font-size: clamp(1.6rem, 2.5vw, 2.2rem);
	margin: 0 0 1rem;
	line-height: 1.25;
}

.apkstore-intro-top {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	flex-wrap: wrap;
}

.apkstore-intro-top--logo-left,
.apkstore-intro-top--logo-right {
	flex-direction: row;
	align-items: center;
}

.apkstore-intro-top--logo-top,
.apkstore-intro-top--logo-bottom {
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.apkstore-intro-part--logo {
	flex: 0 0 auto;
}

.apkstore-intro-top--logo-top .apkstore-intro-part--logo,
.apkstore-intro-top--logo-bottom .apkstore-intro-part--logo {
	flex: 0 0 auto;
	width: auto;
	max-width: 100%;
	display: flex;
	justify-content: center;
}

.apkstore-intro-top--logo-top .apkstore-intro-part--short_intro,
.apkstore-intro-top--logo-bottom .apkstore-intro-part--short_intro {
	flex: 0 0 auto;
	width: 100%;
	max-width: 100%;
	text-align: center;
}

.apkstore-intro-top--logo-top .apkstore-logo-img,
.apkstore-intro-top--logo-bottom .apkstore-logo-img {
	margin-left: auto;
	margin-right: auto;
}

.apkstore-logo-img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: 18px;
	display: block;
	box-shadow: 0 10px 24px rgba(16, 42, 67, 0.12);
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.apkstore-intro-main,
.apkstore-intro-part--short_intro {
	flex: 1 1 220px;
	min-width: 0;
}

.apkstore-intro-part--rating {
	flex: 1 1 100%;
}

.apkstore-short-intro {
	margin: 0 0 1rem;
	color: var(--apkstore-muted);
}

.apkstore-download-wrap {
	margin: 0;
}

.apkstore-download-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	background: linear-gradient(180deg, color-mix(in srgb, var(--apkstore-accent) 92%, #fff) 0%, var(--apkstore-accent) 100%);
	color: #fff !important;
	text-decoration: none !important;
	padding: 0.85rem 1.45rem;
	border-radius: 999px;
	font-weight: 600;
	letter-spacing: 0.01em;
	box-shadow: 0 8px 20px rgba(11, 110, 79, 0.28);
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.apkstore-download-btn:hover,
.apkstore-download-btn:focus {
	filter: brightness(1.04);
	transform: translateY(-1px);
	box-shadow: 0 12px 26px color-mix(in srgb, var(--apkstore-accent) 34%, transparent);
}

.apkstore-download-btn:active {
	transform: translateY(0);
	box-shadow: 0 6px 14px color-mix(in srgb, var(--apkstore-accent) 24%, transparent);
}

.apkstore-download--center,
.apkstore-download--center .apkstore-download-wrap {
	text-align: center;
}

.apkstore-custom-media {
	margin: 12px 0;
}

.apkstore-custom-body {
	margin: 0 0 12px;
}

.apkstore-custom-banner {
	margin: 0 0 14px;
	padding: 0;
	width: 100%;
	overflow: hidden;
	border-radius: 14px;
	background: #e8eaed;
	box-shadow: 0 10px 28px rgba(16, 42, 67, 0.08);
}

.apkstore-custom-banner--sized {
	width: auto;
	max-width: 100%;
	display: inline-block;
	vertical-align: top;
	background: transparent;
	box-shadow: none;
}

.apkstore-custom-banner-img,
.apkstore-custom-banner > img,
.apkstore-custom-banner > amp-img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 360px;
	object-fit: cover;
}

.apkstore-custom-banner--sized .apkstore-custom-banner-img,
.apkstore-custom-banner--sized > img,
.apkstore-custom-banner--sized > amp-img {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: none;
	border-radius: 12px;
	box-shadow: 0 8px 22px rgba(16, 42, 67, 0.12);
}

/* Multi-banner animated slider */
.apkstore-banner-slider {
	--apkstore-banner-interval: 4000ms;
	position: relative;
	margin: 0 0 1.1rem;
	width: 100%;
	max-width: 100%;
}

.apkstore-banner-slider__viewport {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 40%),
		#e8eaed;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.65) inset,
		0 14px 36px rgba(16, 42, 67, 0.12);
}

.apkstore-banner-slider__track {
	position: relative;
	width: 100%;
}

.apkstore-banner-slider--fade .apkstore-banner-slider__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transform: scale(1.02);
	transition: opacity 0.65s ease, visibility 0.65s ease, transform 0.65s ease;
	pointer-events: none;
}

.apkstore-banner-slider--fade .apkstore-banner-slider__slide.is-active {
	position: relative;
	opacity: 1;
	visibility: visible;
	transform: scale(1);
	pointer-events: auto;
	z-index: 1;
}

.apkstore-banner-slider--slide .apkstore-banner-slider__track {
	display: flex;
	transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.apkstore-banner-slider--slide .apkstore-banner-slider__slide {
	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
}

.apkstore-banner-slider .apkstore-custom-banner {
	margin: 0;
	width: 100%;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

.apkstore-banner-slider .apkstore-custom-banner--sized {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0 auto;
	min-height: 100%;
	padding: 0.65rem 0;
}

.apkstore-banner-slider .apkstore-custom-banner-img,
.apkstore-banner-slider .apkstore-custom-banner > img,
.apkstore-banner-slider .apkstore-custom-banner > amp-img {
	margin-left: auto;
	margin-right: auto;
	border-radius: 12px;
}

.apkstore-banner-slider__shade {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 56px;
	pointer-events: none;
	z-index: 2;
	opacity: 0.55;
}

.apkstore-banner-slider__shade--left {
	left: 0;
	background: linear-gradient(90deg, rgba(16, 42, 67, 0.18), transparent);
}

.apkstore-banner-slider__shade--right {
	right: 0;
	background: linear-gradient(270deg, rgba(16, 42, 67, 0.18), transparent);
}

.apkstore-banner-slider__progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	z-index: 3;
	background: rgba(255, 255, 255, 0.28);
	overflow: hidden;
}

.apkstore-banner-slider__progress-bar {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--apkstore-accent), color-mix(in srgb, var(--apkstore-accent) 55%, #fff));
	transform-origin: left center;
}

.apkstore-banner-slider.is-playing .apkstore-banner-slider__progress-bar {
	animation: apkstore-banner-progress var(--apkstore-banner-interval) linear forwards;
}

.apkstore-banner-slider.is-paused .apkstore-banner-slider__progress-bar {
	animation-play-state: paused;
}

@keyframes apkstore-banner-progress {
	from {
		width: 0;
	}
	to {
		width: 100%;
	}
}

.apkstore-banner-slider__nav {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	pointer-events: none;
	z-index: 4;
	padding: 0 10px;
}

.apkstore-banner-slider__btn {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 999px;
	background: rgba(16, 42, 67, 0.42);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #fff;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.22s ease, background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
	box-shadow: 0 8px 18px rgba(16, 42, 67, 0.18);
}

.apkstore-banner-slider:hover .apkstore-banner-slider__btn,
.apkstore-banner-slider:focus-within .apkstore-banner-slider__btn {
	opacity: 1;
	transform: translateY(0);
}

.apkstore-banner-slider__btn:hover,
.apkstore-banner-slider__btn:focus {
	background: color-mix(in srgb, var(--apkstore-accent) 82%, #102a43);
	border-color: rgba(255, 255, 255, 0.7);
}

.apkstore-banner-slider__btn:active {
	transform: scale(0.96);
}

.apkstore-banner-slider__icon {
	display: block;
}

.apkstore-banner-slider__footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 12px;
	min-height: 22px;
}

.apkstore-banner-slider__dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
}

.apkstore-banner-slider__dot {
	position: relative;
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #cfd8e3;
	cursor: pointer;
	overflow: hidden;
	transition: width 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.apkstore-banner-slider__dot-fill {
	display: none;
}

.apkstore-banner-slider__dot.is-active {
	width: 28px;
	background: color-mix(in srgb, var(--apkstore-accent) 28%, #d9e2ec);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--apkstore-accent) 25%, transparent);
}

.apkstore-banner-slider__dot.is-active .apkstore-banner-slider__dot-fill {
	display: block;
	position: absolute;
	inset: 0;
	width: 0;
	background: var(--apkstore-accent);
	border-radius: inherit;
}

.apkstore-banner-slider.is-playing .apkstore-banner-slider__dot.is-active .apkstore-banner-slider__dot-fill {
	animation: apkstore-banner-progress var(--apkstore-banner-interval) linear forwards;
}

.apkstore-banner-slider.is-paused .apkstore-banner-slider__dot.is-active .apkstore-banner-slider__dot-fill {
	animation-play-state: paused;
}

.apkstore-banner-slider__counter {
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
	color: var(--apkstore-muted);
	letter-spacing: 0.04em;
	min-width: 2.6rem;
	text-align: right;
}

.apkstore-banner-slider__counter-current {
	color: var(--apkstore-text);
	font-weight: 600;
}

.apkstore-intro:hover .apkstore-logo-img {
	transform: translateY(-2px);
	box-shadow: 0 14px 28px rgba(16, 42, 67, 0.16);
}

@media (max-width: 600px) {
	.apkstore-banner-slider__btn {
		opacity: 0.92;
		transform: none;
		width: 36px;
		height: 36px;
	}

	.apkstore-banner-slider__shade {
		width: 36px;
		opacity: 0.35;
	}
}

@media (prefers-reduced-motion: reduce) {
	.apkstore-banner-slider--fade .apkstore-banner-slider__slide,
	.apkstore-banner-slider--slide .apkstore-banner-slider__track,
	.apkstore-download-btn,
	.apkstore-logo-img {
		transition: none !important;
	}

	.apkstore-banner-slider.is-playing .apkstore-banner-slider__progress-bar,
	.apkstore-banner-slider.is-playing .apkstore-banner-slider__dot.is-active .apkstore-banner-slider__dot-fill {
		animation: none !important;
		width: 100%;
	}
}

.apkstore-custom-media-sized {
	margin: 0;
}

.apkstore-custom-media-img {
	display: block;
	max-width: 100%;
}

img.apkstore-custom-media-img {
	height: auto;
}

.apkstore-custom-file-list {
	margin: 10px 0 0;
	padding-left: 1.2em;
	list-style: disc;
}

.apkstore-custom-file-link {
	word-break: break-word;
}

.apkstore-custom-link {
	display: inline-block;
	font-weight: 600;
	color: var(--apkstore-accent);
	text-decoration: underline;
}

.apkstore-custom-link-wrap {
	margin: 0.75rem 0 0;
}

.apkstore-rating {
	margin-top: 0.75rem;
}

.apkstore-details-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
}

.apkstore-details-table th,
.apkstore-details-table td {
	border: 1px solid var(--apkstore-border);
	padding: 0.65rem 0.85rem;
	text-align: left;
	vertical-align: top;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.apkstore-details-table th {
	width: 36%;
	background: var(--apkstore-bg);
	font-weight: 600;
}

.apkstore-changelog-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.apkstore-changelog-list > li {
	border: 1px solid var(--apkstore-border);
	border-radius: 10px;
	padding: 0.85rem 1rem;
	margin-bottom: 0.75rem;
	background: #fff;
}

.apkstore-changelog-meta {
	display: flex;
	gap: 0.75rem;
	align-items: baseline;
	margin-bottom: 0.35rem;
}

.apkstore-changelog-date {
	color: var(--apkstore-muted);
	font-size: 0.9em;
}

.apkstore-screenshots-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.75rem;
	align-items: start; /* don't stretch short shots — avoids empty footer under last image */
}

.apkstore-shot-item {
	margin: 0;
	padding: 0;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--apkstore-border);
	background: transparent;
	line-height: 0; /* remove figure descender gap under img */
	align-self: start;
	height: auto;
}

.apkstore-shot-item > img,
.apkstore-shot-item > amp-img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	vertical-align: top;
}

.apkstore-install-body {
	margin: 0 0 1rem;
	line-height: 1.65;
}

.apkstore-install-body > *:first-child {
	margin-top: 0;
}

.apkstore-install-body > *:last-child {
	margin-bottom: 0;
}

.apkstore-install-steps {
	padding-left: 1.25rem;
}

.apkstore-install-steps li {
	margin-bottom: 0.65rem;
}

.apkstore-install-step-figure {
	margin: 0 0 0.5rem;
}

.apkstore-install-step-img {
	display: block;
	max-width: 100%;
	border-radius: 8px;
}

img.apkstore-install-step-img {
	height: auto;
}

.apkstore-faq-item {
	border: 1px solid var(--apkstore-border);
	border-radius: 10px;
	padding: 0.65rem 0.9rem;
	margin-bottom: 0.55rem;
	background: #fff;
}

.apkstore-faq-item summary {
	cursor: pointer;
	font-weight: 600;
}

.apkstore-faq-answer {
	margin-top: 0.5rem;
	color: var(--apkstore-muted);
}

.apkstore-disclaimer {
	font-size: 0.9rem;
	color: var(--apkstore-muted);
	border-top: 1px solid var(--apkstore-border);
	padding-top: 1rem;
}

.apkstore-section-title {
	font-size: clamp(1.25rem, 2vw, 1.6rem);
	margin: 0 0 1rem;
}

.apkstore-review-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.apkstore-review-item {
	border: 1px solid var(--apkstore-border);
	border-radius: 12px;
	padding: 0.9rem 1rem;
	background: #fff;
}

.apkstore-review-head {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

.apkstore-review-avatar-img,
.apkstore-review-avatar--empty,
.apkstore-review-avatar--default .apkstore-review-avatar-img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	background: #e8eef4;
}

.apkstore-review-avatar--empty {
	flex-shrink: 0;
}

.apkstore-review-avatar-img--default {
	background: transparent;
}

.apkstore-review-meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.apkstore-review-date {
	font-size: 0.85em;
	color: var(--apkstore-muted);
}

.apkstore-stars {
	letter-spacing: 0.05em;
	color: #f5a623;
	line-height: 1.2;
}

.apkstore-star--empty {
	color: #c5cdd6;
}

.apkstore-review-body {
	margin-top: 0.55rem;
	color: var(--apkstore-muted);
}

/* Page shell: main content only; float nav is fixed out-of-flow */
.apkstore-shell {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding-bottom: 2.5rem; /* room for page-bottom progress */
}

.apkstore-shell-main {
	min-width: 0;
	width: 100%;
}

/* Fixed right-edge TOC: small marker; hover expands left.
   Colors follow ui_style via --apkstore-float-* (see frontend-themes.css). */
.apkstore-float-nav {
	--apkstore-accent: #0b6e4f;
	--apkstore-float-bg: #ffffff;
	--apkstore-float-fg: #102a43;
	--apkstore-float-muted: #486581;
	--apkstore-float-border: #d9e2ec;
	--apkstore-float-head-bg: #f7fafc;
	--apkstore-float-link: #0b6e4f;
	--apkstore-float-hover-bg: #eef8f3;
	--apkstore-float-hover-fg: #0b6e4f;
	--apkstore-float-handle-fg: #ffffff;
	--apkstore-float-radius: 8px;
	--apkstore-float-shadow: -2px 2px 12px rgba(16, 42, 67, 0.12);

	position: fixed;
	right: 0;
	top: 42%;
	transform: translateY(-50%);
	z-index: 99980;
	display: flex;
	flex-direction: row-reverse;
	align-items: flex-start;
	max-height: min(70vh, 520px);
	pointer-events: none;
	background: transparent;
	padding: 0;
	border: 0;
	border-radius: 0;
	color: var(--apkstore-float-fg);
}

/* Mobile: clear theme/header nav controls (all ui_style presets). */
@media (max-width: 921px) {
	.apkstore-float-nav {
		transform: translateY(calc(-50% + 200px));
	}
}

.apkstore-float-nav-handle,
.apkstore-float-nav-panel {
	pointer-events: auto;
}

.apkstore-float-nav-handle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	min-height: 22px;
	margin: 6px 0 0;
	padding: 0;
	border: 0;
	border-radius: 6px 0 0 6px;
	background: var(--apkstore-accent);
	color: var(--apkstore-float-handle-fg);
	cursor: pointer;
	box-shadow: none;
	font: inherit;
	opacity: 0.85;
	transition: opacity 150ms ease, filter 150ms ease, background 150ms ease;
}

.apkstore-float-nav-handle:hover,
.apkstore-float-nav-handle:focus,
.apkstore-float-nav:not(.is-collapsed) .apkstore-float-nav-handle {
	opacity: 1;
	filter: brightness(1.08);
	outline: none;
}

.apkstore-float-nav-mark {
	font-size: 12px;
	line-height: 1;
	font-weight: 700;
}

.apkstore-float-nav-panel {
	width: 0;
	max-width: 0;
	opacity: 0;
	overflow: hidden;
	max-height: inherit;
	background: transparent;
	color: var(--apkstore-float-fg);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	margin: 0;
	transition: width 200ms ease, max-width 200ms ease, opacity 160ms ease;
}

/* Collapsed: no panel chrome at all (avoids a tall dark border strip). */
.apkstore-float-nav.is-collapsed .apkstore-float-nav-panel {
	width: 0 !important;
	max-width: 0 !important;
	min-width: 0 !important;
	opacity: 0;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	pointer-events: none;
}

.apkstore-float-nav:not(.is-collapsed) .apkstore-float-nav-panel {
	width: min(220px, 78vw);
	max-width: min(220px, 78vw);
	opacity: 1;
	overflow-x: hidden;
	overflow-y: auto;
	background: var(--apkstore-float-bg);
	border: 1px solid var(--apkstore-float-border);
	border-right: 0;
	border-radius: var(--apkstore-float-radius) 0 0 var(--apkstore-float-radius);
	box-shadow: var(--apkstore-float-shadow);
	color: var(--apkstore-float-fg);
}

.apkstore-float-nav-head {
	padding: 0.75rem 0.9rem 0.5rem;
	border-bottom: 1px solid var(--apkstore-float-border);
	background: var(--apkstore-float-head-bg);
}

.apkstore-float-nav-title {
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--apkstore-float-fg);
}

.apkstore-float-nav .apkstore-toc--float {
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
}

.apkstore-float-nav .apkstore-toc-list {
	padding: 0.35rem 0 0.65rem;
}

.apkstore-float-nav .apkstore-toc-item a {
	color: var(--apkstore-float-link);
	text-decoration: none;
	padding: 0.4rem 0.9rem;
	border-left: 3px solid transparent;
	transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.apkstore-float-nav .apkstore-toc-item a:hover,
.apkstore-float-nav .apkstore-toc-item a:focus,
.apkstore-float-nav .apkstore-toc-item.is-active a {
	background: var(--apkstore-float-hover-bg);
	color: var(--apkstore-float-hover-fg);
	border-left-color: var(--apkstore-accent);
}

/* In-content / widget TOC (optional shortcode) */
.apkstore-toc {
	border: 1px solid var(--apkstore-border, #d9e2ec);
	border-radius: 12px;
	background: #fff;
	padding: 0;
	overflow: hidden;
	margin: 1rem 0;
	color: var(--apkstore-text, #102a43);
	box-shadow: 0 1px 2px rgba(16, 42, 67, 0.04);
}

.apkstore-toc-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.75rem 1rem;
	background: #f7fafc;
	border: 0;
	border-bottom: 1px solid #d9e2ec;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.apkstore-toc-header:hover,
.apkstore-toc-header:focus {
	background: #eef5f1;
	outline: none;
}

.apkstore-toc.is-collapsed .apkstore-toc-header {
	border-bottom: 0;
}

.apkstore-toc-title {
	font-weight: 700;
}

.apkstore-toc-toggle-label {
	color: #486581;
	font-size: 0.9rem;
	flex-shrink: 0;
}

.apkstore-toc-list {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
}

.apkstore-toc.is-collapsed .apkstore-toc-list {
	display: none;
}

/* Reading progress — fixed to page bottom */
.apkstore-page-progress {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.35rem 0.85rem;
	background: rgba(255, 255, 255, 0.96);
	border-top: 1px solid #d9e2ec;
	box-shadow: 0 -2px 10px rgba(16, 42, 67, 0.08);
	box-sizing: border-box;
}

.apkstore-page-progress-track {
	flex: 1;
	height: 8px;
	background: #e8eef4;
	border-radius: 999px;
	overflow: hidden;
}

.apkstore-page-progress-bar,
.apkstore-toc-progress-bar {
	height: 100%;
	background: var(--apkstore-accent, #0b6e4f);
	background-image: linear-gradient(90deg, var(--apkstore-accent, #0b6e4f), #2bb673);
	width: 0;
	min-width: 0;
	border-radius: inherit;
	transition: width 80ms linear;
}

.apkstore-page-progress-text {
	min-width: 2.75rem;
	text-align: right;
	font-size: 0.8rem;
	font-weight: 700;
	color: #486581;
	font-variant-numeric: tabular-nums;
}

.apkstore-toc-item a {
	display: block;
	padding: 0.4rem 1rem;
	text-decoration: none;
	color: inherit;
}

.apkstore-toc-item a:hover,
.apkstore-toc-item a:focus,
.apkstore-toc-item.is-active a {
	background: #eef8f3;
	color: #0b6e4f;
}

.apkstore-toc-level-3 a {
	padding-left: 1.75rem;
	font-size: 0.95em;
}

@media (max-width: 600px) {
	.apkstore-logo-img {
		width: 72px;
		height: 72px;
	}
}

/*
 * AMP (official plugin / AMPforWP): <img> is wrapped in <amp-img> and the inner
 * img is position:absolute. Descendant `img { height:auto }` rules collapse or
 * overflow that box — keep inner fill images out of plugin img selectors above.
 */
.apkstore-page amp-img {
	max-width: 100%;
}

.apkstore-logo amp-img.apkstore-logo-img,
amp-img.apkstore-logo-img {
	display: block;
}

.apkstore-is-amp .apkstore-float-nav,
.apkstore-is-amp .apkstore-page-progress,
.apkstore-is-amp .apkstore-banner-slider__nav,
.apkstore-is-amp .apkstore-banner-slider__progress,
.apkstore-is-amp .apkstore-banner-slider__footer {
	display: none !important;
}

/* AMP templates often zero theme gutters; keep text off the viewport edge. */
.apkstore-page.apkstore-is-amp {
	padding-left: 16px;
	padding-right: 16px;
	margin-left: 0;
	margin-right: 0;
	width: 100%;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.apkstore-is-amp .apkstore-h1,
.apkstore-is-amp .apkstore-section-title {
	overflow-wrap: anywhere;
	word-break: break-word;
}

.apkstore-is-amp .apkstore-details-table {
	width: 100%;
	max-width: 100%;
	table-layout: fixed;
}

.apkstore-is-amp .apkstore-details-table th {
	width: 38%;
}

.apkstore-is-amp .apkstore-details-table th,
.apkstore-is-amp .apkstore-details-table td {
	overflow-wrap: anywhere;
	word-break: break-word;
}

@media (max-width: 640px) {
	.apkstore-is-amp .apkstore-details-table,
	.apkstore-is-amp .apkstore-details-table tbody,
	.apkstore-is-amp .apkstore-details-table tr {
		display: block;
		width: 100%;
		max-width: 100%;
	}

	.apkstore-is-amp .apkstore-details-table th,
	.apkstore-is-amp .apkstore-details-table td {
		display: block;
		width: 100%;
		max-width: 100%;
	}

	.apkstore-is-amp .apkstore-details-table th {
		border-bottom: 0;
		padding-bottom: 0.25rem;
	}

	.apkstore-is-amp .apkstore-details-table td {
		padding-top: 0.25rem;
	}

	.apkstore-is-amp .apkstore-details-table tr + tr th {
		border-top: 0;
	}
}
