/**********************************************************/
/* SCM / REPOSITORY STYLING FOR VS CODE DARK THEME */
/**********************************************************/

/* Main background and text colors - VS Code dark theme inspired */
table.entries a {
  padding-top: 2px;
  padding-bottom: 2px;
  color: #569cd6; /* VS Code link blue instead of amber */
}

table.revision-info td {
  margin: 0px;
  padding: 0px;
}

div.revision-graph { 
  position: absolute; 
  min-width: 1px; 
}

div.changeset-changes ul { 
  margin: 0; 
  padding: 0; 
}

div.changeset-changes ul > ul { 
  margin-left: 18px; 
  padding: 0; 
}

div.changeset-changes ul:first-child > li {
  padding-left: 0;
}

li.change {
  list-style-type: none;
  padding-top: 1px;
  padding-bottom: 1px;
  padding-left: 20px;
  margin: 0;
  color: #d4d4d4; /* VS Code text color */
}

/* Fix bullet icon paths */
li.change:not(:has(svg)) {
  background-image: url("/assets/bullet_black-3bd1cbaf.png");
  background-position: 1px 2px;
  background-repeat: no-repeat;
}

li.change.folder:not(:has(svg)) { 
  background-image: url("/assets/folder_open-c27aa0d7.png"); 
}

li.change.folder.change-A { 
  background-image: url("/assets/folder_open_add-846edd93.png"); 
}

li.change.folder.change-M { 
  background-image: url("/assets/folder_open_orange-cd710bd2.png"); 
}

li.change.change-A:not(:has(svg)) { 
  background-image: url("/assets/bullet_add-46863f87.png"); 
}

li.change.change-M:not(:has(svg)) { 
  background-image: url("/assets/bullet_orange-024b94aa.png"); 
}

li.change.change-C:not(:has(svg)) { 
  background-image: url("/assets/bullet_blue-ce1c60f1.png"); 
}

li.change.change-R:not(:has(svg)) { 
  background-image: url("/assets/bullet_purple-d88d4267.png"); 
}

li.change.change-D:not(:has(svg)) { 
  background-image: url("/assets/bullet_delete-8dabd130.png"); 
}

/* SCM specific icon colors - more vibrant VS Code-like colors */
li.change.change-A svg.icon-svg {
  fill: #6A9955; /* green */
  stroke: #1e1e1e;
}

li.change.change-M svg.icon-svg {
  fill: #DCDCAA; /* yellow/gold */
  stroke: #1e1e1e;
}

li.change.change-C svg.icon-svg {
  fill: #569cd6; /* blue */
  stroke: #1e1e1e;
}

li.change.change-R svg.icon-svg {
  fill: #C586C0; /* purple */
  stroke: #1e1e1e;
}

li.change.change-D svg.icon-svg {
  fill: #F44747; /* red */
  stroke: #1e1e1e;
}

li.change .copied-from { 
  font-style: italic; 
  color: #808080; /* darker gray for less important text */
  font-size: 0.9em; 
}

li.change .copied-from:before { 
  content: " - ";
}

#changes-legend { 
  float: right; 
  font-size: 0.75rem; 
  margin: 0; 
}

#changes-legend li { 
  float: left; 
  background-position: 5px 1px; 
}

/* File content styling - VS Code colors */
table.filecontent { 
  border: 1px solid #3c3c3c !important; 
  border-collapse: collapse; 
  width: 98%; 
  background-color: #1e1e1e !important; /* VS Code main background */
}

table.filecontent tbody {
  font-family: "Consolas", "Monaco", "Courier New", monospace; /* VS Code-like font stack */
  font-size: 0.9rem; /* Slightly larger for better readability */
  color: #d4d4d4 !important; /* VS Code text color */
  line-height: 1.5; /* Improved line spacing like VS Code */
}

table.filecontent th { 
  border: 1px solid #3c3c3c !important; 
  background-color: #252526 !important; /* VS Code secondary background */
  color: #d4d4d4 !important;
}

table.filecontent th.filename { 
  background-color: #252526 !important; /* VS Code title bar color */
  text-align: left; 
  padding: 8px; /* More padding */
  color: #d4d4d4 !important;
  font-size: 0.9rem;
}

table.filecontent tr.spacing th { 
  text-align: center; 
}

table.filecontent tr.spacing td { 
  height: 0.4em; 
  background: #2d2d2d !important; /* VS Code-like separator */
}

table.filecontent th.line-num {
  border: 1px solid #3c3c3c !important;
  text-align: right;
  width: 2%;
  padding: 0 8px 0 0; /* More right padding */
  color: #858585 !important; /* VS Code line number color */
  user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  -ms-user-select: none;
  -webkit-user-select: none;
  font-weight: normal;
  background-color: #1e1e1e !important; /* Same as code bg */
}

