@mixin table-alignments() {
  thead, tbody {
    th, td {
      text-align: center;

      &:first-child {
        text-align: left;
      }

      &:last-child {
        text-align: right;
      }
    }
  }

  tbody {
    th, td {
      &:first-child {
        padding-left: 0;
      }

      &:last-child {
        padding-right: 0;
      }
    }
  }

}


.add-new {
  float: right;
}


#pum_popup_trigger_fields {

  .triggers-list {
    display: none;
  }

  .no-triggers {
    display: block;
    select {
      width: 180px;
    }
  }

  &.has-triggers {

    .triggers-list {
      display: block;
    }

    .no-triggers {
      display: none;
    }

  }
}

#pum_popup_cookie_fields {

  .cookies-list {
    display: none;
  }

  .no-cookies {
    display: block;
    select {
      width: 180px;
    }
  }

  &.has-cookies {

    .cookies-list {
      display: block;
    }

    .no-cookies {
      display: none;
    }

  }
}



#popup_trigger_add_type,
#popup_cookie_add_event {
  display: block;
  font-size: 1.4em;
  height: auto;
  margin: 1.5em 0;
  padding: 0.25em;
  width: 100%;
}

#pum_trigger_add_type_modal,
#pum_cookie_add_event_modal {

  .pum-modal-wrap {
    width: 440px;
    margin-left: -220px;
  }

}

#pum_popup_trigger_fields {}

#pum_popup_triggers_list,
#pum_popup_cookies_list{
  @include table-alignments();

  span.edit {
    cursor: pointer;
    color: #0073aa;
    text-decoration: underline;
  }

  .actions {
    i {
      cursor: pointer;
    }
  }
}

#pum_popup_conditions {

  .inside {
    margin: 0;
    padding: 0;

    .facet-builder {
      padding: 6px 12px 12px;

    }

    .facet-groups {
      display: none;
    }
    .no-facet-groups {
      display: block;
    }

    .has-conditions {
      .facet-groups {
        display: block;
      }
      .no-facet-groups {
        display: none;
      }
    }
  }
}

.pum-click-selector-presets {
  position: absolute;
  right: 2px;
  bottom: 2px;

  > span {

    border: 1px solid;
    border-radius: 2px;
    background-color: rgba(0, 0, 0, .5);
    color: #fff;
    text-align: center;
    cursor: pointer;

    font-size: 21px;
    height: 1em;
    width: 1em;

    &:hover {
      background-color: #0085ba;
    }

  }

  &.open > span {
    background-color: #0085ba;
  }

  ul {
    display: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 1px;
    left: 20px;
    background-color: #fff;
    width: auto;
    z-index: 999;
    box-shadow: 1px 1px 5px -1px;
    border: 1px solid rgba(0, 0, 0, .25);
    min-width: 125px;

    li {

      display: block;
      padding: .5em;
      border-bottom: 1px dashed rgba(0, 0, 0, .25);

      text-wrap: none;
      margin: 0;

      span {
        cursor: pointer;
        display: block;
        line-height: 1;
      }

      &:last-child {
        border-bottom: 0;
      }

      &:hover {
        color: #0085ba;
      }

    }

  }

  &.open ul {
    display: block;
  }

}
