/*
 * Gitea Theme: Amber Phosphor
 *
 * Based on a monochrome amber terminal palette.
 * Drop into: 
$GITEA_CUSTOM/public/assets/css/theme-amber.css
 * Then set [ui] DEFAULT_THEME = amber in app.ini,
 * or let users select "amber" from their appearance 
settings.
 *
 * Color reference:
 *   Background:    #0a0a0a
 *   Foreground:    #ffb000
 *   Dim:           #333300
 *   Bright:        #ffcc00
 *   Brightest:     #ffff00
 */

:root,
[data-theme="amber"] {

  /*  Core surface  */
  --color-body:                   #0a0a0a;
  --color-canvas:                 #0a0a0a;
  --color-canvas-subtle:          #0f0f00;
  --color-border:                 #333300;
  --color-border-subtle:          #1a1a00;
  --color-shadow:                 rgba(255, 176, 0, 
0.08);

  /*  Text hierarchy  */
  --color-text:                   #ffb000;
  --color-text-secondary:         #cc8c00;
  --color-text-tertiary:          #7a5500;
  --color-text-disabled:          #3d2b00;
  --color-text-link:              #ffcc00;
  --color-text-dark:              #0a0a0a;           
/* text on accent bg */

  /*  Accent / interactive  */
  --color-primary:                #ffb000;
  --color-primary-dark-1:         #cc8c00;
  --color-primary-dark-2:         #996900;
  --color-primary-dark-3:         #664700;
  --color-primary-light-1:        #ffbe26;
  --color-primary-light-2:        #ffcc00;
  --color-primary-light-3:        #ffff00;
  --color-primary-alpha-20:       rgba(255, 176, 0, 
0.20);
  --color-primary-alpha-40:       rgba(255, 176, 0, 
0.40);
  --color-primary-alpha-60:       rgba(255, 176, 0, 
0.60);

  /*  Semantic states (collapse to amber variants)  
*/
  --color-green:                  #ffb000;
  --color-green-dark-1:           #cc8c00;
  --color-green-light-1:          #ffcc00;
  --color-green-light-2:          rgba(255, 176, 0, 
0.15);

  --color-red:                    #ffb000;
  --color-red-dark-1:             #996900;
  --color-red-light-1:            #ffcc00;
  --color-red-light-2:            rgba(255, 176, 0, 
0.12);

  --color-yellow:                 #ffcc00;
  --color-yellow-dark-1:          #cc8c00;
  --color-yellow-light-1:         #ffff00;
  --color-yellow-light-2:         rgba(255, 204, 0, 
0.15);

  --color-blue:                   #ffb000;
  --color-blue-dark-1:            #cc8c00;
  --color-blue-light-1:           #ffcc00;
  --color-blue-light-2:           rgba(255, 176, 0, 
0.15);

  --color-orange:                 #ffcc00;
  --color-orange-light-1:         #ffff00;
  --color-orange-light-2:         rgba(255, 204, 0, 
0.15);

  --color-teal:                   #ffb000;
  --color-teal-light-1:           #ffcc00;
  --color-teal-light-2:           rgba(255, 176, 0, 
0.15);

  --color-purple:                 #ffb000;
  --color-purple-light-1:         #ffcc00;
  --color-purple-light-2:         rgba(255, 176, 0, 
0.15);

  /*  Inputs & controls  */
  --color-input-background:       #0f0f00;
  --color-input-border:           #333300;
  --color-input-border-focus:     #ffb000;
  --color-input-placeholder:      #4d3800;

  /*  Labels / badges  */
  --color-label-bg:               #1a1a00;
  --color-label-color:            #ffb000;

  /*  Code blocks  */
  --color-code-bg:                #0f0f00;
  --color-code-border:            #333300;
  --color-code-sidebar-bg:        #0a0a0a;
  --color-code-linenumber:        #4d3800;
  --color-code-selection-bg:      rgba(255, 176, 0, 
0.20);

  /*  Diff  */
  --color-diff-added-word:        rgba(255, 204, 0, 
0.25);
  --color-diff-added:             rgba(255, 176, 0, 
0.10);
  --color-diff-removed-word:      rgba(153, 105, 0, 
0.40);
  --color-diff-removed:           rgba(51, 51, 0, 
0.40);
  --color-diff-moved:             rgba(255, 204, 0, 
0.08);

  /*  Timeline / activity  */
  --color-timeline:               #333300;

  /*  Scrollbars (Webkit)  */
  --color-scrollbar:              #333300;
  --color-scrollbar-hover:        #ffb000;

  /*  Misc Fomantic/Semantic UI overrides  */
  --color-menu-bg:                #0f0f00;
  --color-card-bg:                #0d0d00;
  --color-header-wrapper:         #0a0a0a;
  --color-nav-bg:                 #0a0a0a;
  --color-footer-bg:              #0a0a0a;

  /* Fomantic variables Gitea reads */
  --color-ui-font:                #ffb000;
  --color-ui-secondary:           #cc8c00;
  --color-ui-tertiary:            #7a5500;
}

