al-file {
  display: grid;
  grid-template-columns: fit-content(10rem) fit-content(17rem);
}
al-file .al-file-choose-existing {
  display: none !important;
}
al-file:not(.uploading) .uploading-icon {
  display: none;
}
al-file.uploading .empty-icon {
  display: none !important;
}
al-file .al-file-drop-target {
  margin-right: 1rem;
  position: relative;
  cursor: pointer;
  background: hsl(0deg, 0%, 90%);
  border-top: 1px solid #cccccc;
  border-radius: 4px;
  min-width: 8rem;
  min-height: 8rem;
  height: 100%;
  padding: 4px 6px 6px;
  transition: all 0.2s;
}
al-file .al-file-drop-target input[type=file] {
  visibility: hidden;
}
al-file .al-file-drop-target al-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 4rem;
}
al-file .al-file-drop-target:hover {
  background: #f80;
  border-top-color: #cc6d00;
}
al-file .al-file-drop-target:hover:before {
  color: fadeout(#000, 40%);
}
al-file .al-file-drop-target .al-file-preview {
  width: 100%;
  height: 100%;
  background: no-repeat center;
  background-size: contain;
  position: relative;
  z-index: 2;
}
al-file .al-file-drop-target .al-file-preview img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}
al-file.dropping .al-file-drop-target {
  background: #f80;
  border-top-color: #cc6d00;
}
al-file.dropping .al-file-drop-target:before {
  color: fadeout(#000, 40%);
}
al-file .al-file-right {
  display: flex;
  flex-flow: column;
  justify-content: space-around;
  gap: 0.5rem;
}
al-file button {
  min-height: 2rem;
}

al-field[field-view=file_preview] [data-he-name=field] .field {
  padding: 0;
}
al-field[field-view=file_preview] [data-he-name=field] .field img {
  max-height: 25rem;
  -o-object-fit: contain;
     object-fit: contain;
}

al-field[field-view=file_preview][mode=inline] .field img,
al-field[field-view=file][mode=inline] .field img,
al-field[field-type=file][mode=inline] .field img {
  -o-object-fit: contain;
     object-fit: contain;
  width: 100px;
  height: 100px;
  display: block;
  margin: auto;
}

al-icon {
  --fa-display: inline-flex;
  display: inline-flex;
  flex-flow: column;
  justify-content: center;
  align-content: center;
  text-align: center;
  position: relative;
}
al-icon[hidden] {
  display: none !important;
}
al-icon[icon-style=duotone] {
  position: relative;
}
al-icon[icon-style=duotone]::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
al-icon[size="2"] {
  font-size: 2em;
}
al-icon[size="3"] {
  font-size: 3em;
}
al-icon[size="4"] {
  font-size: 4em;
}

al-icon-stack {
  display: inline-grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}
al-icon-stack al-icon {
  grid-area: 1/1;
}

al-svg {
  display: inline-flex;
}
al-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

al-image {
  position: relative;
  display: inline-block;
  overflow: hidden;
}
al-image .placeholder {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: scale(1.03);
  filter: blur(8px);
  z-index: -1;
  transition: 0.1s transform;
}
al-image .final {
  height: auto;
  width: auto;
  opacity: 0;
  transition: 0.1s opacity, 0.1s transform;
  transform: scale(1.03);
}