@use 'sass:color';

// Resolved from MD2 light theme foreground/background maps
$background-color: #fafafa;
$background-card-color: white;
$text-color: rgba(0, 0, 0, 0.87);
$secondary-text: rgba(0, 0, 0, 0.54);
$login-button-bg-color: #5654ac;

// Custom variables - ACA specific styling:
$data-table-thumbnail-width: 35px;
$data-table-cell-min-width: 150px;
$data-table-cell-min-width-no-grow: 120px;
$data-table-cell-min-width-file-size: 110px;

// Upload drag
$adf-upload-dragging-color: unset;
$adf-upload-dragging-border: 1px solid #00bcd4;
$adf-upload-dragging-background: #e0f7fa;
$adf-upload-dragging-level1-color: unset;
$adf-upload-dragging-level1-border: none;
$grey-background: rgba(33, 33, 33, 0.12);
$grey-text-background: rgba(33, 33, 33, 0.05);
$grey-hover-background: rgba(33, 33, 33, 0.24);
$blue-save-button-background: #1f74db;
$blue-checkbox-background: rgb(10, 96, 206);
$blue-active-table-row: rgb(10, 96, 206, 0.24);
$black-heading: #4e4c4c;
$theme-dropdown-background: color.adjust($background-color, $lightness: -5%);
$theme-dropdown-background-hover: color.adjust($background-color, $lightness: -10%);
$grey-divider: rgba(0, 0, 0, 0.22);
$datetimepicker-font-color: rgba(black, 0.87);
$datetimepicker-selected-date-background: #2254b2;
$white-background: #fff;
$datetimepicker-cell-focus-border-color: #1f74db;
$sidenav-background-color: $background-color;
$selected-text-color: #212121;
$selected-text-background: rgba($selected-text-color, 0.12);
$selected-background-color: rgba(31, 116, 219, 0.24);
$action-button-text-color: color.adjust($text-color, $lightness: 35%);
$page-layout-header-background-color: $background-card-color;
$search-chip-icon-color: #757575;
$disabled-chip-background-color: #f5f5f5;
$search-highlight-background-color: #ffd180;
$info-snackbar-background: #1f74db;
$warning-snackbar-background: #8c7012;
$text-light-color: rgba(33, 35, 40, 0.7);
$user-profile-background: #595959;
$app-blue-folder: #2a7de1;
$box-shadow-first-color: rgba(0, 0, 0, 0.2);
$box-shadow-second-color: rgba(0, 0, 0, 0.14);
$box-shadow-third-color: rgba(0, 0, 0, 0.12);
$box-shadow-dark-color: rgba(0, 0, 0, 0.24);
$gray-background-color: #f5f5f5;
$gray-panel-background-color: rgba(0, 0, 0, 0.12);

// CSS Variables
$defaults: (
  --theme-background-color: $background-color,
  --theme-text-color: rgba(0, 0, 0, 0.54),
  --theme-sidenav-text-color: rgba(0, 0, 0, 0.87),
  --theme-sidenav-hovered-text-color: rgba(0, 0, 0, 0.87),
  --theme-tab-active-text-color: rgba(0, 0, 0, 0.87),
  --theme-text-bold-color: rgba(0, 0, 0, 0.87),
  --theme-title-color: rgba(0, 0, 0, 0.87),
  --theme-border-color: rgba(0, 0, 0, 0.07),
  --theme-card-background-color: white,
  --theme-foreground-text-color: rgba(0, 0, 0, 0.72),
  --theme-foreground-text-bold-color: rgba(0, 0, 0, 0.87),
  --theme-secondary-text-color: rgba(0, 0, 0, 0.54),
  --theme-dialog-background-color: white,
  --theme-header-text-color: rgba(0, 0, 0, 0.87),
  --new-button-font-size: 0.9rem,
  --theme-grey-text-background-color: $grey-text-background,
  --theme-grey-background-color: $grey-background,
  --theme-grey-hover-background-color: $grey-hover-background,
  --theme-blue-button-color: $blue-save-button-background,
  --theme-info-snackbar-background: $info-snackbar-background,
  --theme-warning-snackbar-background: $warning-snackbar-background,
  --theme-blue-checkbox-color: $blue-checkbox-background,
  --theme-blue-active-table-row-color: $blue-active-table-row,
  --theme-dropdown-color: $theme-dropdown-background,
  --theme-dropdown-background-hover: $theme-dropdown-background-hover,
  --theme-grey-divider-color: $grey-divider,
  --theme-pagination-background-color: #fafafa,
  --theme-about-panel-border-color: $grey-background,
  --theme-about-panel-background-color: white,
  --theme-about-panel-title-color: rgba(0, 0, 0, 0.87),
  --theme-datetimepicker-font-color: $datetimepicker-font-color,
  --theme-datetimepicker-selected-date-background: $datetimepicker-selected-date-background,
  --theme-white-background: $white-background,
  --theme-datetimepicker-cell-focus-border: $datetimepicker-cell-focus-border-color,
  --theme-sidenav-background-color: $sidenav-background-color,
  --theme-selected-text-color: $selected-text-color,
  --theme-selected-background-color: $selected-background-color,
  --theme-selected-text-background: $selected-text-background,
  --theme-hover-background-color: $grey-text-background,
  --theme-action-button-text-color: $action-button-text-color,
  --theme-page-layout-header-background-color: $page-layout-header-background-color,
  --theme-search-chip-icon-color: $search-chip-icon-color,
  --theme-disabled-chip-background-color: $disabled-chip-background-color,
  --theme-secondary-text: $secondary-text,
  --theme-search-highlight-background-color: $search-highlight-background-color,
  --theme-text-light-color: $text-light-color,
  --theme-user-profile-background-color: $user-profile-background,
  --theme-app-blue-folder: $app-blue-folder,
  --theme-login-button-bg-color: $login-button-bg-color,
  --theme-box-shadow-first-color: $box-shadow-first-color,
  --theme-box-shadow-second-color: $box-shadow-second-color,
  --theme-box-shadow-third-color: $box-shadow-third-color,
  --theme-box-shadow-dark-color: $box-shadow-dark-color,
  --theme-gray-background-color: $gray-background-color,
  --theme-gray-panel-background-color: $gray-panel-background-color
);

// propagates SCSS variables into the CSS variables scope
:root {
  @each $name, $value in $defaults {
    #{$name}: #{$value};
  }
}