/* 
   GLOBAL BASE
    */

body {
  background-color: #0a0a0a !important;
  color: #ffb000 !important;
  /* Amber phosphor glow on the font itself */
  text-shadow: 0 0 6px rgba(255, 176, 0, 0.18);
}

a {
  color: #ffcc00 !important;
}
a:hover {
  color: #ffff00 !important;
  text-shadow: 0 0 8px rgba(255, 255, 0, 0.35);
}

/* 
   HEADER / NAV
    */

#navbar,
.navbar,
.header-wrapper {
  background-color: #0a0a0a !important;
  border-bottom: 1px solid #333300 !important;
  box-shadow: 0 1px 0 rgba(255, 176, 0, 0.12) 
!important;
}

#navbar .item,
.navbar .item {
  color: #ffb000 !important;
}
#navbar .item:hover,
.navbar .item:hover {
  background-color: #0f0f00 !important;
  color: #ffcc00 !important;
}
#navbar .active.item {
  background-color: #1a1a00 !important;
  color: #ffff00 !important;
}

/* Gitea logo in the nav  tint to amber */
#navbar .logo {
  filter: sepia(1) saturate(4) hue-rotate(5deg) 
brightness(1.1);
}

/* 
   SIDEBAR & MENUS
    */

.ui.menu,
.ui.vertical.menu {
  background-color: #0d0d00 !important;
  border-color: #333300 !important;
}

.ui.menu .item,
.ui.vertical.menu .item {
  color: #cc8c00 !important;
}
.ui.menu .item:hover,
.ui.vertical.menu .item:hover {
  background-color: #1a1a00 !important;
  color: #ffb000 !important;
}
.ui.menu .active.item,
.ui.vertical.menu .active.item {
  background-color: #1a1a00 !important;
  color: #ffcc00 !important;
  border-left: 2px solid #ffb000 !important;
}

/* Dropdown */
.ui.dropdown .menu {
  background-color: #0f0f00 !important;
  border-color: #333300 !important;
}
.ui.dropdown .menu .item {
  color: #ffb000 !important;
  border-top-color: #1a1a00 !important;
}
.ui.dropdown .menu .item:hover {
  background-color: #1a1a00 !important;
  color: #ffcc00 !important;
}

/* 
   CARDS / SEGMENTS / PANELS
    */

.ui.segment,
.ui.card,
.repository,
.issue-card,
.milestone-card {
  background-color: #0d0d00 !important;
  border-color: #333300 !important;
  box-shadow: none !important;
  color: #ffb000 !important;
}

.ui.segment > .header,
.ui.card > .content > .header {
  color: #ffcc00 !important;
}

/* Dividers */
.ui.divider,
.divider {
  border-color: #333300 !important;
}

/* 
   BUTTONS
    */

