.wrapper {
  cursor: pointer;

  .widget {
    display: flex;
    gap: 5px;
    align-items: center;

    p {
      margin: 0;

      &.count {
        margin: 0 5px 0 0;

        &:hover {
          text-decoration: underline;
        }
      }
    }
  }

  &:hover {
    .action,
    app-cmf-icon {
      opacity: 1;
    }
  }

  .action_force-visible {
    opacity: 1;
  }
}

.merge-status {
  padding: 0 5px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 4px;

  &_open {
    color: #056f0b;
    background-color: #d5ffd9;
  }

  &_merged {
    color: #0c37c5;
    background-color: #e1e9ff;

    &.merge-status_github {
      color: #843fa1;
      background-color: #eccafa;
    }
  }

  &_closed {
    color: #ae1800;
    background-color: #fdd4cd;
  }
}

app-cmf-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.action {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;

  width: 20px;
  height: 20px;

  opacity: 0;
  border-radius: 4px;
}

.overlay {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  max-width: 400px;
  padding: 15px;

  background-color: var(--color-gray-fff);
  border: 1px solid rgb(220 220 220);
  border-radius: 4px;
  box-shadow: 1px 1px 3px 0 rgb(25 25 25 / 40%);

  &__title {
    margin: 0 0 4px;

    font-size: 13px;
    font-weight: bold;
    color: var(--color-gray-666);
    text-transform: uppercase;
  }

  &__text {
    margin: 0;
    font-size: 12px;
    color: var(--color-gray-666);
  }

  .template {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    width: 100%;

    &__message {
      margin: 10px 4px 0 0;
      font-size: 12px;
      font-weight: bold;
      color: var(--color-gray-666);
    }

    &__value {
      display: flex;
      flex: 1 1 auto;
      align-items: center;

      width: 100%;
      height: 32px;

      background-color: #f4f5f7;
      border: solid 1px var(--color-gray-eee);
      border-radius: 4px;

      p {
        flex: 1;
        margin: 0 10px;
        color: var(--color-gray-444);
      }
    }

    .action {
      cursor: pointer;

      width: 28px;
      height: 28px;
      margin-right: 1px;

      opacity: 1;
      border-radius: 2px;

      transition: all 0.3s;

      &:hover {
        background-color: rgb(253 253 253);
      }
    }
  }

  &.merge-request {
    padding: 0;

    .mr-search-input {
      height: 32px;
      margin: 15px;
      padding: 4px 8px;

      border: 1px solid var(--color-gray-aaa);
      border-radius: 4px;
      outline: none;

      &:focus {
        outline: none;
      }
    }

    .mr-branch {
      cursor: pointer;

      display: flex;
      justify-content: space-between;

      width: 100%;
      padding: 8px 15px;

      .name {
        color: var(--default-color);
      }

      &:nth-child(2) {
        border-top: 1px solid var(--color-gray-eee);
      }

      .mr-action {
        opacity: 0;
      }

      &:hover {
        .mr-action {
          opacity: 1;
        }
      }
    }
  }

  .backdrop {
    opacity: 0;
  }
}

.overlay-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;

  width: 380px;
  padding: 16px;

  background-color: var(--app-bg-color-l1);
  border: solid 1px var(--chat-border-color);
  border-radius: 5px;
  box-shadow: 0 0 8px var(--chat-border-color);
}

.overlay-first-row {
  display: flex;
  flex-direction: row;
  font-weight: 500;
  color: var(--color-gray-888);
}

.overlay-request-status {
  margin-left: auto;
}

.overlay-pull {
  font-size: 14px;
}

.overlay-merge-name {
  overflow: hidden;

  font-size: 16px;
  font-weight: 600;
  color: var(--accent-color-bg);
  text-overflow: ellipsis;
}

.overlay-last-update-wrapper {
  display: flex;
  flex-direction: row;

  margin-bottom: 8px;

  font-weight: 500;
  color: var(--color-gray-888);
}

.overlay-more-requests {
  cursor: pointer;

  padding-top: 16px;
  padding-bottom: 8px;

  color: var(--accent-color-bg);

  border-top: solid 1px var(--chat-border-color);
}

.overlay-last-update-time {
  margin-left: 3px;
}