table.filecontent th.line-num a {
  text-decoration: none;
  color: inherit;
}

table.filecontent th.line-num a:after {
  content: attr(data-txt);
}

table.diffcontent th.line-num:after {
  content: attr(data-txt);
}

table.filecontent td.line-code {
  padding: 0 0 0 10px; /* More left padding */
  background-color: #1e1e1e !important; /* VS Code background */
  color: #d4d4d4 !important; /* VS Code text color */
}

table.filecontent td.line-code pre, 
table.filecontent td.line-code div {
  margin: 0px;
  white-space: pre-wrap;
  font-family: "Consolas", "Monaco", "Courier New", monospace; /* VS Code-like font stack */
  font-size: 0.9rem;
  color: #d4d4d4 !important;
  line-height: 1.5; /* Better line height like VS Code */
}

table.filecontent tr:target th.line-num { 
  background-color: #264f78 !important; /* VS Code selection color */
  color: #d4d4d4 !important; 
}

table.filecontent tr:target td.line-code { 
  background-color: #264f78 !important; /* VS Code selection color */
}

/* Hover effect for lines - like VS Code */
table.filecontent tr:hover td.line-code { 
  background-color: #2a2d2e !important;
}

table.filecontent tr:hover th.line-num {
  background-color: #2a2d2e !important;
}

