apps/barista-design-system/src/pages/overview-page/components/tile/tile.scss
@import '../../../../../libs/barista-components/core/src/style/colors';
@import '../../../../styles/global/variables';

$tilesize: 290px;
$tilefontsize: 28px;
$tilefontsize-big: 42px;
$gridgap: 20px;

@mixin tile-theme($link-color, $hover-color, $active-color) {
  color: $link-color;

  :hover,
  &:hover {
    border-color: $hover-color;
    text-decoration: none;
  }

  :focus,
  &:focus {
    outline: 2px solid $hover-color;
  }

  :active,
  &:active {
    border-color: $active-color;
  }

  .ba-tile-img {
    color: $hover-color;
  }

  .ba-tile-badge-favorite,
  &.ba-tile-badge-favorite {
    .ba-tile-status-icon-triangle {
      fill: $link-color;
    }
  }

  .ba-tile-badge-workinprogress,
  &.ba-tile-badge-workinprogress {
    .ba-tile-status-icon-triangle {
      fill: #ffffff;
    }

    img {
      transform: rotate(90deg);
    }
  }
}

:host {
  display: block;
  background-color: #ffffff;
  border: 1px solid $gray-200;
  border-radius: 3px;
  height: 100%;
  min-width: $tilesize;
  position: relative;
  overflow: hidden;

  @include tile-theme($turquoise-600, $turquoise-600, $turquoise-700);

  .ba-tile-badge-warning {
    .ba-tile-status-icon-triangle {
      fill: $yellow-600;
    }
  }

  .ba-tile-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    margin: 1rem 1.5rem;
  }

  .ba-tile-header {
    display: flex;
    align-items: center;
  }

  .ba-tile-headertext {
    font-size: 1.2rem;
  }

  .ba-tile-identifier {
    font-size: $tilefontsize-big;
    margin-right: 1.5rem;
    min-width: 60px;
    text-align: center;
  }

  .ba-tile-type {
    font-size: 0.9rem;
    color: $gray-500;
    line-height: 1.2;
  }

  .ba-tile-title {
    font-size: 1.4rem;
    line-height: 1.2;
  }

  .ba-tile-description {
    margin: 1rem 0 0;
    flex-grow: 1;
    color: $textcolor;
  }

  .ba-tile-footer {
    color: $gray-500;
    margin-top: 2rem;
  }

  .ba-tile-status {
    position: absolute;
    width: 50px;
    top: 0;
    right: 0;
  }

  .ba-tile-status-icon {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 3px;
    right: 5px;
  }
}

.dt-theme-blue :host {
  @include tile-theme($blue-600, $blue-600, $blue-700);
}

.dt-theme-purple :host {
  @include tile-theme($purple-600, $purple-600, $purple-700);
}

.dt-theme-royalblue :host {
  @include tile-theme($royalblue-500, $royalblue-500, $royalblue-700);
}

.dt-theme-turquoise :host {
  @include tile-theme($turquoise-600, $turquoise-600, $turquoise-700);
}
