/* ACF Field Styles
----------------------------------------------- */

.reach-switch {
  border-top: none !important;

  .acf-checkbox-list {
    li {
      padding: 10px 0;
      background: $white;
      position: relative;
    }

    &.ui-sortable {
      li {
        padding-left: 32px;
      }
    }
  }

  .acf-switch {
    margin-right: 8px;
  }
}

.acf-settings-wrap {
  .acf-field-select {
    &.page-modules {
      border: none !important;

      .select2-container {
        .select2-selection {
          border: 1px solid #ddd;
          border-radius: 0;

          &__rendered {
            padding: 10px;
          }

          &__clear {
            display: none;
          }

          &__choice {
            width: 100%;
            display: block;
            box-sizing: border-box;
            margin: 0 0 5px;
            border-radius: 8px;
            padding: 15px;
            border: 1px solid #ddd;
            cursor: move;
          }

          &__choice__remove {
            margin-right: 8px;
          }
        }

        .select2-search {
          border: 1px dashed #ddd;
          border-radius: 8px;
          background: $white;
          width: 100%;
          height: 50px;
          padding: 15px;
          box-sizing: border-box;
          position: relative;
          cursor: pointer;

          &:before {
            content: 'Add Module...';
            position: relative;
            top: -4px;
          }

          &__field {
            opacity: 0;
          }
        }
      }
    }
  }
}

.post-type-page {
  &.role-editor {
    #postimagediv {
      display: none;
    }
  }
}

.acf-field {
  &--hidden {
    display: none !important;
  }
}

/* ACF Google Font Select Field Styles
----------------------------------------------- */

.acf-google-font {
  &__font-selector {
    overflow: hidden;
  }

  &__form-control-title {
    font-size: 11px;
    text-transform: uppercase;
    display: block;
    margin: 0 0 5px 0;
  }

  &__font-selector {
    position: relative;
  }

  &__loader {
    height: 100%;
    width: 100%;
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    z-index: 5000;
    display: none;
  }

  &__preview {
    font-size: 16px;
    background: $seashell;
    margin-top: 10px;
    padding: 10px;
  }
}

/* ACF Button Field Styles
----------------------------------------------- */

.acf-smart-button {
  &__fields {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;

    label {
      display: block;
      margin-bottom: 5px;
    }
  }

  &__text,
  &__url {
    flex: 1 100%;
    margin-bottom: 15px;

    @include desktop-lg() {
      flex: 0 43%;
      margin-bottom: 0;
    }
  }

  &__external {
    flex: 1 100%;

    .acf-switch-input {
      opacity: 1;
    }

    .acf-switch {
      display: none;
    }

    @include desktop-lg() {
      flex: 0 11%;
    }
  }
}

/* ACF Background Field Styles
----------------------------------------------- */

.acf-background {
  &__fields {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;

    label {
      display: block;
      margin-bottom: 5px;
    }
  }

  &__video,
  &__image {
    flex: 1 100%;
    margin-bottom: 15px;
  }

  &__video {
    flex: 1 50%;
    margin-bottom: 15px;
  }

  &__text-color,
  &__color {
    flex: 1 100%;
    margin-bottom: 15px;

    @include desktop-lg() {
      flex: 0 49%;
    }
  }

  &__repeat,
  &__size,
  &__position {
    flex: 1 100%;
    margin-bottom: 15px;

    @include desktop-lg() {
      flex: 0 31%;
    }
  }
}

/* ACF Animation Field Styles
----------------------------------------------- */

.acf-animation {
  &__fields {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;

    label {
      display: block;
      margin-bottom: 5px;
    }
  }

  &__switch {
    width: 100%;
  }

  &__type,
  &__direction,
  &__speed {
    flex: 1 100%;
    margin-bottom: 15px;

    @include desktop-lg() {
      flex: 0 31%;
    }
  }

  &__mobile,
  &__run-once {
    width: 50%;
  }
}

/* ACF Image Radio Field Styles
----------------------------------------------- */

.acf-radio-image {
  &__fields {
    display: flex;
    flex-flow: row wrap;

    &.vertical {
      flex-direction: column;
    }
  }

  &__option {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;

    @include desktop() {
      max-width: 25%;
    }

    input {
      visibility: hidden;
      position: absolute;

      + img {
        box-sizing: border-box;
        cursor: pointer;
        border: 5px solid white;
        display: block;
        max-width: 100%;
        height: auto;
        transition: border-color 0.25s;
      }

      &:checked + img {
        border-color: #0073aa;
      }
    }
  }
}

.acf-group-heading {
  font-size: 18px;
  background-color: #f4f4f4;
}

/* ACF Button Color Field Styles
----------------------------------------------- */
.acf-button-color {
  &__fields {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;

    @include desktop-lg() {
      flex-direction: column;
    }
  }

  &__group {
    @include desktop-lg {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
    }

    label {
      display: block;
      margin-bottom: 5px;
    }
  }

  &__group > * {
    flex: 1 100%;

    @include desktop-lg() {
      flex: 0 31%;
    }
  }
}