/* TeamIDE brand overrides for Gitea
 *
 * Brand colors:
 *   Background: #1A1A1E    Surface: #26262B
 *   Primary:    #E86A3A    Secondary: #F2A93B
 *   Text:       #E0DDD8    Muted: #6B6870
 */

:root {
  /* Primary — burnt orange */
  --color-primary: #E86A3A !important;
  --color-primary-contrast: #fff !important;
  --color-primary-dark-1: #d45a2d !important;
  --color-primary-dark-2: #c04e24 !important;
  --color-primary-dark-3: #a8421d !important;
  --color-primary-dark-4: #903617 !important;
  --color-primary-dark-5: #6b2810 !important;
  --color-primary-dark-6: #451a0a !important;
  --color-primary-dark-7: #200d05 !important;
  --color-primary-light-1: #ec7e54 !important;
  --color-primary-light-2: #f0926e !important;
  --color-primary-light-3: #f3a688 !important;
  --color-primary-light-4: #f6baa2 !important;
  --color-primary-light-5: #f9cebc !important;
  --color-primary-light-6: #fce2d6 !important;
  --color-primary-light-7: #fef6f0 !important;
  --color-primary-alpha-10: rgba(232, 106, 58, 0.1) !important;
  --color-primary-alpha-20: rgba(232, 106, 58, 0.2) !important;
  --color-primary-alpha-30: rgba(232, 106, 58, 0.3) !important;
  --color-primary-alpha-40: rgba(232, 106, 58, 0.4) !important;
  --color-primary-alpha-50: rgba(232, 106, 58, 0.5) !important;
  --color-primary-alpha-60: rgba(232, 106, 58, 0.6) !important;
  --color-primary-alpha-70: rgba(232, 106, 58, 0.7) !important;
  --color-primary-alpha-80: rgba(232, 106, 58, 0.8) !important;
  --color-primary-alpha-90: rgba(232, 106, 58, 0.9) !important;
  --color-primary-hover: var(--color-primary-dark-1) !important;
  --color-primary-active: var(--color-primary-dark-2) !important;

  /* Background and surfaces */
  --color-body: #1A1A1E !important;
  --color-box-body: #26262B !important;
  --color-box-header: #2d2d32 !important;
  --color-box-body-highlight: #2d2d32 !important;
  --color-input-background: #26262B !important;
  --color-input-border: #3d3d42 !important;
  --color-input-border-hover: #4d4d52 !important;
  --color-menu: #26262B !important;
  --color-card: #26262B !important;
  --color-markup-table-row: #26262B !important;
  --color-markup-code-block: #26262B !important;
  --color-header: #1A1A1E !important;
  --color-nav-bg: #1A1A1E !important;
  --color-nav-hover-bg: #26262B !important;
  --color-footer: #1A1A1E !important;
  --color-shadow: rgba(0, 0, 0, 0.4) !important;
  --color-secondary-nav-bg: #26262B !important;

  /* Text */
  --color-text: #E0DDD8 !important;
  --color-text-dark: #E0DDD8 !important;
  --color-text-light: #E0DDD8 !important;
  --color-text-light-1: #c8c5c0 !important;
  --color-text-light-2: #a8a5a0 !important;
  --color-text-light-3: #6B6870 !important;
  --color-input-text: #E0DDD8 !important;
  --color-placeholder-text: #6B6870 !important;

  /* Borders */
  --color-secondary-dark-2: #3d3d42 !important;
  --color-secondary-dark-3: #4d4d52 !important;
  --color-secondary-dark-6: #6B6870 !important;

  /* Labels */
  --color-label-text: #E0DDD8 !important;
  --color-label-bg: #333338 !important;

  /* Light text overrides */
  --color-light: #2d2d32 !important;
  --color-light-border: #3d3d42 !important;

  /* Tooltip */
  --color-tooltip-bg: #333338 !important;
  --color-tooltip-text: #E0DDD8 !important;

  /* Hover states */
  --color-hover: rgba(232, 106, 58, 0.08) !important;

  /* Console colors */
  --color-console-fg: #E0DDD8 !important;
  --color-console-bg: #1A1A1E !important;
  --color-console-border: #3d3d42 !important;

  /* Accent for secondary elements — amber */
  --color-orange-badge-bg: rgba(242, 169, 59, 0.15) !important;
  --color-orange-badge-hover-bg: rgba(242, 169, 59, 0.3) !important;

  /* Black override for dark theme */
  --color-black: #E0DDD8 !important;
  --color-white: #1A1A1E !important;
}

/* ===== Global ===== */

body {
  background-color: #1A1A1E !important;
  color: #E0DDD8 !important;
}

/* ===== Navbar ===== */

.ui.secondary.pointing.menu {
  border-color: #3d3d42 !important;
}

.ui.secondary.pointing.menu .active.item {
  border-color: #E86A3A !important;
  color: #E0DDD8 !important;
}

.full-width-panel,
#navbar,
.ui.top.secondary.stackable.menu.header-bar {
  background-color: #1A1A1E !important;
  border-bottom-color: #3d3d42 !important;
}

