@use "sass:math";

.generate-kb-options {
  padding-top: 0.4807692308rem;
  padding-bottom: 0.4807692308rem;
  color: var(--theme-elevation-400);
  display: flex;
  align-items: center;
  gap: 3rem;

  &__bulk-upload-header {
    display: inline-block;

    .btn {
      margin: 0;
    }
  }

  &__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    column-gap: 10px;
    margin-top: -3.8461538462rem;
    margin-bottom: 3.8461538462rem;

    .btn {
      margin: 0;
    }

    svg {
      fill: currentColor;
    }
  }

  &__modal {

    &:before,
    &:after {
      content: " ";
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      pointer-events: none;
    }

    &:before {
      background: var(--theme-bg);
      opacity: 0.85;
    }

    &:after {
      backdrop-filter: blur(5px);
    }

    .template-minimal {
      display: flex;
      width: 100%;
      justify-content: center;
      align-items: center;
      padding: 1.9230769231rem;
      margin-left: auto;
      margin-right: auto;
      min-height: 100%;
      min-height: 100vh;
      z-index: 1;
      position: relative;

      /*
      &__wrap {
        padding: 20px;
        border-radius: 4px;
        background: var(--theme-bg);
      }
      */
    }
  }

  &__header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin: 0 0 0.6rem 0;

    h3 {
      display: flex;
      gap: 0.5em;
      margin: 0;

      svg {
        width: 1em;
        height: 1em;
        fill: currentColor;
      }
    }
  }

  &__main {

    .rich-text__editor {
      overflow-x: hidden;
      overflow-y: auto;
      max-height: Max(160px, calc(100vh - 650px));
    }
  }

  &__foot {
    display: flex;
    gap: 2rem;

    &>.btn,
    &>.form-submit {
      flex: 1 1 calc(50% - 1rem);

      &>.btn {
        width: 100%;
      }
    }
  }

  &__dropzone {
    margin-bottom: 1rem;

    &-label {
      display: block;
      font-weight: 600;
      margin-bottom: 0.5rem;
    }

    &-area {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      padding: 2rem;
      border: 2px dashed var(--theme-elevation-200);
      border-radius: 4px;
      cursor: pointer;
      transition: border-color 0.2s ease, background-color 0.2s ease;

      &:hover,
      &--active {
        border-color: var(--theme-elevation-400);
        background-color: var(--theme-elevation-50);
      }
    }

    &-icon {
      font-size: 2rem;
    }

    &-text {
      color: var(--theme-elevation-400);
      font-size: 0.875rem;
    }
  }

  &__file-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--theme-elevation-150);
    border-radius: 4px;
  }

  &__file-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--theme-elevation-100);
    gap: 0.75rem;

    &:last-child {
      border-bottom: none;
    }
  }

  &__file-name {
    flex: 1;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__file-size {
    font-size: 0.75rem;
    color: var(--theme-elevation-400);
    white-space: nowrap;
  }

  &__file-remove {
    flex-shrink: 0;
    padding: 0.25rem !important;
    cursor: pointer;

    svg {
      width: 0.875rem;
      height: 0.875rem;
    }
  }
}
