/**
 * Do not edit directly, this file was auto-generated.
 */
@layer jokul.components {
  .jkl-file {
    --jkl-file-padding: var(--jkl-unit-10);
    --jkl-file-thumbnail-width: var(--jkl-unit-70);
    --jkl-file-thumbnail-max-height: var(--jkl-unit-90);
    --jkl-file-thumbnail-aspect-ratio: 1;
    --jkl-file-gap: var(--jkl-unit-10) var(--jkl-unit-20);
    --jkl-file-button-width: var(--jkl-unit-50);
    --text-color: var(--jkl-color-text-default);
    --border: 1px solid var(--jkl-color-border-separator);
    --border-radius: 2px;
    --bg: transparent;
    --transition-time: 250ms;
  }
  .jkl-file__content {
    transition-timing-function: ease;
    transition-duration: 100ms;
    transition-property: background-color, border-color, color;
    color: var(--text-color);
    padding: var(--jkl-file-padding);
    border: var(--border);
    border-radius: var(--border-radius);
    background: var(--bg);
    display: grid;
    grid-template-columns: var(--jkl-file-thumbnail-width) 1fr var(--jkl-file-button-width);
    grid-template-areas: "image text button";
    gap: var(--jkl-file-gap);
    align-items: center;
    height: fit-content;
  }
  .jkl-file__content__name {
    font-size: var(--jkl-font-size-2);
    line-height: var(--jkl-line-height-relaxed);
    font-weight: 400;
    --jkl-icon-weight: 300;
    --jkl-icon-size: 1.2em;
    grid-area: text;
    /* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
    word-break: break-word;
  }
  .jkl-file__content__name__size {
    word-break: keep-all;
  }
  .jkl-file__content__delete {
    aspect-ratio: 1;
    grid-area: button;
  }
  .jkl-file__content__thumbnail {
    width: 100%;
    aspect-ratio: var(--jkl-file-thumbnail-aspect-ratio);
    object-fit: cover;
    max-height: var(--jkl-file-thumbnail-max-height);
    grid-area: image;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--jkl-color-background-container-low);
    border-radius: 2px;
    overflow: hidden;
    container-type: inline-size;
    anchor-name: --thumb;
    anchor-scope: all;
    outline: 1px solid color-mix(in srgb, currentColor 3%, transparent);
  }
  .jkl-file__content__thumbnail::before, .jkl-file__content__thumbnail::after {
    position: absolute;
    z-index: 1;
  }
  .jkl-file__content__thumbnail::after {
    content: ""/"Laster opp";
    position-anchor: --thumb;
    position-area: center;
    height: 25%;
    border-radius: 1px;
    aspect-ratio: 1;
    scale: 0;
    background: var(--text-color);
    animation: spin 5s infinite forwards linear;
    transition: display var(--transition-time) allow-discrete ease-in, scale var(--transition-time) ease-in;
  }
  @starting-style {
    .jkl-file__content__thumbnail::after {
      scale: 0;
    }
  }
  .jkl-file__content__thumbnail img {
    opacity: 1;
    transition: opacity var(--transition-time) ease-in-out;
  }
  .jkl-file__content__thumbnail img[src] {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .jkl-file[class*=card] {
    --jkl-file-thumbnail-width: 100%;
    --jkl-file-thumbnail-aspect-ratio: 16/9;
  }
  .jkl-file[class*=card] .jkl-file__content {
    grid-template-columns: 1fr var(--jkl-file-button-width);
    grid-template-rows: var(--jkl-file-thumbnail-max-height) auto;
    grid-template-areas: "image image" "text button";
  }
  .jkl-file:not([data-state*=loading]) .jkl-file__content__thumbnail:not(:has(img[src]))::before {
    font-size: var(--jkl-font-size-2);
    line-height: var(--jkl-line-height-relaxed);
    font-weight: 400;
    --jkl-icon-weight: 300;
    --jkl-icon-size: 1.2em;
    content: attr(data-filetype);
  }
  .jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__content__thumbnail img {
    opacity: 0;
  }
  .jkl-file[data-state=loading]:not(:has(.jkl-file__support-label)) .jkl-file__content__thumbnail::after {
    display: block;
    scale: 1;
  }
  .jkl-file[data-state=error] {
    --bg: var(--jkl-color-functional-error);
  }
  .jkl-file[data-state=error],
  .jkl-file[data-state=error] a,
  .jkl-file[data-state=error] a:hover,
  .jkl-file[data-state=error] button,
  .jkl-file[data-state=error] span {
    --text-color: var(--jkl-color-text-on-alert);
    --link-color: var(--text-color);
    --jkl-color-border-action: currentColor;
  }
  @keyframes spin {
    from {
      transform: rotate(0turn);
    }
    to {
      transform: rotate(1turn);
    }
  }
}