.epiceditor {
  margin-bottom: 4rem;
}

.epiceditor iframe {
  border: 1px solid #ccc;
}

.action-fields:not(.active) {
  display: none;
}

.action_pages-index .table {
  a:link,
  a:visited,
  a:focus,
  a:active {
    color: #000;
    text-decoration: none;
  }
}

.page#action {
  fieldset label {
    display: inline-block;

    &:not(.input-group-addon) {
      margin-right: 1em;
    }
  }

  fieldset ul {
    list-style-type: none;
    padding: 0 0 0 1em;
    margin: 0;

    li {
      padding: 0.5em 0 0.5em 0;
    }
  }
}

.action_pages-status .edit_action_page {
  .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 2em;
    grid-row-gap: 2em;
  }

  .grid input[type=radio] {
    position: absolute;
    width: 0;
    height: 0;
  }

  .grid input[type=radio] + label {
    display: block;
    padding: 1em 2em;
    border: 2px solid $border-gray;
    cursor: pointer;

    strong {
      display: block;
    }
  }

  .grid input[type=radio]:checked {
    + label {
      border: 2px dashed #00f;
    }

    &[value=live] + label {
      background: #bbeabb;
    }

    &[value=archived] + label {
      background: #eaeaea;
    }

    &[value=draft] + label {
      background: #eaeaea;
    }

    &[value=victory] + label {
      background: rgba(gold, 0.6);
    }
  }
}

.action_pages-index #page .page-actions {
  position: relative;
  padding: 1.4rem 2rem;

  &:hover {
    cursor: pointer;
  }

  &.open ul {
    display: block;
  }

  ul {
    background: #fff;
    list-style-type: none;
    padding: 0;
    border: 1px #aaa solid;
    z-index: 1;
    position: absolute;
    top: 0;
    left: 80%;
    display: none;

    li a.menu-link {
      display: inline-block;
      padding: 0.5rem;
      width: 100%;
      box-sizing: border-box;

      &:hover {
        color: #aaa;
      }
    }

    li + li {
      border-top: 1px #aaa solid;
    }
  }
}

.action_page_setup #individual-targets .input-group {
  float: left;
  max-width: 15em;
  margin-right: 1em;
}

.action_page_setup {
  .selected-img {
    img {
      max-width: 33%;
    }
  }
}

.hidden {
  display: none;
}

.action_pages-edit_partners {
  p {
    margin-bottom: 0;
    max-width: 57em;
  }
  .form-item.checkbox {
    margin-top: 1.2em;
    label {
      display: inline-block;
    }
  }
  .btn-primary {
    margin-top: 1em;
  }
}

#petition-targets {
  .hidden {
    display: none;
  }
  legend + .form-item {
    margin-top: 0.5em;
  }
  legend {
    margin-top: 1em;
  }
  .alert {
    background: #bbeabb;
    border: 1px solid $border-gray;
    font-weight: 400;
    padding: 0.5em;
    margin-bottom: 0.5em;
  }
}

.action_page_setup #affiliations-enabled {
  margin-top: 1em;
  legend {
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 0;
  }
  .targets-field {
    margin-top: 1em;
  }
  p {
    font-size: 1.2em; // match labels
  }
}

.action_page_setup #affiliation-types {
  .form-item + .form-item {
    display: none;
  }
  .targets-field {
    margin-bottom: 2em;
  }
}
