/* MMB Software Repo — pycode (dark) theme variant.
   Mirrors the structure of styles/prosilver/theme/repo.css, recoloured to pycode. */

.repo-page { margin: 0 0 1em; }

/* masthead */
.repo-masthead {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 8px 16px;
	padding: 6px 0 10px;
}
.repo-masthead-text { flex: 1 1 300px; }
.repo-title {
	margin: 0;
	font-size: 1.9em;
	line-height: 1.2;
	color: #c1c1c7;
}
.repo-tagline { margin: 4px 0 0; color: #bdbdbd; font-size: 1.05em; }
.repo-masthead-actions { padding-bottom: 2px; }
.repo-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	width: 100%;
	padding: 8px 0 2px;
	border-top: 1px solid #2b2f34;
	font-size: 0.95em;
	color: #bdbdbd;
}
.repo-stat strong { color: #368ad2; }

.repo-button-primary {
	background-color: #368ad2;
	border-color: #2a6ca8;
	color: #fff !important;
	text-shadow: none;
}
.repo-button-primary:hover { background-color: #3f96e0; color: #fff; }

/* sections */
.repo-section { margin: 14px 0; }
.repo-section-title {
	margin: 0 0 10px;
	padding-bottom: 4px;
	border-bottom: 1px solid #42474f;
	font-size: 1.15em;
	color: #c1c1c7;
}
.repo-section-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 6px;
	border-bottom: 1px solid #42474f;
	margin-bottom: 10px;
}
.repo-section-head .repo-section-title { border-bottom: 0; margin: 0 0 4px; }
.repo-sort { display: flex; gap: 4px; margin-bottom: 4px; }

/* filter bar */
.repo-filterbar { margin: 12px 0 14px; }
.repo-filter-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	justify-content: space-between;
}
.repo-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.repo-tab {
	display: inline-block;
	padding: 4px 10px;
	border: 1px solid transparent;
	border-radius: 4px;
	color: #b7b7bd;
	text-decoration: none;
	font-size: 0.92em;
}
.repo-tab:hover { background: #353940; text-decoration: none; color: #dcdcdc; }
.repo-tab-active { background: #368ad2; border-color: #2a6ca8; color: #fff !important; }
.repo-searchbox { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.repo-searchbox select, .repo-searchbox input[type="search"] {
	padding: 4px 6px;
	border: 1px solid #202225;
	border-radius: 3px;
	background: #2f3136;
	color: #bdbdbd;
}
.repo-searchbox input[type="search"] { min-width: 180px; }

/* card grid */
.repo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
	gap: 12px;
}
.repo-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #2b2f34;
	border-radius: 6px;
	background: #42474f;
	transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.repo-card:hover {
	transform: translateY(-3px);
	border-color: #368ad2;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.repo-card-media {
	position: relative;
	display: block;
	height: 120px;
	background: #202225;
	overflow: hidden;
	text-decoration: none;
}
.repo-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.repo-card-nothumb {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 3.4em;
	font-weight: 700;
	color: #42474f;
	text-transform: uppercase;
}
.repo-card-version {
	position: absolute;
	right: 0;
	bottom: 0;
	padding: 2px 8px;
	background: rgba(54, 138, 210, 0.9);
	color: #fff;
	font-size: 0.78em;
	border-radius: 4px 0 0 0;
}
.repo-ribbon {
	position: absolute;
	top: 8px;
	left: -28px;
	width: 110px;
	padding: 2px 0;
	background: #d29f00;
	color: #1a1a1a;
	font-size: 0.7em;
	font-weight: 700;
	text-align: center;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	transform: rotate(-45deg);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.repo-card-body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 10px; }
.repo-card-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.repo-card-title { margin: 0; font-size: 1.05em; line-height: 1.25; }
.repo-card-title a { color: #c1c1c7; text-decoration: none; }
.repo-card-title a:hover { color: #368ad2; }
.repo-card-desc {
	margin: 0;
	flex: 1;
	color: #bdbdbd;
	font-size: 0.88em;
	line-height: 1.4;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
.repo-card-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 6px;
	padding-top: 6px;
	border-top: 1px solid #2b2f34;
	font-size: 0.8em;
	color: #828282;
}
.repo-card-downloads { white-space: nowrap; color: #368ad2; }

/* badges */
.repo-badge {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 10px;
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	background: #202225;
	color: #bdbdbd;
	border: 1px solid #2b2f34;
}
.repo-badge-platform { background: #2a4d6e; color: #9ecfef; border-color: #2f5a82; }
.repo-badge-type { background: #2b3a2b; color: #8fc78f; border-color: #334a33; }
.repo-badge-featured { background: #3a3520; color: #d29f00; border-color: #55491f; }

/* entry page */
.repo-view-head .inner { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; }
.repo-view-titlebar { flex: 1 1 320px; }
.repo-view-title { margin: 0; font-size: 1.6em; line-height: 1.25; color: #c1c1c7; }
.repo-version-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 10px;
	background: #368ad2;
	color: #fff;
	border-radius: 12px;
	font-size: 0.55em;
	font-weight: 600;
	vertical-align: middle;
}
.repo-view-badges { margin: 8px 0 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.repo-view-byline { margin: 4px 0 0; color: #828282; font-size: 0.9em; }
.repo-view-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; align-content: center; }
.repo-danger { color: #f98656 !important; border-color: #7a4a35 !important; }
.repo-danger:hover { background: #3a2b25; color: #f9a06e; }

.repo-view-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px;
	gap: 12px;
	align-items: start;
}
.repo-view-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.repo-view-side { position: sticky; top: 8px; }
.repo-mini-title { margin: 0 0 8px; font-size: 1.05em; color: #c1c1c7; }
.repo-description { line-height: 1.55; }
.repo-description img { max-width: 100%; height: auto; }

/* gallery */
.repo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.repo-gallery-item {
	display: block;
	border: 1px solid #2b2f34;
	border-radius: 4px;
	overflow: hidden;
	height: 90px;
	background: #202225;
}
.repo-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.15s ease; }
.repo-gallery-item:hover img { transform: scale(1.05); }

/* sidebar meta */
.repo-author-card {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid #2b2f34;
}
.repo-author-avatar img { max-width: 48px; max-height: 48px; border-radius: 4px; }
.repo-author-name { font-weight: 600; color: #c1c1c7; }
.repo-meta { margin: 0; }
.repo-meta dt { float: left; clear: left; width: 45%; color: #828282; font-size: 0.85em; }
.repo-meta dd { margin: 0 0 6px 48%; font-size: 0.85em; word-break: break-word; }

/* versions */
.repo-versions { display: flex; flex-direction: column; gap: 8px; }
.repo-version { border: 1px solid #2b2f34; border-radius: 5px; padding: 8px 10px; background: #41474f; }
.repo-version-latest { border-color: #368ad2; background: #3a4a55; }
.repo-version-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.repo-version-label { font-weight: 700; color: #c1c1c7; }
.repo-version-meta { flex: 1; color: #828282; font-size: 0.85em; }
.repo-version-actions { display: flex; gap: 6px; }
.repo-latest-badge {
	display: inline-block;
	margin-right: 6px;
	padding: 1px 8px;
	background: #d29f00;
	color: #1a1a1a;
	border-radius: 10px;
	font-size: 0.7em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.repo-changelog { margin-top: 8px; border-top: 1px dashed #42474f; padding-top: 6px; }
.repo-changelog summary { cursor: pointer; color: #368ad2; font-weight: 600; }
.repo-changelog .content { margin-top: 6px; padding: 6px 10px; background: #202225; border-left: 3px solid #368ad2; }

/* lightbox */
.repo-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 14, 20, 0.94);
}
.repo-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); }
.repo-lightbox button {
	position: absolute;
	border: 0;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	font-size: 2em;
	line-height: 1;
	border-radius: 50%;
	width: 46px;
	height: 46px;
	transition: background 0.12s ease;
}
.repo-lightbox button:hover { background: rgba(255, 255, 255, 0.3); }
.repo-lightbox-close { top: 14px; right: 14px; }
.repo-lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.repo-lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }
.repo-noscroll { overflow: hidden; }

/* wizard steps */
.repo-steps { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0 0 12px; padding: 0; }
.repo-step {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border: 1px solid #2b2f34;
	border-radius: 16px;
	background: #202225;
	color: #828282;
	font-size: 0.88em;
}
.repo-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #42474f;
	color: #c1c1c7;
	font-weight: 700;
	font-size: 0.85em;
}
.repo-step-active { background: #368ad2; border-color: #2a6ca8; color: #fff; }
.repo-step-active .repo-step-num { background: #fff; color: #2a6ca8; }
.repo-step-done { border-color: #2a6ca8; color: #9ecfef; background: #2a4d6e; }
.repo-step-done .repo-step-num { background: #368ad2; color: #fff; }
.repo-step-panel { margin: 0 0 12px; }
.repo-step-title { margin: 0 0 10px; color: #c1c1c7; font-size: 1.1em; }

/* forms */
.repo-form { margin: 0; }
.repo-form dt { float: left; width: 32%; padding: 5px 0; color: #c1c1c7; }
.repo-form dt span { color: #828282; font-size: 0.85em; }
.repo-form dd { margin: 0 0 8px 34%; padding: 2px 0; }
.repo-form input[type="text"], .repo-form input[type="url"], .repo-form input[type="search"], .repo-form select, .repo-form textarea {
	padding: 5px 7px;
	border: 1px solid #202225;
	border-radius: 3px;
	background: #2f3136;
	color: #bdbdbd;
	width: 100%;
	max-width: 520px;
	box-sizing: border-box;
}
.repo-form textarea { resize: vertical; }
.repo-hint { color: #828282; font-size: 0.85em; font-weight: 400; }
.repo-invalid { border-color: #f98656 !important; box-shadow: 0 0 0 2px rgba(249, 134, 86, 0.2); }

.repo-version-row { border: 1px solid #2b2f34; border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; background: #41474f; }
.repo-version-row-title { margin: 0 0 8px; color: #c1c1c7; font-size: 1em; }
.repo-version-row-extra { border-style: dashed; }

.repo-image-preview { margin-top: 6px; }
.repo-image-preview img { max-width: 180px; max-height: 120px; border-radius: 4px; border: 1px solid #2b2f34; }

.repo-review dd { color: #9ecfef; font-weight: 600; }

.repo-wizard-nav { display: flex; gap: 8px; justify-content: flex-end; margin: 10px 0 20px; }

/* edit page */
.repo-form-actions { text-align: center; margin-top: 12px; }
.repo-edit-images { display: flex; flex-wrap: wrap; gap: 10px; }
.repo-edit-image { width: 150px; border: 1px solid #2b2f34; border-radius: 4px; overflow: hidden; background: #202225; }
.repo-edit-image img { width: 100%; height: 95px; object-fit: cover; display: block; }
.repo-edit-image-del { display: block; padding: 4px 8px; font-size: 0.8em; background: #42474f; border-top: 1px solid #2b2f34; color: #bdbdbd; }
.repo-edit-image-add { display: flex; flex-wrap: wrap; gap: 8px; }

/* profile block */
.repo-profile-list { list-style: none; margin: 0; padding: 0; }
.repo-profile-list li { padding: 5px 0; border-bottom: 1px solid #2b2f34; font-size: 0.92em; }
.repo-profile-list li:last-child { border-bottom: 0; }
.repo-profile-meta { color: #828282; font-size: 0.85em; margin-left: 6px; }

/* misc */
.repo-empty {
	margin: 10px 0;
	padding: 18px;
	text-align: center;
	color: #828282;
	border: 1px dashed #2b2f34;
	border-radius: 6px;
	background: #202225;
}
.repo-pagination { margin-top: 12px; }

/* responsive */
@media (max-width: 900px) {
	.repo-view-grid { grid-template-columns: 1fr; }
	.repo-view-side { position: static; }
}
@media (max-width: 700px) {
	.repo-form dt { float: none; width: auto; }
	.repo-form dd { margin-left: 0; }
	.repo-masthead { align-items: flex-start; }
}
