/* Redmine Github Connector Stylesheet */

.github-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 12px;
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
}

.github-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.github-toolbar-right {
  display: flex;
  align-items: center;
}

.github-branch-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.github-branch-form select,
.github-branch-form input[type="text"] {
  font-family: inherit;
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.github-breadcrumbs-bar {
  padding: 8px 12px;
  margin-bottom: 12px;
  background-color: #fbfbfb;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 13px;
}

.github-breadcrumbs-bar a {
  font-weight: 500;
}

.github-file-meta {
  padding: 6px 12px;
  margin-bottom: 8px;
  background-color: #f7f7f7;
  border: 1px solid #e1e1e1;
  border-radius: 3px;
  font-size: 12px;
  color: #555;
}

.github-meta-separator {
  margin: 0 8px;
  color: #ccc;
}

.github-code-viewer {
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  background-color: #fff;
  margin-bottom: 16px;
}

.github-code-viewer table.filecontent {
  width: 100%;
  border-collapse: collapse;
}

.github-code-viewer table.filecontent th.line-num {
  width: 45px;
  min-width: 45px;
  padding: 2px 8px;
  text-align: right;
  color: #888;
  background-color: #fafafa;
  border-right: 1px solid #eaeaea;
  font-size: 11px;
  user-select: none;
}

.github-code-viewer table.filecontent td.line-code {
  padding: 2px 10px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre;
}

.github-code-viewer table.filecontent td.line-code pre {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: pre;
}

/* Badges */
.github-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  border-radius: 12px;
  text-align: center;
  color: #fff;
}

.badge-open {
  background-color: #28a745;
}

.badge-closed {
  background-color: #d73a49;
}

.badge-merged {
  background-color: #6f42c1;
}

/* Filter buttons */
.github-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.github-filter-btn {
  display: inline-block;
  padding: 3px 9px;
  font-size: 12px;
  color: #444;
  background-color: #fff;
  border: 1px solid #d1d5da;
  border-radius: 3px;
  text-decoration: none;
}

.github-filter-btn:hover {
  background-color: #f3f4f6;
  text-decoration: none;
}

.github-filter-btn.active {
  background-color: #0366d6;
  color: #fff;
  border-color: #0366d6;
}

/* Diff counters */
.diff-add {
  color: #22863a;
  font-weight: 600;
  margin-right: 4px;
}

.diff-del {
  color: #cb2431;
  font-weight: 600;
  margin-right: 4px;
}

/* Pagination */
.github-pagination {
  margin: 16px 0;
  text-align: center;
}

.github-pagination .current-page {
  margin: 0 10px;
  font-weight: bold;
}

/* PR Details Header */
.github-pr-header {
  margin-bottom: 14px;
}

.github-pr-header h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.github-pr-number {
  color: #6a737d;
  font-weight: normal;
}

.github-pr-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #586069;
}

/* Details box wiki content */
.github-details-box .wiki pre {
  background-color: #f6f8fa;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid #e1e4e8;
  font-family: inherit;
  white-space: pre-wrap;
  word-wrap: break-word;
}


.github-repository-entry { margin: 12px 0; }
.github-repository-chip { border: 1px solid #ccc; border-radius: 12px; padding: 3px 10px; background: #eee; overflow-wrap: anywhere; }
.github-repository-remove { margin-left: 8px; }
#github-repository-error[hidden] { display: none; }
.github-project-webhook-settings[hidden] { display: none; }
