/* syso-auto: neutral greys, blue links, green primary actions; follows the system light/dark setting */
@import url("theme-forgejo-light.css");
@import url("theme-forgejo-dark.css") (prefers-color-scheme: dark);

:root {
	--color-primary: #0969da;
	--color-primary-contrast: #ffffff;
	--color-accent: #0969da;
	--color-body: #ffffff;
	--color-box-body: #ffffff;
	--color-box-header: #f6f8fa;
	--color-box-body-highlight: #f6f8fa;
	--color-card: #ffffff;
	--color-menu: #ffffff;
	--color-footer: #ffffff;
	--color-timeline: #d1d9e0;
	--color-nav-bg: #f6f8fa;
	--color-secondary-nav-bg: #f6f8fa;
	--color-header-wrapper: #f6f8fa;
	--color-text: #1f2328;
	--color-text-dark: #1f2328;
	--color-text-light: #59636e;
	--color-text-light-1: #59636e;
	--color-text-light-2: #59636e;
	--color-text-light-3: #59636e;
	--color-secondary: #d1d9e0;
	--color-button: #f6f8fa;
	--color-hover: #eff2f5;
	--color-active: #eff2f5;
	--color-input-background: #ffffff;
	--color-input-border: #d1d9e0;
	--color-markup-code-block: #f6f8fa;
	--color-code-bg: #ffffff;
	--sy-green: #1f883d;
	--sy-green-hover: #1c8139;
	--border-radius: 6px;
	--color-primary-dark-1: color-mix(in srgb, #0969da, black 10%);
	--color-primary-dark-2: color-mix(in srgb, #0969da, black 22%);
	--color-primary-dark-3: color-mix(in srgb, #0969da, black 34%);
	--color-primary-dark-4: color-mix(in srgb, #0969da, black 46%);
	--color-primary-light-1: color-mix(in srgb, #0969da, white 16%);
	--color-primary-light-2: color-mix(in srgb, #0969da, white 32%);
	--color-primary-light-3: color-mix(in srgb, #0969da, white 48%);
	--color-primary-light-4: color-mix(in srgb, #0969da, white 62%);
	--color-primary-light-5: color-mix(in srgb, #0969da, white 76%);
	--color-primary-light-6: color-mix(in srgb, #0969da, white 86%);
	--color-primary-alpha-10: color-mix(in srgb, #0969da 10%, transparent);
	--color-primary-alpha-20: color-mix(in srgb, #0969da 20%, transparent);
	--color-primary-alpha-30: color-mix(in srgb, #0969da 30%, transparent);
	--color-primary-alpha-40: color-mix(in srgb, #0969da 40%, transparent);
	--color-primary-alpha-50: color-mix(in srgb, #0969da 50%, transparent);
	--color-primary-alpha-60: color-mix(in srgb, #0969da 60%, transparent);
	--color-primary-alpha-70: color-mix(in srgb, #0969da 70%, transparent);
	--color-primary-alpha-80: color-mix(in srgb, #0969da 80%, transparent);
	--color-primary-alpha-90: color-mix(in srgb, #0969da 90%, transparent);
	--color-primary-hover: var(--color-primary-dark-1);
	--color-primary-active: var(--color-primary-dark-2);
}
@media (prefers-color-scheme: dark) {
:root {
	--color-primary: #4493f8;
	--color-primary-contrast: #ffffff;
	--color-accent: #4493f8;
	--color-body: #0d1117;
	--color-box-body: #0d1117;
	--color-box-header: #151b23;
	--color-box-body-highlight: #151b23;
	--color-card: #0d1117;
	--color-menu: #151b23;
	--color-footer: #0d1117;
	--color-timeline: #3d444d;
	--color-nav-bg: #010409;
	--color-secondary-nav-bg: #010409;
	--color-header-wrapper: #010409;
	--color-text: #f0f6fc;
	--color-text-dark: #f0f6fc;
	--color-text-light: #9198a1;
	--color-text-light-1: #9198a1;
	--color-text-light-2: #9198a1;
	--color-text-light-3: #9198a1;
	--color-secondary: #3d444d;
	--color-button: #212830;
	--color-hover: #262c36;
	--color-active: #262c36;
	--color-input-background: #0d1117;
	--color-input-border: #3d444d;
	--color-markup-code-block: #151b23;
	--color-code-bg: #0d1117;
	--sy-green: #238636;
	--sy-green-hover: #29903b;
	--border-radius: 6px;
	--color-primary-dark-1: color-mix(in srgb, #4493f8, white 10%);
	--color-primary-dark-2: color-mix(in srgb, #4493f8, white 22%);
	--color-primary-dark-3: color-mix(in srgb, #4493f8, white 34%);
	--color-primary-dark-4: color-mix(in srgb, #4493f8, white 46%);
	--color-primary-light-1: color-mix(in srgb, #4493f8, black 16%);
	--color-primary-light-2: color-mix(in srgb, #4493f8, black 32%);
	--color-primary-light-3: color-mix(in srgb, #4493f8, black 48%);
	--color-primary-light-4: color-mix(in srgb, #4493f8, black 62%);
	--color-primary-light-5: color-mix(in srgb, #4493f8, black 76%);
	--color-primary-light-6: color-mix(in srgb, #4493f8, black 86%);
	--color-primary-alpha-10: color-mix(in srgb, #4493f8 10%, transparent);
	--color-primary-alpha-20: color-mix(in srgb, #4493f8 20%, transparent);
	--color-primary-alpha-30: color-mix(in srgb, #4493f8 30%, transparent);
	--color-primary-alpha-40: color-mix(in srgb, #4493f8 40%, transparent);
	--color-primary-alpha-50: color-mix(in srgb, #4493f8 50%, transparent);
	--color-primary-alpha-60: color-mix(in srgb, #4493f8 60%, transparent);
	--color-primary-alpha-70: color-mix(in srgb, #4493f8 70%, transparent);
	--color-primary-alpha-80: color-mix(in srgb, #4493f8 80%, transparent);
	--color-primary-alpha-90: color-mix(in srgb, #4493f8 90%, transparent);
	--color-primary-hover: var(--color-primary-dark-1);
	--color-primary-active: var(--color-primary-dark-2);
}
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, var(--fonts-emoji); }

/* header */
#navbar { border-bottom: 1px solid var(--color-secondary); }
.ui.secondary.pointing.menu .active.item { border-bottom: 2px solid #fd8c73; font-weight: 600; }
.ui.secondary.pointing.menu .item { border-radius: 6px 6px 0 0; }
.repository .secondary-nav .repo-header .flex-item-main { font-size: 20px; }
.ui.label { border-radius: 2em; }

/* buttons */
.ui.button { border-radius: 6px; font-weight: 500; }
.ui.basic.button, .ui.button:not(.primary):not(.red):not(.green):not(.basic) { box-shadow: 0 1px 0 rgba(31,35,40,.05); }
.ui.primary.button:not(.basic), .ui.green.button:not(.basic), .ui.primary.buttons .button:not(.basic) { background: var(--sy-green); border-color: rgba(31,35,40,.15); color: #fff; }
.ui.primary.button:not(.basic):hover, .ui.green.button:not(.basic):hover, .ui.primary.buttons .button:not(.basic):hover { background: var(--sy-green-hover); color: #fff; }

/* boxes and file list */
.ui.segment, .ui.attached.header, .ui.table { border-radius: 6px; }
#repo-files-table { border-radius: 6px; overflow: hidden; }
#repo-files-table td { padding-top: 9px; padding-bottom: 9px; }
#repo-files-table .octicon-file-directory-fill { color: #54aeff; }
.markup { line-height: 1.6; }

/* repository home: "About" column on the right, files and README on the left */
@media (min-width: 1100px) {
	.repository.file.list > .ui.container:has(> .repo-description) { display: flow-root; }
	.repository.file.list > .ui.container:has(> .repo-description) > :is(.repo-description, #repo-topics, #topic_edit, .repository-summary) {
		float: right; clear: right; width: 288px; margin-left: 0; margin-right: 0;
	}
	.repository.file.list > .ui.container:has(> .repo-description) > :not(.repo-description, #repo-topics, #topic_edit, .repository-summary, #flash-message) {
		margin-right: 312px !important;
	}
	.repository.file.list > .ui.container:has(> .repo-description) > table { width: calc(100% - 312px) !important; }
	.repository.file.list > .ui.container > .repo-description { display: block; }
	.repository.file.list > .ui.container > .repo-description::before { content: "About"; display: block; font-weight: 600; font-size: 16px; margin-bottom: 8px; }
	.repository.file.list > .ui.container > .repo-description #repo-desc { font-size: 14px !important; }
	.repository.file.list > .ui.container > .repository-summary { box-shadow: none; border: 0; border-top: 1px solid var(--color-secondary); border-radius: 0; background: transparent; padding-top: 8px; }
	.repository.file.list > .ui.container > .repository-summary .repository-menu { display: flex; flex-direction: column; align-items: flex-start; border: 0; background: transparent; padding: 0; }
	.repository.file.list > .ui.container > .repository-summary .repository-menu > .item { flex: none; justify-content: flex-start; padding: 5px 0; margin: 0; border: 0; text-align: left; }
	.repository.file.list > .ui.container:has(> .repo-description) > .code-search { width: calc(100% - 312px) !important; }
}

/* counters attached to buttons keep the button's shape */
.ui.labeled.button > .label { border-radius: 0 6px 6px 0; }
/* "New issue" and friends are styled per page and need the extra specificity */
.page-content .button.primary:not(.basic):not(#repo-clone-https):not(#repo-clone-ssh) { background: var(--sy-green); color: #fff; }
.page-content .button.primary:not(.basic):hover { background: var(--sy-green-hover); color: #fff; }
