
/* App Icons */

.show-apps,
.app-well-app,
%app-well-app {
  & .overview-icon {
    color: on($osd, secondary);
    border-radius: $icon_radius;
    padding: $base_padding;
    border: none;
    transition-duration: 100ms;
    text-align: center;
  }

  &:hover .overview-icon,
  &:focus .overview-icon,
  &:selected .overview-icon {
    background-color: on($osd, divider);
    border-image: none;
    background-image: none;
  }

  &:active .overview-icon,
  &:checked .overview-icon {
    background-color: on($osd, track);
    box-shadow: none;
  }
}

// App Folders
.app-well-app.app-folder {
  border-radius: $icon_radius;

  &, &:hover, &:active {
    background-color: transparent;
  }

  .overview-icon {
    background-color: on(black, divider);
    border-radius: $icon_radius;
  }

  &:hover .overview-icon {
    background-color: overlay(black, active);
  }

  &:active .overview-icon {
    background-color: on(black, track);
  }
}

// expanded folder
.app-folder-dialog {
  border-radius: $menu_radius * 3;
  padding: $base_padding * 2;
  background-color: $osd;

  @if $rimless == 'false' {
    border: 1px solid black;
    box-shadow: inset 0 0 0 1px highlight($osd);
  }

  & .folder-name-container {
    padding: ($base_padding * 4) ($base_padding * 6) 0;
    spacing: $base_spacing * 2;

    & .folder-name-label,
    & .folder-name-entry {
      font-size: 18pt;
      font-weight: bold;
    }

    & .folder-name-entry {
      width: 300px;
      border: none;
      caret-color: on($osd);

      &:focus {
        background-color: on($osd, divider);
        color: on($osd);
      }
    }

    /* FIXME: this is to keep the label in sync with the entry */
    & .folder-name-label {
      padding: $base_padding * 1.5 ($base_padding + 2px);
      color: on($osd, secondary);
    }

    & .edit-folder-button {
      background-color: overlay($osd);
      color: on($osd, secondary);
      border: none;
      padding: 0;
      width: 36px;
      height: 36px;
      border-radius: $circular_radius;

      & > StIcon { icon-size: $base_icon_size; }

      &:hover { background-color: overlay($osd, hover); }
      &:checked, &:active { background-color: $inverse-indicator; color: on($inverse-indicator); }
    }
  }

  & .icon-grid {
    row-spacing: $base_spacing * 2;
    column-spacing: $base_spacing * 4;
    page-padding-top: 0;
    page-padding-bottom: 0;
    page-padding-left: 0;
    page-padding-right: 0;
  }

  & .page-indicators {
    margin-bottom: $base_padding * 3;
  }
}

.app-folder-dialog-container {
  padding: $base_padding;
  width: $base_padding * 50 + 420px;
  height: $base_padding * 50 + 420px;
}

// Running app indicator (also shown in dash)
.app-well-app-running-dot {
  width: $base_padding; height: 3px;
  border-radius: 2px;
  background-color: on(black, track);
  margin-bottom: 0;

  StWidget.focused & {
    width: $base_padding * 4;
    background-color: $inverse-indicator !important;
  }
}

// right-click app menu
.app-menu,
.app-well-menu {
  max-width: 27.25em;
}

// Rename popup for app folders
.rename-folder-popup {
  .rename-folder-popup-item {
    spacing: $base_padding;
    &:ltr, &:rtl { padding: 0 $base_padding * 2; }
  }
}

// shutdown and other actions in the grid
.system-action-icon {
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2); // FIXME: this should really have a highlight
  background-color: $osd;
  color: on($osd);
  border-radius: $circular_radius;
  icon-size: 48px;
}
