/*
 * theme-terminal-orange.css
 * A minimal, terminal-inspired dark theme for Forgejo.
 *
 * Aesthetic: warm amber/orange on deep black, monospace UI,
 * flat surfaces, subtle borders, no gradients, no noise.
 *
 * Based on forgejo-dark, overrides CSS variables only.
 * Drop into: <forgejo-data>/custom/public/assets/css/theme-terminal-orange.css
 * Then add "terminal" to [ui].THEMES in app.ini or via env var.
 */

@import url("./theme-forgejo-dark.css");

:root {
  color-scheme: dark;

  /* ── Palette ─────────────────────────────────────────────── */
  /*   bg-deep     #0a0a0a   almost black                      */
  /*   bg-surface  #111111   cards, panels                     */
  /*   bg-raised   #1a1a1a   hover states, secondary surfaces  */
  /*   border      #222222   subtle dividers                   */
  /*   text-dim    #555555   muted / disabled                  */
  /*   text-mid    #888888   secondary text                    */
  /*   text-main   #b0b0b0   primary text (soft white)         */
  /*   accent      #ff9a2f   warm terminal orange              */
  /*   accent-dim  #7a4416   accent at low opacity             */
  /*   warn        #ffaa00   amber warnings                    */
  /*   error       #ff4444   red errors                        */

  /* ── Typography ──────────────────────────────────────────── */
  --fonts-proportional: "Berkeley Mono", "JetBrains Mono", "Fira Code",
    "SF Mono", "Cascadia Code", "Source Code Pro", ui-monospace,
    monospace !important;
  --fonts-monospace: "Berkeley Mono", "JetBrains Mono", "Fira Code",
    "SF Mono", "Cascadia Code", "Source Code Pro", ui-monospace,
    monospace !important;

  /* ── Primary / Accent ────────────────────────────────────── */
  --color-primary: #ff9a2f !important;
  --color-primary-hover: #ffb35c !important;
  --color-primary-active: #e67f18 !important;
  --color-primary-alpha-10: rgba(255, 154, 47, 0.10) !important;
  --color-primary-alpha-20: rgba(255, 154, 47, 0.20) !important;
  --color-primary-alpha-40: rgba(255, 154, 47, 0.40) !important;
  --color-accent: #ff9a2f !important;

  /* ── Backgrounds ─────────────────────────────────────────── */
  --color-body: #0a0a0a !important;
  --color-box-body: #111111 !important;
  --color-box-body-highlight: #1a1a1a !important;
  --color-secondary-alpha-20: rgba(255, 255, 255, 0.04) !important;
  --color-secondary-alpha-40: rgba(255, 255, 255, 0.07) !important;
  --color-secondary-alpha-60: rgba(255, 255, 255, 0.10) !important;
  --color-secondary-alpha-80: rgba(255, 255, 255, 0.14) !important;

  /* ── Borders ─────────────────────────────────────────────── */
  --color-secondary: #222222 !important;
  --color-border: #222222 !important;

  /* ── Text ────────────────────────────────────────────────── */
  --color-text: #b0b0b0 !important;
  --color-text-light: #888888 !important;
  --color-text-light-1: #888888 !important;
  --color-text-light-2: #666666 !important;
  --color-text-light-3: #555555 !important;

  /* ── Navbar ──────────────────────────────────────────────── */
  --color-nav-bg: #0a0a0a !important;
  --color-nav-text: #b0b0b0 !important;
  --color-nav-hover-bg: #1a1a1a !important;

  /* ── Header / Footer ─────────────────────────────────────── */
  --color-header: #0a0a0a !important;
  --color-header-wrapper: #0a0a0a !important;
  --color-footer: #0a0a0a !important;

  /* ── Buttons ─────────────────────────────────────────────── */
  --color-button-primary-bg: #ff9a2f !important;
  --color-button-primary-text: #0a0a0a !important;
  --color-button-primary-hover-bg: #ffb35c !important;
  --color-button-primary-hover-text: #0a0a0a !important;

  /* ── Diffs ───────────────────────────────────────────────── */
  --color-diff-removed-word-bg: rgba(255, 68, 68, 0.35) !important;
  --color-diff-added-word-bg: rgba(255, 154, 47, 0.25) !important;
  --color-diff-removed-row-bg: rgba(255, 68, 68, 0.08) !important;
  --color-diff-added-row-bg: rgba(255, 154, 47, 0.08) !important;
  --color-diff-removed-row-border: rgba(255, 68, 68, 0.25) !important;
  --color-diff-added-row-border: rgba(255, 154, 47, 0.25) !important;

  /* ── Shadows (kill them all) ─────────────────────────────── */
  --shadow-xs: none !important;
  --shadow-sm: none !important;
  --shadow-md: none !important;
  --shadow-lg: none !important;
  --shadow-xl: none !important;

  /* ── Labels / Tags ───────────────────────────────────────── */
  --color-label-active-bg: rgba(255, 154, 47, 0.12) !important;
  --color-label-active-text: #ff9a2f !important;

  /* ── Inputs ──────────────────────────────────────────────── */
  --color-input-background: #0a0a0a !important;
  --color-input-border: #222222 !important;
  --color-input-text: #b0b0b0 !important;

  /* ── Code blocks ─────────────────────────────────────────── */
  --color-code-bg: #0e0e0e !important;
  --color-code-sidebar-bg: #0a0a0a !important;
}

