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

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

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

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

    &.ba-tile-image-preview {
      border-bottom: 1px solid #ddd;
    }
  }

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

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

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

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

  .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;

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

  .ba-tile-content {
    padding: 1rem 1.5rem;
  }

  .ba-tile-image-preview {
    border-bottom: 1px solid #ddd;
    height: 156px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ba-tile-image {
    max-width: 100%;
    max-height: 100%;
  }

  .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-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);
}
