/* GitHub-style commits modal (portfolio) */

.portfolio-modal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-top: 12px;
}

.portfolio-modal-actions .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 999px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

/* Outline button readable on white modal content */
.btn-commits {
	background: #fff !important;
	border: 1.5px solid var(--tj-theme-primary) !important;
	color: var(--tj-theme-primary) !important;
	box-shadow: none !important;
}

.btn-commits i {
	color: inherit !important;
}

.btn-commits:hover,
.btn-commits:focus {
	background: var(--tj-theme-primary) !important;
	color: #fff !important;
	border-color: var(--tj-theme-primary) !important;
}

.gh-commits-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(8, 5, 14, 0.72);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	overflow-y: auto;
}

.gh-commits-overlay.is-open {
	display: flex;
}

.gh-commits-modal {
	width: min(720px, 100%);
	max-height: min(85vh, 900px);
	background: #0d1117;
	border: 1px solid #30363d;
	border-radius: 12px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	color: #e6edf3;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.gh-commits-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	padding: 16px 20px;
	border-bottom: 1px solid #30363d;
	background: #161b22;
}

.gh-commits-header h3 {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 600;
	color: #f0f6fc;
}

.gh-commits-header p {
	margin: 0;
	font-size: 13px;
	color: #8b949e;
}

.gh-commits-header a {
	color: #8750f7;
	text-decoration: none;
}

.gh-commits-header a:hover {
	text-decoration: underline;
}

.gh-commits-close {
	background: transparent;
	border: none;
	color: #8b949e;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.gh-commits-close:hover {
	color: #f0f6fc;
}

.gh-commits-body {
	padding: 8px 0 20px;
	overflow-y: auto;
}

.gh-commits-loading,
.gh-commits-empty,
.gh-commits-error {
	padding: 40px 24px;
	text-align: center;
	color: #8b949e;
	font-size: 14px;
}

.gh-commits-error {
	color: #f85149;
}

.gh-day-group {
	padding: 12px 20px 4px;
}

.gh-day-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 600;
	color: #e6edf3;
	margin: 0 0 10px;
}

.gh-day-title::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid #30363d;
	background: #0d1117;
	box-shadow: 0 0 0 2px #0d1117;
}

.gh-commit-list {
	list-style: none;
	margin: 0;
	padding: 0 0 0 18px;
	border-left: 2px solid #21262d;
}

.gh-commit-item {
	position: relative;
	padding: 10px 12px 14px 16px;
	margin-left: -4px;
	border-radius: 8px;
	border: 1px solid transparent;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gh-commit-item::before {
	content: "";
	position: absolute;
	left: -22px;
	top: 16px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #30363d;
	border: 2px solid #0d1117;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.gh-commit-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: flex-start;
}

.gh-commit-main {
	min-width: 0;
	flex: 1;
}

.gh-commit-msg {
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 600;
	color: #e6edf3;
	line-height: 1.4;
	word-break: break-word;
}

.gh-commit-text {
	color: inherit;
}

/* Hover tint by conventional-commit type — title stays white for contrast */
.gh-commit-item.gh-type-feat:hover {
	background: rgba(63, 185, 80, 0.12);
	border-color: rgba(63, 185, 80, 0.35);
}

.gh-commit-item.gh-type-feat:hover::before {
	background: #3fb950;
	box-shadow: 0 0 0 2px rgba(63, 185, 80, 0.25);
}

.gh-commit-item.gh-type-fix:hover {
	background: rgba(248, 81, 73, 0.12);
	border-color: rgba(248, 81, 73, 0.35);
}

.gh-commit-item.gh-type-fix:hover::before {
	background: #f85149;
	box-shadow: 0 0 0 2px rgba(248, 81, 73, 0.25);
}

.gh-commit-item.gh-type-refactor:hover {
	background: rgba(88, 166, 255, 0.12);
	border-color: rgba(88, 166, 255, 0.35);
}

.gh-commit-item.gh-type-refactor:hover::before {
	background: #58a6ff;
	box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.25);
}

.gh-commit-item.gh-type-chore:hover {
	background: rgba(139, 148, 158, 0.14);
	border-color: rgba(139, 148, 158, 0.4);
}

.gh-commit-item.gh-type-chore:hover::before {
	background: #8b949e;
	box-shadow: 0 0 0 2px rgba(139, 148, 158, 0.25);
}

.gh-commit-item.gh-type-other:hover {
	background: rgba(135, 80, 247, 0.12);
	border-color: rgba(135, 80, 247, 0.35);
}

.gh-commit-item.gh-type-other:hover::before {
	background: #8750f7;
	box-shadow: 0 0 0 2px rgba(135, 80, 247, 0.25);
}

.gh-commit-item:hover .gh-commit-msg,
.gh-commit-item:hover .gh-commit-text {
	color: #f0f6fc;
}

.gh-commit-item:hover .gh-commit-meta {
	color: #8b949e;
}

.gh-badge {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	margin-right: 6px;
	vertical-align: middle;
	text-transform: capitalize;
}

.gh-badge-feat {
	background: rgba(63, 185, 80, 0.2);
	color: #3fb950;
}

.gh-badge-fix {
	background: rgba(248, 81, 73, 0.2);
	color: #f85149;
}

.gh-badge-refactor {
	background: rgba(88, 166, 255, 0.2);
	color: #58a6ff;
}

.gh-badge-chore {
	background: rgba(139, 148, 158, 0.25);
	color: #c9d1d9;
}

.gh-badge-other {
	background: rgba(135, 80, 247, 0.2);
	color: #b794f6;
}

.gh-commit-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: #8b949e;
}

.gh-commit-meta img {
	width: 18px;
	height: 18px;
	border-radius: 50%;
}

.gh-commit-side {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.gh-sha {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	color: #8b949e;
	background: #21262d;
	border: 1px solid #30363d;
	border-radius: 6px;
	padding: 2px 8px;
	text-decoration: none;
}

.gh-sha:hover {
	color: #8750f7;
	border-color: #8750f7;
}
