/* Global Forgejo UI polish layer.
   Keep colors mostly in theme-gruvbox-dark.css.
   Put layout / spacing / radius fixes here.
*/

:root {
	--custom-radius-sm: 8px;
	--custom-radius-md: 12px;
	--custom-radius-lg: 16px;
	--custom-radius-xl: 22px;
	--custom-shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.18);
}

/* Prevent repeated background artifacts on tall pages */
html {
	background: var(--color-body);
}

body {
	min-height: 100vh;
	background: var(--color-body);
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(circle at top left, rgba(254, 128, 25, 0.08), transparent 34rem),
		radial-gradient(circle at bottom right, rgba(131, 165, 152, 0.08), transparent 32rem);
	background-repeat: no-repeat;
	background-size: 100vw 100vh;
}

/* Main content */
.page-content {
	padding-top: 1.25rem;
}

.ui.container {
	width: min(1280px, calc(100% - 2rem)) !important;
}

/* Cards / boxes */
.ui.segment,
.ui.card,
.ui.cards > .card,
.ui.attached.segment,
.ui.attached.header,
.repository.file.list,
.comment,
.timeline-item {
	border-radius: var(--custom-radius-md);
}

.ui.segment,
.ui.card,
.ui.cards > .card {
	box-shadow: none;
}

/* Better repo and dashboard panels */
.repository .header-wrapper,
.repo-header,
.custom-dashboard-hero,
.custom-dashboard-feed-card {
	border-radius: var(--custom-radius-lg);
}

/* Menus */
.ui.menu {
	border-radius: 0;
}

.ui.dropdown .menu {
	border-radius: var(--custom-radius-md);
	box-shadow: var(--custom-shadow-soft);
}

/* Buttons */
.ui.button {
	border-radius: var(--custom-radius-sm);
}

.ui.primary.button {
	box-shadow: 0 8px 24px rgba(254, 128, 25, 0.16);
}

/* Inputs */
input,
textarea,
.ui.input input,
.ui.form input,
.ui.form textarea,
.ui.selection.dropdown {
	border-radius: var(--custom-radius-sm) !important;
}

/* Labels */
.ui.label {
	border-radius: 999px;
}

/* Repository list polish */
.repo-list .item,
.repository.list .item {
	border-radius: var(--custom-radius-md);
	padding: 1rem;
}

.repo-list .item:hover,
.repository.list .item:hover {
	background: var(--color-hover);
}

/* Code/file view */
.file-header,
.file-view,
.code-view,
.repository.file.list {
	overflow: hidden;
	border-radius: var(--custom-radius-md);
}

/* Dashboard action icon centering fix */
.custom-dashboard-action .custom-dashboard-action-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 12px;
	line-height: 1;
	flex: 0 0 2.25rem;
}

.custom-dashboard-action .custom-dashboard-action-icon svg {
	display: block;
	width: 20px;
	height: 20px;
	margin: 0;
	flex: 0 0 auto;
}

/* Mobile */
@media (max-width: 767px) {
	.ui.container {
		width: calc(100% - 1rem) !important;
	}

	.page-content {
		padding-top: 0.75rem;
	}
}
