/*
 * Teslina brand overrides for Gitea 1.27.x
 * Drop into: <GITEA_CUSTOM>/public/assets/css/teslina-overrides.css
 * Loaded via custom/templates/custom/header.tmpl AFTER Gitea's own theme
 * stylesheet, so the cascade only overrides the handful of variables we
 * care about — everything else (borders, shadows, alpha colors, etc.)
 * keeps coming from whichever base theme the user has selected
 * (gitea-light by default). This is NOT a selectable theme-*.css file;
 * it layers on top of one, which avoids the "half the variables are
 * undefined" breakage a standalone theme file causes if it doesn't
 * redefine Gitea's full variable set.
 *
 * Keep DEFAULT_THEME = gitea-light (or gitea-auto) in app.ini; this file
 * re-skins whichever theme is active.
 */

:root {
  /* Brand */
  --color-primary: #194fe3;
  --color-primary-dark-1: #143fb8;
  --color-primary-dark-2: #0f2f8c;
  --color-primary-light-1: #3a68e7;
  --color-primary-light-2: #5c81ec;
  --color-accent: #194fe3;
  --color-link: #194fe3;
  --color-logo: #194fe3;

  /* Radius - sharp, no rounding, matches teslina.net */
  --border-radius: 0;
  --border-radius-medium: 0;

  /* Typography */
  --fonts-regular: 'Archivo', -apple-system, 'Segoe UI', sans-serif;
  --fonts-monospace: 'JetBrains Mono', ui-monospace, monospace;
}

body {
  font-family: var(--fonts-regular);
}

code,
pre,
.monospace {
  font-family: var(--fonts-monospace);
}

/* Dark "ink" navbar, like teslina.net */
.ui.menu.navbar,
#navbar,
.full.height > .navbar {
  background-color: #171a1e !important;
  border-bottom: 1px solid #2b2e33 !important;
}

/* Only items sitting directly on the bar (#navbar > .navbar-left/.navbar-right > .item)
   get the light color — NOT `.item` everywhere, which also matches items
   inside the light-background account/language dropdown popups
   (#navbar .navbar-right .menu .item, nested deeper) and would make
   those white-on-white (invisible) */
#navbar > .navbar-left > .item,
#navbar > .navbar-right > .item {
  color: #f4f3f1 !important;
}

#navbar > .navbar-left > .item:hover,
#navbar > .navbar-right > .item:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

/* The account/dropdown triggers on the bar are `.item.dropdown` divs —
   covered by the rule above — but their icon/text must inherit, not the
   browser default */
#navbar > .navbar-left > .item.dropdown,
#navbar > .navbar-right > .item.dropdown {
  color: #f4f3f1 !important;
}

/* Dark footer band */
footer,
.page-footer {
  background-color: #171a1e !important;
  color: #838690 !important;
  border-top: 1px solid #2b2e33 !important;
}

/* Only links sitting directly on the footer bar — NOT `footer a` /
   `.page-footer a` everywhere, which also matches items inside the
   light-background theme/language dropdown popups
   (#footer-theme-selector .menu, .language-menu) and made those
   white-on-white */
.page-footer > .left-links > a,
.page-footer > .right-links > a,
.page-footer > .right-links > .ui.dropdown > .default-text,
.page-footer > .right-links > .ui.dropdown > .flex-text-inline {
  color: #f4f3f1 !important;
}

/* Hide Gitea's own branding links that app.ini toggles don't fully cover
   in 1.27 (the "Help" nav item and "Powered by Gitea" footer link are
   hardcoded in core templates, not template-var driven) */
a[href="https://docs.gitea.com"],
a[href="https://about.gitea.com"] {
  display: none !important;
}

/* Our injected footer brand line (custom/templates/custom/footer.tmpl)
   renders as a sibling right after </footer> — style it to blend into
   the same dark band instead of showing as a separate light bar */
.teslina-footer-brand {
  background-color: #171a1e;
  color: #838690;
  margin-top: -1px;
  text-align: center;
  padding: 0.5rem 0 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
}

.teslina-footer-brand a {
  color: inherit;
}

.teslina-footer-brand a:hover {
  text-decoration: underline;
}

/* Custom landing page (templates/home.tmpl) */
.teslina-home__hero {
  padding: 4rem 1rem 3.5rem;
  margin-bottom: 2rem;
}

.teslina-home__hero .logo {
  margin-inline: auto;
  filter: drop-shadow(0 0 0.5rem rgba(25, 79, 227, 0.5));
}

.teslina-home__hero h1.title {
  font-weight: 800;
}

.teslina-home__hero h2 {
  color: #838690;
  font-weight: 400;
  max-width: 40rem;
  margin-inline: auto;
}

.teslina-home__cta {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.teslina-home__cta .ui.button {
  border-radius: 0;
}

.teslina-home__links a {
  color: #194fe3;
}

/* Buttons - brand blue, square corners */
.ui.primary.button,
.ui.green.button {
  background-color: #194fe3 !important;
  border-radius: 0 !important;
}

.ui.primary.button:hover,
.ui.green.button:hover {
  background-color: #143fb8 !important;
}

.ui.button,
.ui.input input,
.ui.card,
.repository.list .item,
.ui.attached.segment,
.ui.segment {
  border-radius: 0 !important;
}
