/** main preview UI **/
template,
.unsupported {
  display: none;
}
.dropzone-holder {
  clear: both;
  background: #fff;
  border: 1px solid #999;
  position: relative;
  padding: 1em;
  min-height: 150px;
  -webkit-border-radius: 12px;
  border-radius: 3px;
  margin-bottom: 20px;
}
.dropzone-holder.uploadable {
  border: 1px dashed #999;
}
.dropzone-holder * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
}

.dropzone-holder:after {
  content: ".";
  visibility: hidden;
  clear: both;
}

.dropzone.dz-clickable {
  cursor: pointer;
}

.fileattachment a {
  cursor: pointer;
  border: 0;
  text-decoration: none;
}
.fileattachment ul img {
  border: 0;
  background: none;
}

.fileattachment ul.file-attachment-field-previews {
  margin: 0;
  padding: 0;
  clear: both;
}

.fileattachment ul.file-attachment-field-previews li {
  list-style: none;
  position: relative;
  border: 1px solid #e7eaec;
  padding-left: 80px;
  text-align: center;
  font-size: 11px;
  line-height: 120%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fileattachment ul.file-attachment-field-previews.list li {
  margin-bottom: 12px;
  max-width: 600px;
}

.fileattachment ul.file-attachment-field-previews.list li:last-child {
  margin-bottom: 0;
}
.fileattachment ul.file-attachment-field-previews li span {
  display: table-cell;
  padding: 0;
  vertical-align: middle;
}

.fileattachment ul.file-attachment-field-previews.grid li span {
  display: block;
}

.fileattachment ul.file-attachment-field-previews li img {
  border: 0;
  background: none;
}

.fileattachment ul.file-attachment-field-previews li .check {
  display: none;
}

.fileattachment ul.file-attachment-field-previews li.success .check {
  display: inline;
  border: 0;
  background: none;
}

.fileattachment ul.file-attachment-field-previews .file-icon {
  line-height: 0;
  height: 100%;
  background-position: center;
  background-size: 66%;
  background-repeat: no-repeat;
  position: absolute;
  left: 0;
}

.fileattachment ul.file-attachment-field-previews .file-icon img {
  border: 0;
  width: auto;
  height: auto;
}

.fileattachment ul.file-attachment-field-previews.grid li {
  float: left;
  display: block;
  margin: 10px;
  background: #fff;
  padding: 8px 8px 70px 8px;
  border: 1px solid #dfdcdc;
  -webkit-box-sizing: content-box;
  box-sizing: content-box;
}

.fileattachment
  ul.file-attachment-field-previews.grid
  li.success
  .check-holder {
  text-align: center;
  position: absolute;
  bottom: 5px;
  left: auto;
  right: 5px;
}
.fileattachment
  ul.file-attachment-field-previews.list
  li.success
  .check-holder {
  padding: 0 0 5px 5px;
}

.fileattachment ul.file-attachment-field-previews a:hover {
  border: 0;
}

.fileattachment ul.file-attachment-field-previews li .attachment-filename {
  display: block;
  font-weight: 700;
}

.fileattachment ul.file-attachment-field-previews li .attachment-filesize {
  display: block;
  text-transform: uppercase;
  color: #999;
}

/** file meta **/
.fileattachment ul.file-attachment-field-previews .file-meta {
  max-width: 150px;
  font-size: 11px;
  text-align: left;
  padding: 0 12px;
  font-family: Helvetica, Arial, sans-serif;
}

.fileattachment ul.file-attachment-field-previews.grid .file-meta {
  max-width: 100%;
  font-size: 10px;
  padding: 4px 8px;
  border-top: 1px solid #e7eaec;
  height: 20px;
}

.fileattachment ul.file-attachment-field-previews.grid .small .file-meta {
  height: 15px;
  padding: 2px 8px;
}
.fileattachment ul.file-attachment-field-previews.grid .medium .file-name {
  font-size: 12px;
  line-height: 12px;
}
.fileattachment ul.file-attachment-field-previews.grid .large .file-name {
  font-size: 13px;
  line-height: 13px;
}

.fileattachment ul.file-attachment-field-previews li .file-size {
  border-top: 0;
  font-size: 11px;
  color: #999;
}
.fileattachment ul.file-attachment-field-previews.grid li .file-size {
  border-top: 0;
  font-size: 10px;
}
.fileattachment ul.file-attachment-field-previews.grid li .file-size span {
  display: inline;
  vertical-align: top;
}

/** file progress **/
.fileattachment ul.file-attachment-field-previews .file-progress-wrap {
  border: 1px solid #999;
  border-radius: 12px;
  height: 12px;
  width: 100px;
  display: inline-block;
  padding: 0;
}

.fileattachment ul.file-attachment-field-previews .file-progress {
  background: #ddd;
  height: 10px;
  vertical-align: top;
  border-radius: 12px;
  display: inline-block;
  padding: 0;
}

.fileattachment ul.file-attachment-field-previews.grid .file-progress-holder {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 25px;
}

.fileattachment ul.file-attachment-field-previews.grid .file-progress-wrap {
  width: auto;
  border: 0;
  border-radius: 12px;
  height: 3px;
  display: block;
  padding: 0;
}
.fileattachment ul.file-attachment-field-previews.grid .file-progress {
  background: green;
  height: 3px;
  vertical-align: top;
  border-radius: 0;
  display: inline-block;
  padding: 0;
}

/** remove/delete UI **/
.fileattachment ul.file-attachment-field-previews .overlay,
.fileattachment ul.file-attachment-field-previews.grid .overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: rgba(237, 237, 237, 0.8);
  display: none;
  border: 1px solid #e7eaec;
  margin: -1px 0 -2px 0;
}
.fileattachment ul.file-attachment-field-previews .detached .detach-overlay {
  display: block;
}
.fileattachment ul.file-attachment-field-previews .deleted .delete-overlay {
  display: block;
}
.fileattachment ul.file-attachment-field-previews .removed .dropzone-actions {
  display: none;
}

