/* otgit page-specific styles: file tree, blob viewer, diff viewer */

/* File tree */
.file-tree td.tree-icon { width: 24px; text-align: center; }
.file-tree td.tree-name a { text-decoration: none; font-family: "Courier New", monospace; }
.file-tree td.tree-name a:hover { text-decoration: underline; }

/* Blob viewer */
.blob-meta { font-size: 11px; color: #555; padding: 4px 8px; border-bottom: 1px solid var(--silver); }
.blob-view {
  overflow-x: auto;
  background: #fff;
  max-width: 100%;
}
.blob-table {
  border-collapse: collapse;
  font-family: "Courier New", Consolas, monospace;
  font-size: 12px;
  min-width: 100%;
}
.blob-table tr { line-height: 1.5; }
.blob-num {
  background: #f0f0f0;
  border-right: 1px solid #ccc;
  padding: 0 10px;
  text-align: right;
  user-select: none;
  white-space: nowrap;
  min-width: 44px;
  vertical-align: top;
}
.blob-num a { color: #888; text-decoration: none; }
.blob-num:target { background: #ffffcc; }
.blob-num:target a { color: var(--navy); }
.blob-line {
  padding: 0 10px;
  white-space: pre;
  vertical-align: top;
  width: 100%;
}
.blob-table tr:hover .blob-line { background: #fffde0; }

/* File tree sidebar (blob view) */
.tree-sidebar-body { padding: 6px 8px; }
.tree-sidebar-root { padding: 2px 0 6px; border-bottom: 1px dashed #ccc; margin-bottom: 4px; font-family: Tahoma, sans-serif; }
.tree-sidebar-root a { text-decoration: none; font-weight: bold; }
.tree-sidebar { list-style: none; padding: 0; margin: 0; }
.tree-sidebar li { padding: 2px 0; font-family: "Courier New", monospace; font-size: 11px; word-break: break-all; }
.tree-sidebar li a { text-decoration: none; }
.tree-sidebar li a:hover { text-decoration: underline; }
.tree-sidebar li.active { background: #ffffcc; padding: 2px 4px; }
.tree-sidebar li.active a { color: var(--navy); font-weight: bold; }

/* Language bar */
.lang-section {
  background: #fff;
  border: 1px solid #808080;
  margin-bottom: 10px;
  padding: 8px 10px;
}
.lang-bar {
  display: flex;
  height: 10px;
  border: 1px solid #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #eee;
  margin-bottom: 6px;
  overflow: hidden;
}
.lang-segment { display: block; height: 100%; }
.lang-labels { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; font-family: Tahoma, sans-serif; }
.lang-label { display: inline-flex; align-items: center; gap: 4px; }
.lang-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
.lang-pct { color: #666; }

/* Repo nav strip */
.repo-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.repo-nav .btn { padding: 4px 10px; font-size: 11px; }

/* Visibility badges */
.vis-badge.public { border-color: #060; background: #e8ffe8; color: #060; }


/* Commit list */
.commit-table td.commit-sha { width: 70px; font-family: "Courier New", monospace; font-size: 11px; }
.commit-table td.commit-msg { max-width: 400px; }
.commit-table td.commit-author { width: 150px; font-size: 11px; color: #555; }
.commit-table td.commit-date { width: 90px; font-size: 11px; color: #555; white-space: nowrap; }

/* Single commit */
.commit-header { border-bottom: 1px solid var(--silver); }
.commit-msg-full { font-size: 14px; font-weight: bold; margin: 0 0 6px; }
.commit-meta { font-size: 11px; color: #555; margin: 0 0 4px; }
.commit-sha-full { font-size: 11px; color: #555; font-family: "Courier New", monospace; display: block; }

/* Diff viewer */
.diff-view { overflow-x: auto; }
.diff-file { margin-bottom: 12px; border: 1px solid #808080; }
.diff-filename {
  background: var(--silver);
  border-bottom: 1px solid #808080;
  padding: 4px 8px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: bold;
  color: var(--navy);
}
.diff-table { width: 100%; border-collapse: collapse; font-family: "Courier New", monospace; font-size: 12px; }
.diff-table td { padding: 1px 6px; white-space: pre; }
td.diff-sign { width: 14px; text-align: center; user-select: none; font-weight: bold; }
td.diff-code { width: 100%; }
td.diff-code code { font-family: inherit; font-size: inherit; }

tr.diff-add { background: #e8ffe8; }
tr.diff-add td.diff-sign { color: #060; }
tr.diff-del { background: #ffe8e8; }
tr.diff-del td.diff-sign { color: #c00; }
tr.diff-ctx { background: #fff; }

td.diff-hunk {
  background: #e8f0ff;
  color: #46c;
  padding: 2px 6px;
  font-size: 11px;
}
td.diff-binary { background: #fffbe6; color: #555; padding: 4px 8px; }
.diff-truncated { color: #c00; padding: 8px; }

/* Admin settings */
.admin-section { display: flex; flex-direction: column; gap: 8px; padding-bottom: 4px; }
.setting-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; }
.setting-row label { min-width: 220px; font-family: "Courier New", monospace; font-size: 11px; font-weight: bold; color: #000; }
.setting-row input[type="text"],
.setting-row input[type="number"],
.setting-row select { flex: 1; min-width: 140px; max-width: 400px; }
.restart-note { font-style: italic; color: #c00; font-weight: normal; font-size: 10px; font-family: Tahoma, sans-serif; }
