/* Listing Manager — front-end app page styles
   Structurally follows the reference site's class names; visual polish
   (exact colors/fonts) is left open until a theme is chosen. */

.container-min {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 15px;
	overflow-x: hidden; /* hard backstop: whatever else might still be slightly oversized inside here gets clipped rather than dragging the whole page sideways */
}

.section-sm {
	padding: 10px 0;
}

.box-shadow-commn {
	background: var( --lm-panel );
	border: 1px solid var( --lm-line );
	border-radius: 10px;
	box-shadow: var( --lm-shadow-sm );
	padding: 20px;
	margin-bottom: 20px;
}

/* Hero / download section */
.download-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

.download-title-block {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: 1 1 260px;
	min-width: 0; /* without this, a flex item won't shrink below its content's natural width -- exactly what was forcing the whole card wider than the phone screen */
}

.app_descripation {
	min-width: 0;
}

.app-img {
	width: 72px;
	height: 72px;
	border-radius: 16px;
	object-fit: cover;
	flex-shrink: 0;
}

.entry-title {
	font-size: 22px;
	margin: 0 0 4px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	line-height: 1.2;
	overflow-wrap: break-word;
	min-width: 0;
	color: var( --lm-ink );
}

.app-btn.app-apk {
	background: var( --lm-btn );
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 4px;
}

.appver {
	color: var( --lm-muted );
	font-size: 13px;
}

.developer-name {
	color: var( --lm-muted );
	font-size: 13px;
	margin: 2px 0 0;
}

.app-desc {
	font-size: 14px;
	font-weight: 400;
	color: var( --lm-muted );
	margin: 0;
	line-height: 1.5;
}

.download-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var( --lm-grad-btn );
	color: #fff;
	padding: 12px 20px;
	border-radius: 8px;
	text-decoration: none;
	flex: 1 1 100%;
	justify-content: center;
	min-width: 0;
}

.download-btn:hover {
	background: var( --lm-grad-btn );
	color: #fff;
	filter: brightness( 1.1 );
}

.download-btn.is-disabled,
.download-btn.is-disabled:hover {
	background: #8a8f98;
	color: #fff;
	cursor: not-allowed;
	filter: none;
}

.dld-btn-text {
	min-width: 0;
}

.dld-btn-text p {
	margin: 0;
	line-height: 1.3;
	overflow-wrap: break-word;
}

.dld-btn-app-name {
	font-weight: 600;
}

/* Desktop software listings */
.app-btn.app-desktop {
	background: var( --lm-btn-2 );
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 4px;
}

.lm-os-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex: 1 1 100%;
	min-width: 0;
}

.lm-os-buttons .download-btn {
	flex: 1 1 180px;
}

.lm-official-note,
.lm-other-os {
	flex: 1 1 100%;
	font-size: 13px;
	color: var( --lm-muted );
	margin: 0;
	text-align: center;
}

.lm-req-heading {
	margin-top: 20px;
}

.lm-legal-notice {
	border-left: 4px solid var( --lm-notice-line );
	background: var( --lm-notice-bg );
	margin-bottom: 0;
}

.lm-legal-notice p {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var( --lm-notice-ink );
}

/* Screenshots */
.screenshots-wrapper {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding-bottom: 10px;

	/* Visible scroll-position track, matching the reference site's
	   gallery rather than a bare invisible-until-you-drag strip. */
	scrollbar-width: thin;
	scrollbar-color: var( --lm-thumb ) var( --lm-track );
}
.screenshots-wrapper::-webkit-scrollbar {
	height: 6px;
}
.screenshots-wrapper::-webkit-scrollbar-track {
	background: var( --lm-track );
	border-radius: 4px;
}
.screenshots-wrapper::-webkit-scrollbar-thumb {
	background: var( --lm-thumb );
	border-radius: 4px;
}

.screenshots-wrapper img {
	/*
	 * Fixed HEIGHT only, width follows each image's natural aspect
	 * ratio. A fixed width+height box (object-fit:cover) was tried
	 * here and caused bad cropping on any screenshot that isn't
	 * naturally portrait-shaped -- landscape screenshots got their
	 * sides sliced off. This never crops anything; the row just isn't
	 * perfectly uniform-width, which is the correct tradeoff.
	 */
	height: 220px;
	width: auto;
	max-width: 340px; /* guard against one unusually wide landscape screenshot dominating the row */
	object-fit: contain;
	border-radius: 8px;
	flex-shrink: 0;
}

/* App info table */
.font-sixteen {
	font-size: 16px;
	margin: 0 0 12px;
	color: var( --lm-ink );
}

.app-info-main-block {
	width: 100%;
	table-layout: fixed; /* without this, table-layout:auto (the default) ignores width:100% and expands to fit unbroken content like package names, regardless of container width */
	border-collapse: collapse;
}

.app-info-grp th,
.app-info-grp td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid var( --lm-line );
	font-size: 14px;
	overflow-wrap: break-word; /* lets long unbroken strings (package names, etc.) break instead of forcing the table wider */
}

.app-name-table-key {
	color: var( --lm-muted );
	width: 180px;
	font-weight: 600;
}

.cat-link-icon {
	color: var( --lm-link );
	text-decoration: none;
	margin-left: 4px;
}

/* Social share */
.social-share-wrapper {
	display: flex;
	gap: 12px;
}

.social-share-wrapper a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	border-radius: 20px;
	background: var( --lm-panel2 );
	color: var( --lm-ink );
	text-decoration: none;
	font-size: 13px;
}

.social-share-wrapper a:hover {
	background: var( --lm-line );
}

/* Article */
.app-detailes-main-block {
	font-size: 15px;
	line-height: 1.7;
	color: var( --lm-ink );
}

.app-detailes-main-block img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.app-detailes-main-block h3 {
	margin-top: 24px;
}

/* Download page */
.progress {
	background: var( --lm-panel2 );
	border-radius: 6px;
	height: 8px;
	margin: 10px 0;
	overflow: hidden;
}

.progress-bar {
	background: var( --lm-grad-btn );
	height: 100%;
	width: 0%;
	transition: width 1.6s ease;
}

.dld-page-refresh-para {
	font-size: 13px;
	color: var( --lm-muted );
	margin-top: 14px;
	flex: 1 1 100%;
	text-align: center;
}

#download-loading {
	flex: 1 1 100%;
	text-align: center;
	font-size: 13px;
	color: var( --lm-muted );
}

@media ( max-width: 600px ) {
	.download-row {
		justify-content: center;
		text-align: center;
	}
	.download-title-block {
		flex-direction: column;
		text-align: center;
	}
}
