
/* =========================================================
   RWY Forgejo custom theme
   ========================================================= */

/* ---------- Palette & typography ---------- */
:root {
  --fonts-proportional: Inter, system-ui, sans-serif !important;
  --fonts-monospace: "JetBrains Mono", monospace !important;

  --rwy-blue: #2f6fa3;
  --rwy-blue-dark: #255983;
  --rwy-blue-soft: #eaf3fb;

  --rwy-green: #2f8f6b;
  --rwy-green-dark: #256f54;
  --rwy-green-soft: #eaf7f1;

  --rwy-label-bg: #eef2f5;
  --rwy-label-border: #d7dee5;
  --rwy-text-dark: #222;
  --rwy-text-muted: #444;
}

/* ---------- Layout ---------- */
.page-content {
  max-width: 1280px;
  margin: 0 auto;
}

.ui.container {
  max-width: 1100px;
  padding-left: 1rem;
  padding-right: 1rem;
}

.ui.segment,
.ui.menu,
.ui.card {
  border-radius: 12px !important;
}

.ui.button {
  border-radius: 8px !important;
}

.ui.segment,
.ui.menu,
.ui.button {
  box-shadow: none !important;
}

.ui.segment {
  border: 1px solid var(--color-border);
}

.ui.menu {
  border-bottom: 1px solid var(--color-border) !important;
}

.repository .repo-header {
  border-radius: 12px;
}

h1, h2, h3 {
  font-weight: 600;
}

/* ---------- Global links ---------- */
a,
.ui.link.list .item,
.repository .repo-description a,
footer a,
.page-footer a {
  color: var(--rwy-blue) !important;
  text-decoration: none;
}

a:hover,
.ui.link.list .item:hover,
.repository .repo-description a:hover,
footer a:hover,
.page-footer a:hover {
  color: var(--rwy-blue-dark) !important;
  text-decoration: underline;
}

/* ---------- Navigation ---------- */
.ui.menu .item {
  color: var(--rwy-text-dark) !important;
}

.ui.menu .active.item,
.ui.menu .item:hover {
  color: var(--rwy-blue) !important;
}

.ui.secondary.pointing.menu .active.item,
.ui.tabular.menu .active.item,
.ui.tabular.menu .item.active {
  color: var(--rwy-blue) !important;
  border-color: var(--rwy-blue) !important;
  border-top-color: var(--rwy-blue) !important;
}

/* ---------- Buttons ---------- */
.ui.primary.button,
.ui.primary.buttons .button {
  background: var(--rwy-blue) !important;
  border-color: var(--rwy-blue) !important;
  color: #fff !important;
}

.ui.primary.button:hover,
.ui.primary.buttons .button:hover {
  background: var(--rwy-blue-dark) !important;
  border-color: var(--rwy-blue-dark) !important;
}

/* ---------- Labels & states ---------- */
.ui.label {
  background: var(--rwy-label-bg) !important;
  color: var(--rwy-text-muted) !important;
  border: 1px solid var(--rwy-label-border) !important;
}

a.ui.label:hover,
.ui.label[href]:hover {
  background: var(--rwy-blue-soft) !important;
  color: var(--rwy-blue-dark) !important;
  border-color: #c4d9ec !important;
}

.ui.orange.label,
.ui.basic.orange.label {
  background: var(--rwy-blue-soft) !important;
  color: var(--rwy-blue) !important;
  border-color: #c4d9ec !important;
}

.ui.positive.message,
.ui.green.label,
.ui.basic.green.label {
  background: var(--rwy-green-soft) !important;
  color: var(--rwy-green-dark) !important;
  border-color: #b7ddce !important;
}

/* Neutralize orange/red accents from Forgejo theme */
.text.red,
.ui.red.text,
.ui.orange.text {
  color: var(--rwy-blue) !important;
}

/* ---------- Generic octicons ---------- */
svg.octicon,
.svg.octicon,
.ui .octicon,
a svg.octicon {
  color: var(--rwy-blue);
  fill: currentColor;
}

a:hover svg.octicon,
.ui:hover .octicon {
  color: var(--rwy-blue-dark);
  fill: currentColor;
}

/* ---------- Homepage hero ---------- */
.hero.ui.icon.header,
.hero.ui.icon.header a,
.hero.ui.icon.header svg,
.hero.ui.icon.header .octicon,
.hero.ui.icon.header .svg {
  color: var(--rwy-green) !important;
  fill: var(--rwy-green) !important;
}

.hero.ui.icon.header a:hover,
.hero.ui.icon.header:hover,
.hero.ui.icon.header:hover svg {
  color: var(--rwy-green-dark) !important;
  fill: var(--rwy-green-dark) !important;
}

.page.grid .large a {
  color: var(--rwy-blue) !important;
}

.page.grid .large a:hover {
  color: var(--rwy-blue-dark) !important;
}

/* ---------- Repository list (current Forgejo layout) ---------- */
/* owner / repo names */
.flex-item .flex-item-title a.text.primary.name,
.flex-item-main .flex-item-title a.text.primary.name,
.repo-list .flex-item-title a.text.primary.name {
  color: var(--rwy-blue) !important;
}

.flex-item .flex-item-title a.text.primary.name:hover,
.flex-item-main .flex-item-title a.text.primary.name:hover,
.repo-list .flex-item-title a.text.primary.name:hover {
  color: var(--rwy-blue-dark) !important;
}

/* repo icon */
.flex-item-leading .octicon-repo,
.flex-item-leading svg.octicon-repo,
.flex-item-leading .svg.octicon-repo {
  color: var(--rwy-blue) !important;
  fill: var(--rwy-blue) !important;
}

/* trailing metadata: language / stars / forks */
.flex-item-trailing a,
.flex-item-trailing a svg,
.muted-links a,
.muted-links a svg {
  color: var(--rwy-blue) !important;
  fill: currentColor !important;
}

.flex-item-trailing a:hover,
.flex-item-trailing a:hover svg,
.muted-links a:hover,
.muted-links a:hover svg {
  color: var(--rwy-blue-dark) !important;
  fill: currentColor !important;
}

/* fallback for repo title contexts in other views */
.repository .repo-title,
.repository .repo-title a,
.repository .repo-title svg,
.repository .repo-title .octicon,
.explore .repo-title,
.explore .repo-title a,
.explore .repo-title svg,
.explore .repo-title .octicon {
  color: var(--rwy-blue) !important;
  fill: var(--rwy-blue) !important;
}

.repository .repo-title a:hover,
.repository .repo-title a:hover svg,
.explore .repo-title a:hover,
.explore .repo-title a:hover svg {
  color: var(--rwy-blue-dark) !important;
  fill: var(--rwy-blue-dark) !important;
}