.ui.button,
button,
input[type="submit"],
input[type="button"] {
  background-color: #1a1a00 !important;
  color: #ffb000 !important;
  border: 1px solid #333300 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transition: background-color 0.15s, color 0.15s, 
border-color 0.15s;
}
.ui.button:hover,
button:hover {
  background-color: #333300 !important;
  color: #ffcc00 !important;
  border-color: #ffb000 !important;
}
.ui.primary.button,
.ui.green.button {
  background-color: #ffb000 !important;
  color: #0a0a0a !important;
  border-color: #ffb000 !important;
  font-weight: 700;
  text-shadow: none !important;
}
.ui.primary.button:hover,
.ui.green.button:hover {
  background-color: #ffcc00 !important;
  border-color: #ffcc00 !important;
}
.ui.red.button {
  background-color: #333300 !important;
  color: #ffb000 !important;
  border-color: #664700 !important;
}
.ui.red.button:hover {
  background-color: #664700 !important;
  color: #ffcc00 !important;
}

/* 
   FORMS / INPUTS
    */

.ui.input input,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="number"],
textarea,
select {
  background-color: #0f0f00 !important;
  color: #ffb000 !important;
  border-color: #333300 !important;
  caret-color: #ffcc00;
}
.ui.input input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: #ffb000 !important;
  box-shadow: 0 0 0 2px rgba(255, 176, 0, 0.20) 
!important;
  outline: none;
}
input::placeholder,
textarea::placeholder {
  color: #4d3800 !important;
}

/* Checkbox / radio */
.ui.checkbox label,
.ui.radio.checkbox label {
  color: #ffb000 !important;
}
.ui.checkbox input:checked ~ label::before,
.ui.radio.checkbox input:checked ~ label::before {
  background-color: #ffb000 !important;
  border-color: #ffb000 !important;
}
.ui.checkbox label::before {
  background-color: #0f0f00 !important;
  border-color: #333300 !important;
}

/* 
   LABELS & BADGES
    */

.ui.label,
.label {
  background-color: #1a1a00 !important;
  color: #ffb000 !important;
  border: 1px solid #333300 !important;
}
.ui.label.basic {
  background-color: transparent !important;
  color: #ffb000 !important;
  border-color: #333300 !important;
}