.fileattachment ul.file-attachment-field-previews .overlay > span {
  text-align: center;
  background: white;
  top: 50%;
  right: 0;
  left: 0;
  bottom: auto;
  padding: 0 4px;
  position: absolute;
  transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  max-height: 150px;
}
.fileattachment ul.file-attachment-field-previews .overlay > span h5 {
  font-family: Helvetica, Arial, sans-serif;
  line-height: 11px;
  font-size: 11px;
  margin: 4px 0 0 0;
  text-transform: uppercase;
  font-weight: normal;
}
.fileattachment ul.file-attachment-field-previews .overlay > span small {
  font-size: 11px;
  display: block;
  margin: 3px 0;
}
.fileattachment ul.file-attachment-field-previews .delete-overlay > span h5 {
  color: #b80000;
}
.fileattachment ul.file-attachment-field-previews .detach-overlay > span h5 {
  color: #1a344b;
}
.fileattachment ul.file-attachment-field-previews .overlay > span .revert {
  text-transform: uppercase;
  cursor: pointer;
  display: block;
  font-size: 9px;
  position: absolute;
  top: 0;
  right: 3px;
}
.fileattachment
  ul.file-attachment-field-previews
  .error-overlay
  > span
  .revert {
  top: 4px;
}
.fileattachment ul.file-attachment-field-previews.list .overlay > span .revert {
  right: auto;
  left: 8px;
}
.fileattachment ul.file-attachment-field-previews .dropzone-actions {
  position: absolute;
  top: 5px;
  right: 5px;
}
.fileattachment ul.file-attachment-field-previews .dropzone-action {
  width: 100px;
  height: 16px;
  display: block;
  cursor: pointer;
  text-align: right;
}
.fileattachment ul.file-attachment-field-previews .dropzone-action img {
  vertical-align: -3px;
}
.fileattachment
  ul.file-attachment-field-previews
  .dual-perm
  .dropzone-action
  > span {
  display: inline;
}
.fileattachment ul.file-attachment-field-previews li .dropzone-action > span {
  display: none;
}
.fileattachment ul.file-attachment-field-previews .dropzone-action.detach {
  top: 5px;
}

.fileattachment ul.file-attachment-field-previews .dropzone-action.delete {
  top: 24px;
  color: #b80000;
}
.fileattachment
  ul.file-attachment-field-previews
  .dual-perm
  .dropzone-action
  img {
  width: 12px;
}

.fileattachment ul.file-attachment-field-previews.grid .dropzone-actions {
  position: absolute;
  background: #fff;
  height: 25px;
  width: 100%;
  bottom: 0;
  top: auto;
  border-top: 1px solid #e7eaec;
  right: 0;
  line-height: 0;
}
.fileattachment
  ul.file-attachment-field-previews.grid
  .dropzone-actions
  > :nth-child(2) {
  border-left: 1px solid #e7eaec;
}
.fileattachment ul.file-attachment-field-previews.grid .dropzone-action {
  float: left;
  text-align: center;
  vertical-align: middle;
  width: 100%;
  padding: 5px 0;
  height: 100%;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}
.fileattachment
  ul.file-attachment-field-previews.grid
  .dual-perm
  .dropzone-action {
  width: 50%;
}
.fileattachment ul.file-attachment-field-previews.grid .dropzone-action:hover {
  background: #f9f9f9;
}
.fileattachment
  ul.file-attachment-field-previews.grid
  .small
  .dropzone-action
  > span {
  display: none;
}
.fileattachment
  ul.file-attachment-field-previews.grid
  .small
  .overlay
  > span
  .revert {
  position: static;
}

/** error state **/
.fileattachment ul.file-attachment-field-previews .error-overlay span {
  background: #b80000;
}
.fileattachment ul.file-attachment-field-previews .error-overlay span h5 {
  color: #fff;
}
.fileattachment ul.file-attachment-field-previews .error-overlay span small {
  color: #fff;
}
.fileattachment
  ul.file-attachment-field-previews.grid
  .small
  .overlay
  > span
  small {
  font-size: 9px;
  display: inline;
}

/** CMS only **/
.fileattachment .backend ul.file-attachment-field-previews li .file-name {
  max-width: 450px;
}

.fileattachment .backend ul.file-attachment-field-previews li .file-name:hover {
  text-decoration: underline;
  cursor: pointer;
}

/** core dropzone styles **/
.dropzone.dz-clickable .dz-message,
.dropzone.dz-clickable .dz-message span {
  cursor: pointer;
}
.dropzone.dz-clickable * {
  cursor: default;
}
.dropzone-holder .dz-message {
  opacity: 1;
  -ms-filter: none;
  filter: none;
}
.dropzone.dz-drag-hover {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.04);
}
.dropzone.dz-started .dz-message {
  display: none;
}
button.process {
  margin-top: 24px;
  float: none;
  clear: both;
}

/* mixins */
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pad {
  padding: 10px;
}