/* ── Global tweaks ───────────────────────────────────────────── */

html {
  font-size: 15px !important;
}

body {
  font-weight: 500 !important;
  line-height: 1.55 !important;
}

strong,
b,
.ui.button,
.ui.menu .item,
.ui.tabular.menu .item,
.ui.label,
.ui.header {
  font-weight: 700 !important;
}

/* Thinner, sharper borders everywhere */
.ui.segment,
.ui.attached.segment,
.repository .repo-header,
.repository .repo-body {
  border-color: #222222 !important;
  border-radius: 2px !important;
}

/* Remove box shadows globally */
*,
.ui.segment,
.ui.card,
.ui.menu,
.ui.dropdown .menu {
  box-shadow: none !important;
}

/* Flat, minimal cards */
.ui.card,
.ui.cards > .card {
  border: 1px solid #222222 !important;
  border-radius: 2px !important;
  background: #111111 !important;
}

/* Repo list: cleaner */
.flex-item {
  border-bottom: 1px solid #1a1a1a !important;
}

/* Kiln landing page */
.kiln-home-hero-wrap {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

.kiln-home-showcase {
  max-width: 1120px;
}

.kiln-home-copy h3 {
  margin: 0.25rem 0 0.85rem;
  color: #e0e0e0 !important;
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.kiln-home-lead {
  margin: 0;
  max-width: 42rem;
  color: #b0b0b0 !important;
  font-size: 1.02rem;
  line-height: 1.7;
}

.kiln-home-point-list {
  margin-top: 1.5rem;
}

.kiln-home-point {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #222222;
}

.kiln-home-point:last-child {
  padding-bottom: 0;
}

.kiln-home-point-icon,
.kiln-home-visual-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.9rem;
  background: #171717;
  color: #ff9a2f;
  border: 1px solid #2a2a2a;
}

.kiln-home-point-icon i,
.kiln-home-visual-badge i {
  margin: 0 !important;
  font-size: 1.05rem !important;
}

.kiln-home-point-body h4 {
  margin: 0;
  color: #e0e0e0 !important;
  font-size: 1.02rem;
  font-weight: 800;
}

.kiln-home-point-body p {
  margin: 0.3rem 0 0;
  color: #b0b0b0 !important;
  line-height: 1.6;
}

.kiln-home-visual-column {
  display: flex;
  justify-content: center;
}

.kiln-home-visual-panel {
  width: 100%;
  max-width: 520px;
  padding: 1.25rem;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  background: #101010;
}

.kiln-home-visual-topbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.kiln-home-visual-grid {
  margin-top: 0 !important;
}

.kiln-home-visual-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: #1a1a1a;
  color: #b0b0b0;
  border: 1px solid #2a2a2a;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kiln-home-visual-chip-accent {
  background: rgba(255, 154, 47, 0.12);
  color: #ffb35c;
  border-color: rgba(255, 154, 47, 0.28);
}

