@import "include/variables.less";
@import "include/mixins.less";
@import "../vendor/bootstrap/variables.less";
@import "../vendor/bootstrap/mixins.less";


/**
 * Preview Image Popover
 */
@import "../vendor/bootstrap/popovers.less";
//since the popover must be placed in body to prevent clipping in a modal situation we need to include not namespaced
// styles here and adjust the z-Index
.popover {
  z-index: @index-level-dialog-content-click-proxy;
  max-width: none;
  img {
    max-width: 75vw;
  }
}

/**
 * File Results List Wrapper
 */
.ccm-ui .ccm-file-manager-list-wrapper {
  // prevent the file manager drop-down menu from being clipped
  min-height: 420px;
}

/**
 * File Results List
 */
table.ccm-file-manager-list {
  img.ccm-file-manager-list-thumbnail,
  img.ccm-generic-thumbnail {
    &.ccm-thumbnail-small {
      width: 30px;
      height: 30px;
    }
    &.ccm-thumbnail-full{
      width: auto;
      height: auto;
    }
  }
  td.ccm-search-results-icon {
    i {
      margin-top: 7px;
      margin-bottom: 7px;
      display: inline-block;
    }
  }
  .dropdown {
    text-align: right;
  }
}


/**
 * Download iframe
 */
#ccm-file-manager-download-target {
  width: 0px;
  height: 0px;
  visibility: hidden;
}


/**
 * Select in page
 */
div.ccm-file-selector {
  .border-radius(2px);
  color: #ffffff;
  background-color: #3f9edc;
  text-align: center;
  font-size: 18px;
  line-height: @line-height-base;
  .transition(0.1s linear all);
  cursor: pointer;

  &.ccm-parent-menu-item-hover,
  &.ccm-parent-menu-item-active,
  &:hover {
    cursor: pointer;
    outline: 0px;
    background-color: #2a6496;
  }

  div.ccm-file-selector-choose-new {
    padding: 8px;
  }

  div.ccm-file-selector-loading {
    padding: 8px;
  }

  div.ccm-file-selector-file-selected {
    padding: 8px;
    text-align: left;

    div.ccm-file-selector-file-selected-thumbnail {
      margin-right: 10px; float: left;

      img {
        max-width: 60px;
        max-height: 60px;
      }
    }

    div.ccm-file-selector-file-selected-title {
      word-wrap: break-word;
    }
  }
}

/**
 * Menuing
 */
#ccm-menu-click-proxy.ccm-file-manager-menu-item-hover {
  z-index: @index-level-dialog-content-click-proxy;
  background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
}

div#ccm-popover-menu-container {
  .ccm-popover-file-menu {
    z-index: @index-level-dialog-content-click-proxy;
  }
}

/**
 * Upload Dialog
 */
div.ccm-file-manager-import-files {
  form.dropzone {
    .transition(0.1s linear all);
    .dz-default.dz-message {
      span {
        font-size: 32px;
        -webkit-font-smoothing: antialiased;
        font-weight: normal;
        display: block;
        color: #999;
      }
    }

    &.drag-hover {
      background-color: rgba(102,175,233,0.6);
      span {
        color: #999;
      }
    }

    border: 2px dashed #09f;
  }
  textarea[name="url_upload"] {
    resize: vertical;
    white-space: nowrap;
  }
  form.dropzone, textarea[name="url_upload"] {
    min-height: 340px;
  }
  table.incoming_file_table {
    .incoming_file_table-checkbox, .incoming_file_table-thumbnail, .incoming_file_table-filename, .incoming_file_table-size {
        vertical-align: middle;
    }
    td.incoming_file_table-checkbox, td.incoming_file_table-thumbnail {
        text-align: center;
    }
    td.incoming_file_table-filename {
        text-align: left;
    }
    td.incoming_file_table-size {
        text-align: right;
    }
    .incoming_file_table-checkbox {
        width: 1px;
    }
    .incoming_file_table-thumbnail {
        width: 48px;
    }
    .incoming_file_table-size {
        width: 1px;
        white-space: nowrap;
    }
  }
}

/**
 *Thumbnail listing
 */
.ccm-ui {
  .ccm-image-thumbnail-card {
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;

    hr.ccm-image-thumbnail-divider {
      margin: 15px -12px;
    }
  }
  .ccm-file-manager-image-thumbnail {
    margin-bottom: 0px;
    padding: 20px;
    text-align: center;
    background-color: #efefef;
    font-size: 18px;
    font-weight: 300;
    color: #999;
  }
  .ccm-image-thumbnail-display-name {
    min-height: 40px;
  }
  .ccm-image-thumbnail-display-name h4 {
    margin-top: 0px;
  }
  .ccm-image-thumbnail-dimensions {
    display: block;
    margin-bottom: 10px;
    color: #999;
    font-size: 13.5px;
  }
}

@media (max-width: @screen-xs-max) {
  div#ccm-file-manager-upload-prompt {
    position: static;
  }
}