.ui.secondary.menu .item,
.ui.secondary.menu a.item {
  color: #E0DDD8 !important;
}

.ui.secondary.menu .item:hover {
  color: #E86A3A !important;
}

/* ===== Footer ===== */

footer, .page-footer {
  background-color: #1A1A1E !important;
  border-top-color: #3d3d42 !important;
  color: #6B6870 !important;
}

footer a {
  color: #6B6870 !important;
}

/* ===== Buttons ===== */

.ui.primary.button,
.ui.primary.buttons .button {
  background-color: #E86A3A !important;
  color: #fff !important;
}

.ui.primary.button:hover,
.ui.primary.buttons .button:hover {
  background-color: #d45a2d !important;
}

.ui.basic.button {
  background-color: #26262B !important;
  color: #E0DDD8 !important;
  border-color: #3d3d42 !important;
}

.ui.basic.button:hover {
  background-color: #333338 !important;
  color: #E86A3A !important;
}

.ui.negative.button,
.ui.red.button {
  background-color: #c04040 !important;
}

.ui.green.button,
.ui.positive.button {
  background-color: #3a8a3e !important;
}

/* ===== Cards and segments ===== */

.ui.segment,
.ui.segments .segment,
.ui.attached.segment {
  background-color: #26262B !important;
  border-color: #3d3d42 !important;
  color: #E0DDD8 !important;
}

.ui.attached.header {
  background-color: #2d2d32 !important;
  border-color: #3d3d42 !important;
  color: #E0DDD8 !important;
}

/* ===== Forms and inputs ===== */

.ui.input input,
.ui.form input,
.ui.form textarea,
.ui.form select,
.ui.selection.dropdown {
  background-color: #26262B !important;
  border-color: #3d3d42 !important;
  color: #E0DDD8 !important;
}

.ui.input input:focus,
.ui.form input:focus,
.ui.form textarea:focus {
  border-color: #E86A3A !important;
  background-color: #2d2d32 !important;
}

/* ===== Links ===== */

a {
  color: #E86A3A !important;
}

a:hover {
  color: #f07a4a !important;
}

/* Repo/org links should be text colored, not orange */
.repository-item a,
.explore .item a,
.ui.repository.list .item a {
  color: #E0DDD8 !important;
}

.repository-item a:hover,
.explore .item a:hover {
  color: #E86A3A !important;
}

/* ===== Tables ===== */

.ui.table {
  background-color: #26262B !important;
  color: #E0DDD8 !important;
  border-color: #3d3d42 !important;
}

.ui.table thead th {
  background-color: #2d2d32 !important;
  color: #E0DDD8 !important;
  border-color: #3d3d42 !important;
}

.ui.table td {
  border-color: #3d3d42 !important;
}

/* ===== Dropdowns ===== */

.ui.dropdown .menu {
  background-color: #26262B !important;
  border-color: #3d3d42 !important;
}

.ui.dropdown .menu .item {
  color: #E0DDD8 !important;
  border-color: #3d3d42 !important;
}

.ui.dropdown .menu .item:hover {
  background-color: #333338 !important;
}

/* ===== Labels/tags ===== */

.ui.label {
  background-color: #333338 !important;
  color: #E0DDD8 !important;
}

/* ===== Messages ===== */

.ui.info.message {
  background-color: rgba(232, 106, 58, 0.1) !important;
  color: #E0DDD8 !important;
  border-color: rgba(232, 106, 58, 0.3) !important;
}

/* ===== Homepage overrides ===== */

.hero h1, .hero h2,
.landing h1, .landing h2,
.home h1, .home h2 {
  color: #E0DDD8 !important;
}

/* SVG icons — override Gitea green with brand orange */
.svg {
  color: #E86A3A !important;
  fill: #E86A3A !important;
}

.hero .octicon,
.landing .octicon,
.home .octicon,
.page-content .octicon,
.svg.octicon-organization,
.svg.octicon-lock,
.svg.octicon-git-branch,
.svg.octicon-people {
  color: #E86A3A !important;
  fill: #E86A3A !important;
}

/* Navbar logo/icon should keep original color */
.navbar .svg,
#navbar .svg {
  color: inherit !important;
  fill: inherit !important;
}

/* ===== Selection ===== */

::selection {
  background-color: rgba(232, 106, 58, 0.3) !important;
}

/* ===== Scrollbars ===== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1A1A1E;
}

::-webkit-scrollbar-thumb {
  background: #3d3d42;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4d4d52;
}

/* ===== Misc ===== */

.ui.divider {
  border-color: #3d3d42 !important;
}

.ui.modal,
.ui.modal > .header,
.ui.modal > .content,
.ui.modal > .actions {
  background-color: #26262B !important;
  color: #E0DDD8 !important;
}

.ui.list .item {
  color: #E0DDD8 !important;
}

code, pre {
  background-color: #2d2d32 !important;
  color: #E0DDD8 !important;
}