.kiln-home-visual-tile {
  min-height: 100%;
  padding: 1rem;
  border: 1px solid #222222;
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(255, 154, 47, 0.12), transparent 52%),
    #111111;
}

.kiln-home-visual-tile i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 0.8rem !important;
  border-radius: 0.8rem;
  background: #171717;
  color: #ff9a2f;
  border: 1px solid #2a2a2a;
  font-size: 1rem !important;
}

.kiln-home-visual-tile strong {
  display: block;
  color: #e0e0e0 !important;
  font-size: 0.98rem;
  font-weight: 800;
}

.kiln-home-visual-tile span {
  display: block;
  margin-top: 0.3rem;
  color: #b0b0b0 !important;
  line-height: 1.55;
}

.kiln-home-visual-tile-accent {
  border-color: rgba(255, 154, 47, 0.35);
}

.kiln-home-visual-tile-accent i {
  color: #ffb35c;
  border-color: rgba(255, 154, 47, 0.35);
}

.kiln-home-visual-panel:hover,
.kiln-home-visual-tile:hover {
  border-color: #ff9a2f;
}

/* Buttons: flat, no rounding */
.ui.button,
.ui.basic.button {
  border-radius: 2px !important;
  text-transform: none !important;
}

/* Primary button: orange on black, inverted on hover */
.ui.primary.button {
  background: #ff9a2f !important;
  color: #0a0a0a !important;
  border: 1px solid #ff9a2f !important;
  font-weight: 700 !important;
}

.ui.primary.button:hover {
  background: #0a0a0a !important;
  color: #ff9a2f !important;
  border: 1px solid #ff9a2f !important;
}

/* Secondary/basic buttons */
.ui.basic.button {
  background: transparent !important;
  color: #888888 !important;
  border: 1px solid #333333 !important;
}

.ui.basic.button:hover {
  color: #ff9a2f !important;
  border-color: #ff9a2f !important;
}

/* Navbar: flat and minimal */
.ui.secondary.menu .item,
.ui.tabular.menu .item {
  border-radius: 0 !important;
}

/* Active tab: bottom accent line instead of background change */
.ui.tabular.menu .active.item {
  border-bottom: 2px solid #ff9a2f !important;
  background: transparent !important;
  color: #ff9a2f !important;
}

/* Links: orange, no underline until hover */
a {
  color: #ff9a2f !important;
  text-decoration: none !important;
}

a:hover {
  text-decoration: underline !important;
  color: #ffb35c !important;
}

/* Dimmer text links (breadcrumbs, metadata) */
.text.grey a,
.meta a,
.commit-header a {
  color: #888888 !important;
}

.text.grey a:hover,
.meta a:hover,
.commit-header a:hover {
  color: #ff9a2f !important;
}

/* Code view: slightly larger and easier to scan */
.code-view .lines-code,
.code-view .lines-num {
  font-size: 14px !important;
  line-height: 1.55 !important;
}

/* Scrollbars: thin and dark */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff9a2f;
}

/* Dropdown menus: flat */
.ui.dropdown .menu {
  background: #111111 !important;
  border: 1px solid #222222 !important;
  border-radius: 2px !important;
}

.ui.dropdown .menu > .item {
  color: #b0b0b0 !important;
}

.ui.dropdown .menu > .item:hover {
  background: #1a1a1a !important;
  color: #ff9a2f !important;
}

/* Selection: warm highlight */
::selection {
  background: rgba(255, 154, 47, 0.25);
  color: #e0e0e0;
}