/* Issue / PR state labels */
.ui.green.label, .ui.label.green { color: #0a0a0a 
!important; background-color: #ffb000 !important; 
border-color: #ffb000 !important; }
.ui.red.label,   .ui.label.red   { color: #0a0a0a 
!important; background-color: #cc8c00 !important; 
border-color: #cc8c00 !important; }
.ui.purple.label                  { color: #0a0a0a 
!important; background-color: #996900 !important; 
border-color: #996900 !important; }
.ui.grey.label,  .ui.label.grey  { background-color: 
#1a1a00 !important; color: #7a5500 !important; 
border-color: #333300 !important; }

/* 
   TABLES
    */

.ui.table {
  background-color: #0d0d00 !important;
  color: #ffb000 !important;
  border-color: #333300 !important;
}
.ui.table thead th {
  background-color: #0f0f00 !important;
  color: #ffcc00 !important;
  border-bottom-color: #333300 !important;
}
.ui.table tbody tr:hover td {
  background-color: #1a1a00 !important;
}
.ui.table td,
.ui.table th {
  border-color: #1a1a00 !important;
}
.ui.table.striped tbody tr:nth-child(2n) {
  background-color: #0f0f00 !important;
}

/* 
   CODE & DIFFS
    */

code,
pre,
.code-view,
.file-body.code-view {
  background-color: #0f0f00 !important;
  color: #ffcc00 !important;
  border-color: #333300 !important;
  font-family: "Berkeley Mono", "JetBrains Mono", 
"Fira Code", "Courier New", monospace;
}

pre code {
  background-color: transparent !important;
}

/* Line numbers */
.code-view td.lines-num,
.code-view .blob-num {
  background-color: #0a0a0a !important;
  color: #4d3800 !important;
  border-right: 1px solid #1a1a00 !important;
  user-select: none;
}
.code-view td.lines-num:hover,
.code-view .blob-num:hover {
  color: #ffb000 !important;
}

/* Diff added/removed */
.code-view .added {
  background-color: rgba(255, 176, 0, 0.10) 
!important;
}
.code-view .added .added-code {
  background-color: rgba(255, 204, 0, 0.22) 
!important;
}
.code-view .removed {
  background-color: rgba(51, 51, 0, 0.40) 
!important;
}
.code-view .removed .removed-code {
  background-color: rgba(153, 105, 0, 0.35) 
!important;
}

/* Syntax highlighting  amber monochrome palette */
.code-view .k,  .code-view .kd, .code-view .kn, 
.code-view .kr { color: #ffff00 !important; 
font-weight: bold; }  /* keywords */
.code-view .s,  .code-view .s1, .code-view .s2, 
.code-view .sb { color: #cc8c00 !important; }                     
/* strings */
.code-view .c,  .code-view .cm, .code-view .c1, 
.code-view .cs { color: #4d3800 !important; 
font-style: italic; }  /* comments */
.code-view .n,  .code-view .na, .code-view .nb                  
{ color: #ffcc00 !important; }                     
/* names */
.code-view .o                                                     
{ color: #ffff00 !important; }                     
/* operators */
.code-view .m,  .code-view .mi, .code-view .mf                  
{ color: #ffb000 !important; }                     
/* numbers */
.code-view .nf, .code-view .nc                                   
{ color: #ffcc00 !important; font-weight: bold; }  
/* functions, classes */
.code-view .err                                                   
{ color: #ffff00 !important; background: #664700 
!important; }

/* 
   REPO PAGE
    */

.repository.file.list .item {
  color: #ffb000 !important;
  border-bottom-color: #1a1a00 !important;
}
.repository.file.list .item:hover {
  background-color: #0f0f00 !important;
}
.repository.file.list .item .file-name {
  color: #ffcc00 !important;
}
.repository.file.list .item .file-commit-message {
  color: #7a5500 !important;
}
.repository.file.list .item .file-icon {
  color: #4d3800 !important;
}

/* Repo header stats bar */
.repository.header .ui.pointing.secondary.menu .item 
{
  color: #cc8c00 !important;
}
.repository.header .ui.pointing.secondary.menu 
.active.item {
  color: #ffff00 !important;
  border-bottom-color: #ffb000 !important;
}

/* 
   ISSUES & PRS
    */

.issue.list .item {
  border-bottom-color: #1a1a00 !important;
}
.issue.list .item:hover {
  background-color: #0f0f00 !important;
}
.issue.list .item .title {
  color: #ffcc00 !important;
}
.issue.list .item .desc {
  color: #7a5500 !important;
}

/* Open / closed / merged state icons */
.issue-state-label.open   { color: #ffb000 
!important; }
.issue-state-label.closed { color: #cc8c00 
!important; }
.issue-state-label.merged { color: #ffcc00 
!important; }

/* Comment boxes */
.comment .content {
  background-color: #0d0d00 !important;
  border-color: #333300 !important;
  color: #ffb000 !important;
}
.comment .content .header {
  background-color: #0f0f00 !important;
  border-bottom-color: #333300 !important;
  color: #cc8c00 !important;
}

/* 
   MARKDOWN RENDERED
    */

.markdown-body {
  color: #ffb000 !important;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: #ffcc00 !important;
  border-bottom-color: #333300 !important;
}
.markdown-body a {
  color: #ffff00 !important;
}
.markdown-body blockquote {
  color: #cc8c00 !important;
  border-left-color: #333300 !important;
}
.markdown-body code {
  background-color: #0f0f00 !important;
  color: #ffcc00 !important;
  border: 1px solid #1a1a00 !important;
}
.markdown-body pre {
  background-color: #0f0f00 !important;
  border: 1px solid #333300 !important;
}
.markdown-body table tr {
  background-color: #0a0a0a !important;
  border-top-color: #333300 !important;
}
.markdown-body table tr:nth-child(2n) {
  background-color: #0d0d00 !important;
}
.markdown-body table th,
.markdown-body table td {
  border-color: #333300 !important;
  color: #ffb000 !important;
}
.markdown-body hr {
  background-color: #333300 !important;
}
.markdown-body img {
  /* keep images readable against the dark 
background */
  background-color: transparent;
}
.markdown-body .task-list-item 
input[type="checkbox"] {
  accent-color: #ffb000;
}

/* 
   ACTIVITY / TIMELINE
    */

.timeline-item::before {
  background-color: #333300 !important;
}
.timeline-item .badge {
  background-color: #1a1a00 !important;
  border-color: #333300 !important;
  color: #ffb000 !important;
}

/* 
   EXPLORE / DASHBOARD
    */

.explore .header,
.dashboard .header {
  color: #ffcc00 !important;
}

.news .item .desc {
  color: #cc8c00 !important;
}
.news .item:hover {
  background-color: #0f0f00 !important;
}

/* Heatmap contribution squares */
.total-contributions {
  color: #cc8c00 !important;
}

/* 
   FOOTER
    */

#footer {
  background-color: #0a0a0a !important;
  border-top: 1px solid #1a1a00 !important;
  color: #4d3800 !important;
}
#footer a {
  color: #7a5500 !important;
}
#footer a:hover {
  color: #ffb000 !important;
}

/* 
   SCROLLBARS (Webkit)
    */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background-color: #0a0a0a;
}
::-webkit-scrollbar-track {
  background-color: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background-color: #333300;
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #ffb000;
}

/* 
   SELECTION
    */

::selection {
  background-color: rgba(255, 176, 0, 0.30);
  color: #ffff00;
}

/* 
   FOCUS RING (accessibility)
    */

*:focus-visible {
  outline: 2px solid #ffb000 !important;
  outline-offset: 2px !important;
}

/* 
   ALERTS / FLASH MESSAGES
    */

.ui.message {
  background-color: #0f0f00 !important;
  border-color: #333300 !important;
  color: #ffb000 !important;
  box-shadow: none !important;
}
.ui.positive.message,
.ui.success.message {
  background-color: #0f0f00 !important;
  border-color: #ffb000 !important;
  color: #ffcc00 !important;
}
.ui.negative.message,
.ui.error.message {
  background-color: #0f0f00 !important;
  border-color: #664700 !important;
  color: #cc8c00 !important;
}
.ui.warning.message {
  background-color: #0f0f00 !important;
  border-color: #996900 !important;
  color: #ffcc00 !important;
}

/* 
   MODALS
    */

.ui.modal {
  background-color: #0d0d00 !important;
  border: 1px solid #333300 !important;
  color: #ffb000 !important;
  box-shadow: 0 0 40px rgba(255, 176, 0, 0.12) 
!important;
}
.ui.modal > .header {
  background-color: #0f0f00 !important;
  border-bottom-color: #333300 !important;
  color: #ffcc00 !important;
}
.ui.modal > .actions {
  background-color: #0a0a0a !important;
  border-top-color: #333300 !important;
}
.ui.dimmer {
  background-color: rgba(0, 0, 0, 0.85) !important;
}

/* 
   PAGINATION
    */

.ui.pagination.menu .item {
  background-color: #0d0d00 !important;
  color: #ffb000 !important;
  border-color: #333300 !important;
}
.ui.pagination.menu .item:hover {
  background-color: #1a1a00 !important;
  color: #ffcc00 !important;
}
.ui.pagination.menu .active.item {
  background-color: #ffb000 !important;
  color: #0a0a0a !important;
  font-weight: 700;
}

/* 
   TABS (secondary pointing menu used throughout 
Gitea)
    */

.ui.secondary.pointing.menu {
  border-bottom-color: #333300 !important;
}
.ui.secondary.pointing.menu .item {
  color: #cc8c00 !important;
}
.ui.secondary.pointing.menu .item:hover {
  color: #ffb000 !important;
  border-bottom-color: #7a5500 !important;
}
.ui.secondary.pointing.menu .active.item {
  color: #ffff00 !important;
  border-bottom-color: #ffb000 !important;
  border-bottom-width: 2px !important;
}

/* 
   AVATAR FALLBACK
    */

.ui.avatar.image,
img.ui.avatar.image {
  border: 1px solid #333300;
}

/* 
   PHOSPHOR GLOW  signature element
   Applied sparingly: primary action buttons and 
active nav items only.
    */

.ui.primary.button,
#navbar .active.item,
.ui.pagination.menu .active.item {
  box-shadow: 0 0 10px rgba(255, 176, 0, 0.35) 
!important;
}
