/**
* @package phpBB Extension - Milestones
* @copyright (c) 2026 dmzx - https://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*/

/* ── Outer wrapper (sits inside Stats-Info-Center .sic-body grid) ─────── */
#ms-wrapper {
	grid-column: 1 / -1;
	order: 999;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.ms-sep {
	height: 1px;
	background: rgba(255,255,255,0.06);
	margin: 4px 0 2px;
}

/* ── Per-repo section ─────────────────────────────────────────────────── */
.ms-repo {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ms-repo-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ms-repo-title {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .6px;
	color: var(--sic-text-dim, #8b93a7);
}
.ms-repo-title a { color: var(--sic-text-dim, #8b93a7); text-decoration: none; }
.ms-repo-title a:hover { color: var(--sic-accent, #6ea8fe); }

.ms-repo-loading {
	font-size: 12px;
	color: var(--sic-text-dim, #8b93a7);
	font-style: italic;
	margin-left: 4px;
}

/* ── Repo stats row ───────────────────────────────────────────────────── */
.rs-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	padding: 10px 14px;
	background: rgba(255,255,255,0.03);
	border: 1px solid rgba(255,255,255,0.06);
	border-radius: 8px;
}

.rs-item {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: var(--sic-text-dim, #8b93a7);
}
.rs-item svg { flex-shrink: 0; }

.rs-val {
	color: var(--sic-text, #e8eaf0);
	font-weight: 600;
}

.rs-lang-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--sic-accent, #6ea8fe);
	flex-shrink: 0;
}

/* ── Latest release card ──────────────────────────────────────────────── */
.lr-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	background: rgba(52,211,153,0.06);
	border: 1px solid rgba(52,211,153,0.2);
	border-radius: 10px;
	flex-wrap: wrap;
}

.lr-badge {
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 4px;
	background: rgba(52,211,153,0.18);
	color: #34d399;
	white-space: nowrap;
	flex-shrink: 0;
}

.lr-info { flex: 1; min-width: 0; }

.lr-tag {
	font-size: 13px;
	font-weight: 600;
	color: #34d399;
}

.lr-meta {
	font-size: 11px;
	color: var(--sic-text-dim, #8b93a7);
	margin-top: 2px;
}

.lr-link { color: var(--sic-accent, #6ea8fe); text-decoration: none; }
.lr-link:hover { text-decoration: underline; }

.lr-dl {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.lr-dl-item {
	font-size: 11px;
	color: var(--sic-text-dim, #8b93a7);
	display: flex;
	align-items: center;
	gap: 4px;
}
.lr-dl-item strong { color: var(--sic-text, #e8eaf0); }

/* ── Milestone card grid (auto-fit = no empty ghost columns) ──────────── */
.ms-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ── Individual milestone card ────────────────────────────────────────── */
.ms-card {
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 10px;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition: border-color .2s, transform .2s;
	list-style: none;
	min-width: 0;
}
.ms-card:hover {
	border-color: rgba(255,255,255,0.18);
	transform: translateY(-1px);
}

.ms-card-head { display: flex; align-items: center; gap: 9px; }

.ms-gh-icon {
	width: 28px;
	height: 28px;
	background: rgba(110,168,254,0.12);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.ms-gh-icon svg { display: block; }

.ms-version-link {
	font-size: 13px;
	font-weight: 600;
	color: var(--sic-accent, #6ea8fe);
	text-decoration: none;
}
.ms-version-link:hover { text-decoration: underline; }

.ms-bar-wrap {
	height: 7px;
	border-radius: 99px;
	background: rgba(255,255,255,0.06);
	overflow: hidden;
}
.ms-bar-fill {
	height: 100%;
	border-radius: 99px;
	background: linear-gradient(90deg, #34d399, #6ea8fe);
	transition: width .6s ease;
}

.ms-pct {
	font-family: "SF Mono", Menlo, Consolas, monospace;
	font-size: 22px;
	font-weight: 700;
	color: var(--sic-text, #e8eaf0);
	line-height: 1;
}
.ms-pct-label {
	font-size: 11px;
	color: var(--sic-text-dim, #8b93a7);
	margin-left: 3px;
	font-weight: 400;
}

.ms-counts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.ms-pill {
	font-size: 11px;
	padding: 2px 7px;
	border-radius: 4px;
	font-weight: 600;
}
.ms-pill-open   { background: rgba(251,113,133,0.15); color: #fb7185; }
.ms-pill-closed { background: rgba(52,211,153,0.15);  color: #34d399; }

/* Due date pill — only shown when GitHub has a due date set */
.ms-due {
	font-size: 11px;
	padding: 2px 7px;
	border-radius: 4px;
	font-weight: 600;
	background: rgba(251,191,36,0.12);
	color: #fbbf24;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.ms-due svg { flex-shrink: 0; }

.ms-updated {
	font-size: 11px;
	color: var(--sic-text-dim, #8b93a7);
	display: flex;
	align-items: center;
	gap: 4px;
}

.ms-empty {
	font-size: 12px;
	color: var(--sic-text-dim, #8b93a7);
	font-style: italic;
}

@media (max-width: 700px) {
	.ms-cards { grid-template-columns: 1fr; }
	.rs-row   { gap: 10px; }
	.lr-card  { flex-direction: column; align-items: flex-start; }
}
