/* 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; }
.blob-table { width: 100%; border-collapse: collapse; font-family: "Courier New", monospace; font-size: 12px; }
.blob-nums {
  width: 1%;
  min-width: 40px;
  padding: 0;
  background: #f0f0f0;
  border-right: 1px solid #ccc;
  text-align: right;
  vertical-align: top;
  user-select: none;
}
.blob-nums pre { margin: 0; padding: 4px 8px; line-height: 1.5; }
.blob-nums span { display: block; color: #888; }
.blob-nums span:target { color: var(--navy); background: #ffffcc; }
.blob-code { padding: 0; vertical-align: top; white-space: pre; }
.blob-code pre { margin: 0; padding: 4px 8px; line-height: 1.5; }
.blob-code span { display: block; }
.blob-code span:hover { background: #fffde0; }

/* 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; }
