/*
// Path pattern:       (/issues/new|/issues/[0-9]+/copy)
// Insertion position: Head of all pages
// Type:               CSS
// Comment:            Fixed submit button
*/
:where(body.action-create, .action-new) #content {
  padding-bottom: 140px;

  #issue-form > input[type="submit"] {
    position: fixed;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    box-shadow: -5px 5px 5px 0px rgb(0 0 0 / 50%);
    z-index: 6;
    margin: 0 20px;
    padding: 0;
    bottom: 40px;
    opacity: 0.5;
    text-wrap: balance;

    &:hover {
      opacity: 1;
    }

    &:nth-child(1 of input[type="submit"]) {
      left: 0;
    }

    &:nth-child(2 of input[type="submit"]) {
      left: 80px;
    }

    &:nth-child(3 of input[type="submit"]) {
      left: 160px;
    }

    &:nth-child(4 of input[type="submit"]) {
      left: 240px;
    }
  }
}

/* Support RTL */
html[dir="rtl"],
html:has(head link[rel="stylesheet"][href*="/rtl"]) {
  :where(body.action-create, .action-new) #content {
    #issue-form > input[type="submit"] {
      &:nth-child(1 of input[type="submit"]) {
        left: auto;
        right: 0;
      }

      &:nth-child(2 of input[type="submit"]) {
        left: auto;
        right: 80px;
      }

      &:nth-child(3 of input[type="submit"]) {
        left: auto;
        right: 160px;
      }

      &:nth-child(4 of input[type="submit"]) {
        left: auto;
        right: 240px;
      }
    }
  }
}
