// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only

@use '../mixins';
@use '../variables';

.AttachmentStatusIcon__container {
  position: relative;
  width: 36px;
  height: 40px;
  margin-top: 2px;
  margin-bottom: 2px;
  margin-inline-end: 12px;
}

.AttachmentStatusIcon__circle-icon-container {
  height: 36px;
  width: 36px;
  margin-top: 2px;
  margin-bottom: 2px;

  border-radius: 18px;
  position: relative;

  @include mixins.light-theme {
    background-color: variables.$color-white-alpha-20;
    &:hover {
      background-color: variables.$color-white-alpha-30;
    }
    &:active {
      background-color: variables.$color-white-alpha-40;
    }
  }
  @include mixins.dark-theme {
    background-color: variables.$color-white-alpha-20;
    &:hover {
      background-color: variables.$color-white-alpha-30;
    }
    &:active {
      background-color: variables.$color-white-alpha-40;
    }
  }
}

.AttachmentStatusIcon__circle-icon-container--incoming {
  @include mixins.light-theme {
    background-color: variables.$color-white-alpha-80;
    &:hover {
      background-color: variables.$color-white-alpha-60;
    }
    &:active {
      background-color: variables.$color-white-alpha-40;
    }
  }
  @include mixins.dark-theme {
    background-color: variables.$color-white-alpha-20;
  }
}

.AttachmentStatusIcon__circle-icon-container--disabled {
  @include mixins.light-theme {
    background-color: variables.$color-white-alpha-10;
    &:hover {
      background-color: variables.$color-white-alpha-10;
    }
    &:active {
      background-color: variables.$color-white-alpha-10;
    }
  }

  @include mixins.dark-theme {
    background-color: variables.$color-white-alpha-10;
    &:hover {
      background-color: variables.$color-white-alpha-10;
    }
    &:active {
      background-color: variables.$color-white-alpha-10;
    }
  }
}

.AttachmentStatusIcon__circle-icon-container--incoming.AttachmentStatusIcon__circle-icon-container--disabled {
  @include mixins.light-theme {
    background-color: variables.$color-white-alpha-60;
    &:hover {
      background-color: variables.$color-white-alpha-60;
    }
    &:active {
      background-color: variables.$color-white-alpha-60;
    }
  }

  @include mixins.dark-theme {
    background-color: variables.$color-white-alpha-10;
    &:hover {
      background-color: variables.$color-white-alpha-10;
    }
    &:active {
      background-color: variables.$color-white-alpha-10;
    }
  }
}

.AttachmentStatusIcon__circle-icon {
  @include mixins.position-absolute-center;
  & {
    height: 20px;
    width: 20px;
  }
}
.AttachmentStatusIcon__circle-icon--x {
  @include mixins.color-svg-themed(
    '../images/icons/v3/x/x-bold.svg',
    var(--color-label-primary-on-color),
    var(--color-label-primary-on-color)
  );
}
.AttachmentStatusIcon__circle-icon--arrow-down {
  @include mixins.color-svg-themed(
    '../images/icons/v3/arrow/arrow-down-bold.svg',
    var(--color-label-primary-on-color),
    var(--color-label-primary-on-color)
  );
}
.AttachmentStatusIcon__circle-icon--incoming {
  @include mixins.light-theme {
    background-color: var(--color-label-primary);
  }
  @include mixins.dark-theme {
    background-color: var(--color-label-primary);
  }
}
