@import 'settings';

.form--post-create {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;

  .field--name-field-post {
    flex: 1 0 100%;

    .filter-wrapper {
      margin-bottom: 0;
    }

    .form-control {
      min-height: 4em;
    }
  }

  .field--name-field-post-image {
    flex: 1 1 100%;
    position: relative;

    .btn-default {
      width: 100%;
      margin-bottom: 1rem;
    }

    .preview {
      display: inline-block;
      @include z-depth-3;
      width: auto;
    }

    .image-widget {
      display: flex;
      justify-content: flex-end;
      position: relative;
      margin-bottom: 1rem;

      &.hidden {
        display: block !important;
        height: 0;
        margin-bottom: 0 !important;

        .form-file {
          display: none;
        }

        .form-submit {
          position: absolute;
          z-index: 10;

          @include for-phone-only {
            width: 29px;
            height: 29px;
            top: 3px;
            right: 3px;

            .ajax-throbber {
              top: 4px;
              left: 4px;
            }
          }

          @include for-tablet-portrait-up {
            position: relative;
            top: -2px;
            left: 150px;
            right: auto;

            [dir='rtl'] & {
              left: auto;
              right: -35px;
            }
          }
        }

      }
    }

    @include for-tablet-portrait-up {
      flex-basis: auto;
      margin-bottom: 0;

      .btn-default {
        width: auto;
        margin-bottom: 0;
      }
    }

  }

  .field--name-field-post-visibility {
    flex: 1 1 auto;
    align-self: flex-end;

    @include for-tablet-portrait-up {
      flex-grow: 0;
    }
  }

  .btn-primary {
    flex: 0 1 auto;
    margin-left: .5rem;
    align-self: flex-end;

    [dir='rtl'] & {
      margin-left: 0;
      margin-right: .5rem;
    }

    @include for-tablet-portrait-up {
      flex-grow: 0;
    }

  }

  .page-node-type-album & {
    #edit-cancel {
      margin-left: .5rem;
    }
  }

}
