/* GitLab Admin Menu Icon
 *
 * Nothing to declare here any more. The glyph comes from the plugin's sprite
 * (assets/images/icons.svg, wired up by the :icon option in init.rb), and
 * Redmine 6 colours it from the theme: `a.icon .icon-svg { stroke: … }`, its
 * :hover counterpart, and `#sidebar a.selected svg.icon-svg { stroke: #fff }`.
 *
 * The previous rules forced a 20px indent and painted a fixed full-colour
 * GitLab logo as a background image. In Redmine 6 `.icon` is only a flex
 * container — it no longer reserves space for a background — so those rules
 * both double-indented the item and produced a multicolour glyph that clashed
 * with the flat monochrome default theme and could not follow any theme.
 *
 * A theme that wants to restyle it can target:
 *   #admin-menu a.icon-gitlab svg.icon-svg { stroke: …; stroke-width: …; }
 */

/* Tabs for webhook management */
#gitlab-webhooks-tabs {
  margin: 20px 0;
  border-bottom: 2px solid #628DB6;
}

#gitlab-webhooks-tabs ul.tabs {
  margin: 0;
  padding: 0;
  list-style: none;
}

#gitlab-webhooks-tabs ul.tabs li {
  display: inline-block;
  margin: 0;
  padding: 0;
}

#gitlab-webhooks-tabs ul.tabs li a {
  display: block;
  padding: 8px 15px;
  margin-right: 2px;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-bottom: none;
  color: #555;
  text-decoration: none;
  border-radius: 3px 3px 0 0;
}

#gitlab-webhooks-tabs ul.tabs li a:hover {
  background-color: #e5e5e5;
}

#gitlab-webhooks-tabs ul.tabs li a.selected {
  background-color: #fff;
  color: #628DB6;
  font-weight: bold;
  border-color: #628DB6;
  border-bottom: 2px solid #fff;
  margin-bottom: -2px;
  padding-bottom: 9px;
}

.stats-summary {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.stat-box {
  flex: 1;
  min-width: 150px;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  background: #f5f5f5;
  border: 2px solid #ddd;
}

.stat-box.stat-total {
  border-color: #628DB6;
  background: #E3F2FD;
}

.stat-box.stat-active {
  border-color: #4CAF50;
  background: #E8F5E9;
}

.stat-box.stat-not-configured {
  border-color: #FF9800;
  background: #FFF3E0;
}

.stat-box.stat-error {
  border-color: #F44336;
  background: #FFEBEE;
}

.stat-number {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: #666;
}

.bulk-actions-form-header {
  background: #f5f5f5;
  padding: 10px;
  margin: 20px 0 10px 0;
  border: 1px solid #ddd;
  border-radius: 3px;
}

.bulk-actions-buttons {
  margin-left: 20px;
}

.selection-info {
  margin-left: 20px;
  font-weight: bold;
  color: #628DB6;
}

.repositories-table {
  margin-top: 10px;
}

.repositories-table td.checkbox {
  text-align: center;
  width: 30px;
}

.repositories-table td.status, .webhook-status-box p.status span {
  font-weight: bold;
}

.repositories-table td.status.status-active, .webhook-status-box p.status.status-active span {
  color: #4CAF50;
}

.repositories-table td.status.status-error, .webhook-status-box p.status.status-error span {
  color: #F44336;
}

.repositories-table td.status.status-not-configured, .webhook-status-box p.status.status-not-configured span {
  color: #FF9800;
}

.repositories-table td.status .info, .webhook-status-box p.status span .info {
  font-weight: normal;
  font-size: 11px;
  color: #666;
}

.repositories-table td.buttons a {
  margin: 0 2px;
}


#gitlab-admin-tabs {
  margin: 20px 0;
  border-bottom: 2px solid #628DB6;
}

#gitlab-admin-tabs ul.tabs {
  margin: 0;
  padding: 0;
  list-style: none;
}

#gitlab-admin-tabs ul.tabs li {
  display: inline-block;
  margin: 0;
  padding: 0;
}

#gitlab-admin-tabs ul.tabs li a {
  display: block;
  padding: 8px 15px;
  margin-right: 2px;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-bottom: none;
  color: #555;
  text-decoration: none;
  border-radius: 3px 3px 0 0;
}

#gitlab-admin-tabs ul.tabs li a:hover {
  background-color: #e5e5e5;
}

#gitlab-admin-tabs ul.tabs li a.selected {
  background-color: #fff;
  color: #628DB6;
  font-weight: bold;
  border-color: #628DB6;
  border-bottom: 2px solid #fff;
  margin-bottom: -2px;
  padding-bottom: 9px;
}

.webhook-actions a {
  margin-right: 10px;
}

.webhook-status-box p {
  margin: 5px 0;
}

.webhook-status-box pre {
  margin: 5px 0;
}
/* "Revisions are being imported" notice, rendered by GitlabViewHooks into the
 * repository views. Reuses Redmine's own .flash.warning colours; the padding is
 * needed because div.flash svg.icon-svg carries margin-left:-26px, which expects
 * the container to leave room for the icon. */
.gitlab-import-notice {
  padding: 8px 8px 8px 30px;
  border: 1px solid;
  border-radius: 3px;
}

.gitlab-import-notice .icon-svg {
  vertical-align: text-bottom;
}
