/* Dash */

// uses system colors
$dash_background_color: lighten($panel_bg, 5%);

$dash_placeholder_size: 32px;
$dash_padding: $base_padding * 2;
$dash_edge_offset: $base_margin * 3;
$dash_border_radius: $bt_radius + $dash_padding - 2px;
$dash_spacing: $base_margin * 0.5;

// container for the dash
#dash {
  // a bit of spacing so that dash doesn't touch the screen edges
  padding-left: $base_padding;
  padding-right: $base_padding;

  // background behind item container
  .dash-background {
    background-color: $dash_background_color;
    border-radius: $dash_border_radius;
    padding-top: $dash_padding;
    padding-bottom: $dash_padding;
    padding-left: $dash_padding - $dash_spacing; // subtract the margins added to .overview-tile below
    padding-right: $dash_padding - $dash_spacing;
  }

  // items on the dash
  .dash-item-container {
    .placeholder {
      // background-image: url("resource:///org/gnome/shell/theme/dash-placeholder.svg");
      background-image: none;
      background-size: contain;
      height: $dash_placeholder_size;
    }

    .empty-dash-drop-target {
      width: $dash_placeholder_size;
      height: $dash_placeholder_size;
    }

    // IMPORTANT: items on the dash need to extend to the edge to be adequate click targets
    // as such the %tile style is overriden and button styles are applied to the child class .overview-icon
    .show-apps,
    .overview-tile {
      // remove styles
      background: none;
      box-shadow: none;
      border: none;
      border-radius: 0;
      padding: 0;
      margin: 0 $dash_spacing;
      padding-bottom: $dash_edge_offset; // align with other items

      .overview-icon {
        border-radius: $bt_radius;
        padding: $base_padding;
        text-align: center;
        transition-duration: 100ms;
        background-color: transparent;
        border: 1px solid transparent;
      }

      &:focus .overview-icon,
      &:hover .overview-icon {
        background-color: rgba($selected_bg_color, 0.5);
        border: 1px solid $selected_bg_color;
      }
    
      &:active .overview-icon,
      &:active:focus .overview-icon,
      &:active:hover .overview-icon,
      &:highlighted .overview-icon,
      &:selected .overview-icon,
      &:checked .overview-icon {
        background-color: rgba($selected_bg_color, 0.75);
        border: 1px solid $selected_bg_color;
      }
    }

    // running app dot
    .app-grid-running-dot {
      // manually position the dot within the dash item
      offset-y: -$dash_padding;
    }
  }

  // separator between pinned and running apps
  .dash-separator {
    width: 1px;
    margin-left: $base_margin;
    margin-right: $base_margin;
    background-color: transparentize($osd_fg_color, 0.8);
  }

  // make sure all dash components have same margin from screen edge
  .dash-separator,
  .dash-background {
    margin-bottom: $dash_edge_offset;
  }
}

// OSD Tooltip
.dash-label {
  border-radius: $bt_radius;
  padding: 4px 12px;
  color: $_shell_fg_color;
  background-color: rgba(darken($osd_bg_color, 8%), 0.95);
  text-align: center;
  border: none;
  box-shadow: none;
  -y-offset: $base_margin * 2; // distance from the dash edge
}
