/* Pull request page rules kept out of the theme files, which are at their size limit. */

/*
 * A merge scheduled for when checks succeed. Forgejo prints a blue notice above the merge button;
 * here it is one more section of the merge box, like the rows above it: a round status icon, the
 * sentence, and the bar with the merge button and "Cancel" below. Its measurements are the merge
 * box's own (--merge-section-*), set where the other rows are styled.
 */
.github-pull-review .pull-merge-actions > #pull-request-merge-form:has(.ui.info.message) {
  flex: 0 0 100%;
}

.github-pull-review .pull-merge-actions .ui.info.message {
  position: relative;
  display: block;
  min-height: var(--merge-section-height);
  margin: calc(-1 * var(--merge-section-padding)) calc(-1 * var(--merge-section-padding)) var(--merge-section-padding);
  padding: 20px var(--merge-section-padding) 20px calc(var(--merge-section-padding) + var(--merge-section-icon) + 8px);
  border: 0;
  border-bottom: 1px solid var(--merge-section-divider);
  border-radius: 0;
  background: var(--color-body);
  box-shadow: none;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

/* The status icon: a white clock on the accent colour. The notice itself carries no icon element. */
.github-pull-review .pull-merge-actions .ui.info.message::before {
  content: "";
  position: absolute;
  top: var(--merge-section-padding);
  left: var(--merge-section-padding);
  width: var(--merge-section-icon);
  height: var(--merge-section-icon);
  border-radius: 50%;
  background: var(--github-bgColor-accent-emphasis)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm7-3.25v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5a.75.75 0 0 1 1.5 0Z'/%3E%3C/svg%3E")
    center / 16px no-repeat;
}

.github-pull-review .pull-merge-actions .ui.info.message relative-time {
  color: var(--color-text-light-1);
  font-weight: 400;
}

/* The buttons under the notice sit 8px apart. */
.github-pull-review .pull-merge-actions .tw-flex {
  align-items: center;
  gap: 8px;
}

.github-pull-review .pull-merge-actions .tw-flex > form {
  margin: 0 !important;
}
