@import "../../../mp-variables";

.photo-input {

  // alert class used for drag and drop area

  .alert {
    margin-bottom: 0;
  }

  .drag-area {
    font-size: 17px;
    line-height: 1.5em;
    text-align: center;
    padding: 0 0 3em;
    border-width: 1px;
    border-style: solid;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    .info-filetype {
      margin: 0 12px;

      .fa.danger, &.text-danger .fa.info {
        display: none;
      }
      &.text-danger .fa.danger, .fa.info {
        display: inline-block;
        width: 1em;
      }
    }

    .info-filetype, .info-footer {
      font-size: 12px;
      line-height: 1.3em;
    }

    .info-footer {
      color: @gray;
      font-style: italic;
      position: absolute;
      bottom: 0;
      left: 0;
      text-align: center;
      width: 100%;
      padding: 0 12px 6px;

    }

    .info-footer .fa,
    .text-filetype .fa,
    button .fa,
    .block-md .fa {
      margin-right: 6px;
    }

  }

  .alert-danger {
    border-style: dashed;
    border-width: 2px;

    .text-danger {
      color: @sm-danger-text;
    }
  }

  .btn-file {
    position: relative;
    overflow: hidden;

    input[type=file] {
      position: absolute;
      top: 0;
      right: 0;
      width: 100%;
      height: 100%;
      filter: alpha(opacity=0);
      opacity: 0;
      outline: none;
      cursor: inherit;
      display: block;
    }
  }

  img {
    width: 100%;
  }

  @media (min-width: (@screen-sm + 1)) {
    .block-md {
      display: block;
      margin: 0.5em auto;
      z-index: 2;
    }
  }

  @media (max-width: @screen-sm) {
    .drag-area {
      display: block;
      padding: 0.5em 0 1.5em;
    }

    .block-md {
      margin-right: 0.5em;
    }

    .btn-file {
      padding: 3px 6px;
    }
  }

  @media (max-height: @screen-short), (max-width: @screen-sm) {
    .drag-area, .btn-file {
      font-size: 14px;
    }
    .info-footer {
      padding: 0 6px 3px;
      font-size: 10px;
      line-height: 1.1em;
    }
  }

  @media (max-height: @screen-short) and (min-width: (@screen-sm + 1)) {
    .drag-area {
      padding-bottom: 2em;
      overflow: hidden;
    }
    .block-md {
      margin: 4px auto;
      line-height: 1.2em;
    }
  }
}
