@import 'design-tokens';
@import '~@angular/material/theming';

$app-dark-primary: mat-palette($mat-blue, 300);
$app-dark-accent: mat-palette($mat-blue, 300);
$app-dark-warn: mat-palette($mat-red, 400);
$app-dark-theme: mat-dark-theme($app-dark-primary, $app-dark-accent, $app-dark-warn);
@include angular-material-theme($app-dark-theme);

// Get colors to use in dark theme
$dark-fg: map-get($app-dark-theme, foreground);
$dark-bg: map-get($app-dark-theme, background);

:root {
  // experimental dark theme
  --primary-text-color: #{map-get($dark-fg, text)};
  --secondary-text-color: #{map-get($dark-fg, secondary-text)};
  --tertiary-text-color: #{$glxy-grey-600};
  --border-color: #{map-get($dark-fg, divider)};
  --weak-border-color: rgba(255, 255, 255, 0.04);
  --primary-color: #{$glxy-blue-700};
  --icon-color: #{map-get($dark-fg, icon)};
  --primary-background-color: #{$glxy-grey-900};
  --primary-background-selected-color: #{rgba($glxy-blue-700, 0.16)};
  --secondary-background-color: #383838;
  --card-background-color: #292929; // override mat-theme for better contrast
  --row-hover-bg-color: #383838;

  --link-color: #{$glxy-blue-300};
  --link-hover-color: #{$glxy-blue-400};

  --primary-button-bg-hover-color: #{$glxy-blue-400};
  --warn-button-bg-hover-color: #{$glxy-red-500};
  --secondary-button-border-strong-color: rgba(255, 255, 255, 0.24);

  --info-background-color: rgba(25, 118, 210, 0.2); // blue-700
  --info-border-color: rgba(25, 118, 210, 0.5);
  --info-icon-color: #{$glxy-blue-400};

  --warn-background-color: rgba(255, 160, 0, 0.1); // amber-700
  --warn-border-color: rgba(255, 160, 0, 0.4);
  --warn-icon-color: #{$glxy-yellow-500};

  --success-background-color: rgba(56, 142, 60, 0.2); // green-700
  --success-border-color: rgba(56, 142, 60, 0.5);
  --success-icon-color: #{$glxy-green-300};
  --success-text-color: #{$glxy-green-300};

  --error-background-color: rgba(211, 47, 47, 0.2); // red-700
  --error-border-color: rgba(211, 47, 47, 0.5);
  --error-icon-color: #{$glxy-red-500};
  --error-text-color: #{$glxy-red-500};

  --contrast-background-color: #{$glxy-grey-50};
  --contrast-border-color: #{$glxy-grey-300};
  --contrast-icon-color: #{$glxy-grey-900};
  --contrast-text-color: #{$glxy-grey-900};

  --field-border-color: rgba(255, 255, 255, 0.2);
  --field-border-disabled-color: #{$glxy-grey-700};
  --field-background-color: #{$glxy-grey-900};
  --field-background-disabled-color: #383838;
  --select-arrow-color: rgba(255, 255, 255, 0.7);
}
