/*
 * Source lives at https://gitlab.adapptivlabs.ch/adapptiv/support/-/tree/master/templates/Gitlab?ref_type=heads
 *
 * PLEASE UPDATE THE SOURCE AFTER EACH CHANGE!
 */

/* fixes the preview width of images in gitlab */
div.timeline-discussion-body div.note-text.md a > img,
div.work-item-overview div.description a > img {
  max-width: 300px !important;
  max-height: 200px !important;
}

/* fixes the font size for the fullscreen editor in gitlab */
.zen-backdrop.fullscreen textarea {
  font-size: 13px !important;
  line-height: 18px !important;
}

/* Comments with at least response but still unresolved */
.main-notes-list > .timeline-entry.note-discussion ul.notes li:first-of-type .timeline-content {
  background-color: rgba(240, 170, 0, 0.2) !important;
}

/* Comments without any response */
.main-notes-list > .timeline-entry:not(.note-discussion) .timeline-content:not(:has([data-emoji-name="ok"])) {
  background-color: rgba(240, 0, 0, 0.2) !important;
}

/* Threads which are resolved */
.main-notes-list > .timeline-entry:has(svg[data-testid="check-circle-filled-icon"]) ul.notes li:first-of-type .timeline-content  {
  background-color: rgba(0, 158, 44, 0.2) !important;
}

/* Mark the current date in the datepicker visible */
.pika-lendar .pika-row .is-today {
  background-color: rgba(75, 75, 75, 0.75);
  color: white;
  border-color: white;
  border-radius: 5px;
}

/* Mark the "target" entry (when directly linked to a comment) blue */
.main-notes-list > .timeline-entry.note-discussion ul.notes li.target .timeline-content,
.timeline-entry.target ul.notes li.note:first-of-type .timeline-content {
  background-color: rgb(101 163 209 / 0.4) !important;
}

/* Make the text editor larger */
form textarea#issue-description {
  height: 1000px !important;
  max-height: 80vh !important;
}
form textarea#merge_request_description {
  height: 1000px !important;
  max-height: 60vh;
}
form .is-focused textarea#note-body {
  height: 500px !important;
  max-height: 30vh;
}

/* Increase the height of the label dropdown */
.labels .dropdown.b-dropdown ul.dropdown-menu div.gl-dropdown-inner,
.gl-new-dropdown .gl-new-dropdown-inner {
  max-height: 700px !important;
}

/* Hide the annoying "Gitlab Duo is on" banner */
#duo-agent-platform-sidebar-widget {
  display: none;
}

/* Make sure the .target (deep link to comment) is always shown */
.timeline-entry.target .timeline-content {
    border-left: 5px solid red !important;
    background-color: rgb(101 163 209 / 0.4) !important;
}