/* Fix code highlighting colors - VS Code inspired */
.syntaxhl .c { color: #6A9955 !important; font-style: italic !important; background-color: transparent !important; } /* Comment - green */
.syntaxhl .err { color: #F44747 !important; background-color: transparent !important; } /* Error - red */
.syntaxhl .k { color: #569cd6 !important; font-weight: bold !important; background-color: transparent !important; } /* Keyword - blue */
.syntaxhl .o { font-weight: bold !important; color: #d4d4d4 !important; background-color: transparent !important; } /* Operator */
.syntaxhl .cm { color: #6A9955 !important; font-style: italic !important; background-color: transparent !important; } /* Comment.Multiline */
.syntaxhl .cp { color: #6A9955 !important; font-weight: bold !important; background-color: transparent !important; } /* Comment.Preproc */
.syntaxhl .c1 { color: #6A9955 !important; font-style: italic !important; background-color: transparent !important; } /* Comment.Single */
.syntaxhl .cs { color: #6A9955 !important; font-weight: bold !important; font-style: italic !important; background-color: transparent !important; } /* Comment.Special */
.syntaxhl .gd { color: #F44747 !important; background-color: #1e1e1e !important; } /* Generic.Deleted */
.syntaxhl .gd .x { color: #F44747 !important; background-color: #1e1e1e !important; } /* Generic.Deleted.Specific */
.syntaxhl .ge { font-style: italic !important; color: #d4d4d4 !important; background-color: transparent !important; } /* Generic.Emph */
.syntaxhl .gr { color: #F44747 !important; background-color: transparent !important; } /* Generic.Error */
.syntaxhl .gh { color: #569cd6 !important; background-color: transparent !important; } /* Generic.Heading */
.syntaxhl .gi { color: #6A9955 !important; background-color: #1e1e1e !important; } /* Generic.Inserted */
.syntaxhl .gi .x { color: #6A9955 !important; background-color: #1e1e1e !important; } /* Generic.Inserted.Specific */
.syntaxhl .go { color: #808080 !important; background-color: transparent !important; } /* Generic.Output */
.syntaxhl .gp { color: #d4d4d4 !important; background-color: transparent !important; } /* Generic.Prompt */
.syntaxhl .gs { font-weight: bold !important; color: #d4d4d4 !important; background-color: transparent !important; } /* Generic.Strong */
.syntaxhl .gu { color: #808080 !important; background-color: transparent !important; } /* Generic.Subheading */
.syntaxhl .gt { color: #F44747 !important; background-color: transparent !important; } /* Generic.Traceback */
.syntaxhl .kc { font-weight: bold !important; color: #569cd6 !important; background-color: transparent !important; } /* Keyword.Constant */
.syntaxhl .kd { font-weight: bold !important; color: #569cd6 !important; background-color: transparent !important; } /* Keyword.Declaration */
.syntaxhl .kp { font-weight: bold !important; color: #569cd6 !important; background-color: transparent !important; } /* Keyword.Pseudo */
.syntaxhl .kr { font-weight: bold !important; color: #569cd6 !important; background-color: transparent !important; } /* Keyword.Reserved */
.syntaxhl .kt { color: #569cd6 !important; font-weight: bold !important; background-color: transparent !important; } /* Keyword.Type */
.syntaxhl .m { color: #b5cea8 !important; background-color: transparent !important; } /* Literal.Number - light green */

/* String literals - VS Code's orange-red color */
.syntaxhl .s { color: #ce9178 !important; background-color: transparent !important; } /* Literal.String */
.syntaxhl .na { color: #9cdcfe !important; background-color: transparent !important; } /* Name.Attribute - light blue */
.syntaxhl .nb { color: #dcdcaa !important; background-color: transparent !important; } /* Name.Builtin - yellow */
.syntaxhl .nc { color: #4ec9b0 !important; font-weight: bold !important; background-color: transparent !important; } /* Name.Class - teal */
.syntaxhl .no { color: #4fc1ff !important; background-color: transparent !important; } /* Name.Constant - bright blue */
.syntaxhl .ni { color: #c586c0 !important; background-color: transparent !important; } /* Name.Entity - purple */
.syntaxhl .ne { color: #569cd6 !important; font-weight: bold !important; background-color: transparent !important; } /* Name.Exception */
.syntaxhl .nf { color: #dcdcaa !important; font-weight: normal !important; background-color: transparent !important; } /* Name.Function - yellow */
.syntaxhl .nn { color: #4ec9b0 !important; background-color: transparent !important; } /* Name.Namespace - teal */
.syntaxhl .nt { color: #569cd6 !important; background-color: transparent !important; } /* Name.Tag - blue */
.syntaxhl .nv { color: #9cdcfe !important; background-color: transparent !important; } /* Name.Variable - light blue */
.syntaxhl .ow { font-weight: bold !important; color: #569cd6 !important; background-color: transparent !important; } /* Operator.Word */
.syntaxhl .w { color: #d4d4d4 !important; background-color: transparent !important; } /* Text.Whitespace */
.syntaxhl .mf { color: #b5cea8 !important; background-color: transparent !important; } /* Literal.Number.Float */
.syntaxhl .mh { color: #b5cea8 !important; background-color: transparent !important; } /* Literal.Number.Hex */
.syntaxhl .mi { color: #b5cea8 !important; background-color: transparent !important; } /* Literal.Number.Integer */
.syntaxhl .mo { color: #b5cea8 !important; background-color: transparent !important; } /* Literal.Number.Oct */
.syntaxhl .sb { color: #ce9178 !important; background-color: transparent !important; } /* Literal.String.Backtick */
.syntaxhl .sc { color: #ce9178 !important; background-color: transparent !important; } /* Literal.String.Char */
.syntaxhl .sd { color: #ce9178 !important; background-color: transparent !important; } /* Literal.String.Doc */
.syntaxhl .s2 { color: #ce9178 !important; background-color: transparent !important; } /* Literal.String.Double */
.syntaxhl .se { color: #ce9178 !important; background-color: transparent !important; } /* Literal.String.Escape */
.syntaxhl .sh { color: #ce9178 !important; background-color: transparent !important; } /* Literal.String.Heredoc */
.syntaxhl .si { color: #ce9178 !important; background-color: transparent !important; } /* Literal.String.Interpol */
.syntaxhl .sx { color: #ce9178 !important; background-color: transparent !important; } /* Literal.String.Other */
.syntaxhl .sr { color: #d16969 !important; background-color: transparent !important; } /* Literal.String.Regex - darker red */
.syntaxhl .s1 { color: #ce9178 !important; background-color: transparent !important; } /* Literal.String.Single */
.syntaxhl .ss { color: #ce9178 !important; background-color: transparent !important; } /* Literal.String.Symbol */
.syntaxhl .bp { color: #569cd6 !important; background-color: transparent !important; } /* Name.Builtin.Pseudo */
.syntaxhl .vc { color: #9cdcfe !important; background-color: transparent !important; } /* Name.Variable.Class */
.syntaxhl .vg { color: #9cdcfe !important; background-color: transparent !important; } /* Name.Variable.Global */
.syntaxhl .vi { color: #9cdcfe !important; background-color: transparent !important; } /* Name.Variable.Instance */
.syntaxhl .il { color: #b5cea8 !important; background-color: transparent !important; } /* Literal.Number.Integer.Long */

/* Ensure all string spans have no background */
span.string, pre .string, code .string {
  background-color: transparent !important;
  color: #ce9178 !important; /* VS Code string color */
}

/* Fix the Category labels in your C++ code */
span.string.value {
  background-color: rgba(86, 156, 214, 0.2) !important; /* VS Code blue with transparency */
  color: #d4d4d4 !important;
  border: 1px solid #569cd6 !important;
  border-radius: 3px;
  padding: 0 3px;
}

img.filecontent, video.filecontent { 
  max-width: 100%; 
}

.previous-filename {
  font-weight: normal;
  color: #d4d4d4;
}

/* Repository view tabs */
.controller-repositories .tabs ul li a {
  background-color: #252526; /* VS Code unfocused tab */
  border-color: #3c3c3c;
  color: #d4d4d4;
}

.controller-repositories .tabs ul li a.selected {
  background-color: #1e1e1e; /* VS Code selected tab */
  border-color: #3c3c3c;
  border-bottom-color: #1e1e1e;
  color: #569cd6; /* VS Code accent color */
}

/* 12 different colors for the annotate view - adjusted for VS Code color scheme */
table.annotate tr.bloc-0 td.line-code {border-left-color: #569cd6 !important;} /* Blue */
table.annotate tr.bloc-1 td.line-code {border-left-color: #ce9178 !important;} /* Orange */
table.annotate tr.bloc-2 td.line-code {border-left-color: #6A9955 !important;} /* Green */
table.annotate tr.bloc-3 td.line-code {border-left-color: #c586c0 !important;} /* Purple */
table.annotate tr.bloc-4 td.line-code {border-left-color: #4ec9b0 !important;} /* Teal */
table.annotate tr.bloc-5 td.line-code {border-left-color: #dcdcaa !important;} /* Yellow */
table.annotate tr.bloc-6 td.line-code {border-left-color: #f44747 !important;} /* Red */
table.annotate tr.bloc-7 td.line-code {border-left-color: #9cdcfe !important;} /* Light Blue */
table.annotate tr.bloc-8 td.line-code {border-left-color: #b5cea8 !important;} /* Light Green */
table.annotate tr.bloc-9 td.line-code {border-left-color: #d7ba7d !important;} /* Gold */
table.annotate tr.bloc-10 td.line-code {border-left-color: #d16969 !important;} /* Dark Red */
table.annotate tr.bloc-11 td.line-code {border-left-color: #4fc1ff !important;} /* Bright Blue */
table.annotate tr.bloc-change {border-top: 1px solid #3c3c3c !important;}

table.annotate td.revision {
  padding: 0;
  text-align: center;
  width: 2%;
  padding-left: 1em;
  background: inherit;
  color: #d4d4d4;
}

table.annotate td.author {
  padding: 0;
  text-align: center;
  white-space: nowrap;
  padding-left: 1em;
  padding-right: 1em;
  width: 3%;
  background: inherit;
  color: #d4d4d4;
}

table.annotate td.previous {
  padding: 0;
  text-align: center;
  width: 1%;
  background: inherit;
  color: #d4d4d4;
}

table.annotate td.line-code {
  background-color: #1e1e1e !important; /* VS Code bg */
  border-left: 6px solid #3c3c3c !important;
}

/* Repository browser */
.controller-repositories table.list td {
  background-color: #1e1e1e !important;
  color: #d4d4d4 !important;
  border-color: #3c3c3c !important;
}

.controller-repositories table.list th {
  background-color: #252526 !important;
  color: #d4d4d4 !important;
  border-color: #3c3c3c !important;
}

/* Repository browser folders and files */
.controller-repositories table.list td.filename a.icon-folder {
  color: #dcdcaa !important; /* Yellow/gold folder */
}

.controller-repositories table.list td.filename a.icon-file {
  color: #d4d4d4 !important;
}

/* Repository revision numbers */
.controller-repositories table.list td.revision a {
  color: #569cd6 !important; /* VS Code blue */
}

/* Fix the pagination links */
.pagination ul.pages li a {
  background-color: #252526;
  border-color: #3c3c3c;
  color: #d4d4d4;
}

.pagination ul.pages li.current {
  background-color: #264f78; /* VS Code selection blue */
  border-color: #264f78;
  color: #d4d4d4;
}

.pagination ul.pages li.page:hover a {
  background-color: #2d2d2d;
  border-color: #569cd6;
  color: #d4d4d4;
}

/* Change action highlighting - VS Code colors */
div.action_M { background: #264f78 !important; } /* Blue for modified */
div.action_D { background: #4b1818 !important; } /* Red bg for deleted */
div.action_A { background: #373d29 !important; } /* Green bg for added */

.breadcrumbs>.separator::before, 
.breadcrumbs>.separator::after {
  content: " ";
}

/* Navigation breadcrumbs */
.controller-repositories .breadcrumbs {
  color: #d4d4d4;
}

.controller-repositories .breadcrumbs a {
  color: #569cd6; /* VS Code blue */
}

/* Path info */
.controller-repositories p.path {
  color: #d4d4d4;
}

.controller-repositories p.path a {
  color: #569cd6; /* VS Code blue */
}
