//This is the RIGHT PLACE to edit the stylesheet

//let's start by telling people not to edit the generated CSS:
$cakeisalie: "This stylesheet is generated, DO NOT EDIT";
/* #{$cakeisalie} */

$panel-corner-radius: 0;
$small_size: if($laptop == 'true', 20px, 24px);
$medium_size: if($laptop == 'true', 32px, 36px);
$large_size: if($laptop == 'true', 44px, 48px);
$menuitem_size: if($laptop == 'true', 28px, 32px);

stage {
  @include font(body-1);
  color: $fg_color;
}

//
// Buttons
//
.button {
  min-height: $medium_size;
  padding: 0 16px;
  border-width: 0;
  border-radius: 2px;
  @include font(button);
  @include button(flat-normal);
  &:hover { @include button(flat-hover); }
  &:active { @include button(flat-active); }
  &:insensitive { @include button(flat-insensitive); }
  &:focus { @include button(flat-focus); }
}

//
// Entries
//
StEntry {
  min-height: $medium_size;
  padding: 0 8px;
  border-radius: 0;
  border-width: 0;
  color: $fg_color;
  caret-color: $fg_color;
  selection-background-color: $selected_bg_color;
  selected-color: $selected_fg_color;
  @include font(subheading);
  @include entry(normal);
  //&:hover { @include entry(hover);}
  &:focus { @include entry(focus);}
  &:insensitive { @include entry(insensitive);}
  StIcon.capslock-warning {
    icon-size: 16px;
    warning-color: $warning_color;
    padding: 0 0;
  }
  StIcon.peek-password {
    icon-size: 16px;
    padding: 0 4px;
  }
  StLabel.hint-text {
    margin-left: 2px;
    color: transparentize($fg_color, 0.3);
  }
}

//
// Scrollbars
//
StScrollView {
  &.vfade { -st-vfade-offset: 32px; }
  &.hfade { -st-hfade-offset: 32px; }
}

StScrollBar {
  padding: 0;

  StScrollView & {
    min-width: 5px;
    min-height: 5px;
  }

  StBin#trough {
    margin: 4px;
    border-radius: 100px;
    background-color: $insensitive_track_color;
  }

  StButton#vhandle, StButton#hhandle {
    border-radius: 100px;
    background-color: $tertiary_fg_color;
    //border: 4px solid transparent; //would be nice to margin or at least to transparent
    margin: 4px;
    &:hover { background-color: $secondary_fg_color; }
    &:active { background-color: $primary_color; }
  }
}

%overview_scrollbar {
  StBin#trough {
    background-color: $selected_insensitive_track_color;
  }

  StButton#vhandle, StButton#hhandle {
    background-color: $tertiary_selected_fg_color;
    &:hover { background-color: $secondary_selected_fg_color; }
    &:active { background-color: $selected_fg_color; }
  }
}

//
// Slider
//
.slider {
  height: 20px;
  color: $accent_bg_color;
  -slider-height: 2px;
  -slider-background-color: $track_color; //background of the trough
  -slider-border-color: transparent; //trough border color
  -slider-active-background-color: $accent_bg_color; //active trough fill
  -slider-active-border-color: transparent; //active trough border
  -slider-border-width: 0;
  -slider-handle-radius: 7px;
  -slider-handle-border-width: 1px;
  -slider-handle-border-color: $borders_color;

  // barlevels are for >= 3.29.90
  -barlevel-height: 2px;
  -barlevel-background-color: $track_color;
  -barlevel-border-color: transparent;
  -barlevel-active-background-color: $accent_bg_color;
  -barlevel-active-border-color: transparent;
  -barlevel-overdrive-color: $destructive_color;
  -barlevel-overdrive-border-color: transparent;
  -barlevel-overdrive-separator-width: 2px;
  -barlevel-border-width: 0;

  .popup-menu-item.selected & {
    color: $selected_fg_color;
    -slider-background-color: rgba(black, 0.2);
    -slider-active-background-color: $selected_fg_color;

    // barlevels are for >= 3.29.90
    -barlevel-background-color: rgba(black, 0.2);
    -barlevel-active-background-color: $selected_fg_color;
  }
}

//
// Check Boxes
//
.check-box {
  * {
    min-height: $medium_size - 8px * 2;
    padding: 8px 0;
  }
  StBoxLayout { spacing: 8px; }
  StBin {
    width: 24px;
    height: 24px;
    padding: ($medium_size - 24px) / 2;
    border-radius: 100px;
    background-image: url("assets/checkbox-off.svg");
  }
  &:focus StBin {
    background-image: url("assets/checkbox-off.svg");
  }
  &:hover StBin {
    background-color: $semi_track_color;
  }
  &:active StBin {
    background-color: $track_color;
  }
  &:checked StBin {
    background-image: url("assets/checkbox.svg");
  }
  &:focus:checked StBin {
    background-image: url("assets/checkbox.svg");
  }
  &:hover:checked StBin {
    background-color: scale-alpha($accent_bg_color, $lower_opacity / 2);
  }
  &:active:checked StBin {
    background-color: scale-alpha($accent_bg_color, $lower_opacity);
  }
}

//
// Switches
//
.toggle-switch {
  width: 52px;
  height: 24px;
  background-size: contain;
  background-image: url("assets/toggle-off.svg");

  &:checked { background-image: url("assets/toggle-on.svg"); }

  .popup-menu-item.selected & {
    background-image: url("assets/toggle-off.svg");

    &:checked { background-image: url("assets/toggle-on.svg"); }
  }
}

@each $v in us, intl {
  .toggle-switch-#{$v} {
    background-image: url("assets/toggle-off.svg");
    &:checked { background-image: url("assets/toggle-on.svg"); }
  }
}

//
// links
//
.shell-link {
  border-radius: 2px;
  color: $link_color;
  &:hover {
    color: $link_color;
    background-color: scale-alpha($link_color, $lower_opacity / 2);
  }
  &:active {
    color: $link_color;
    background-color: scale-alpha($link_color, $lower_opacity);
  }
}

// Outline for low res icons
.lowres-icon {
  icon-shadow: 0 1px 2px rgba(black, 0.3);
}

// Dropshadow for large icons
.icon-dropshadow {
  icon-shadow: 0 1px 2px rgba(black, 0.4);
}

//
// Modal Dialogs
//
.headline { @include font(title); }
.lightbox { background-color: black; }
.flashspot { background-color: white; }

.modal-dialog {
  border-radius: 2px;
  color: $fg_color;
  margin: 10px;
  background-color: $base_color;
  box-shadow: none;
  border: 0 solid $solid_borders_color;
  border-width: if($variant == 'light', 0, 1px);

  .modal-dialog-content-box {
    margin: 32px 40px;
    spacing: 32px;
    max-width: 28em;
  }

  .modal-dialog-linked-button {
    min-height: 40px;
    padding: 0 16px;
    border-top: 1px solid $borders_color !important;
    border-right-width: 0;
    @include font(button);
    @include button(flat-normal);
    &:hover { @include button(flat-hover); }
    &:focus { @include button(flat-focus); }
    &:active { @include button(flat-active); }
    &:insensitive { @include button(flat-insensitive); }

    &:first-child {
      border-radius: 0px 0px 0px 2px;
    }
    &:last-child {
      border-right-width: 0px;
      border-radius: 0px 0px 2px 0px;
    }
    &:first-child:last-child {
      border-right-width: 0px;
      border-radius: 0px 0px 2px 2px;
    }
  }

  .run-dialog-entry { width: 20em; margin-bottom: 6px; }

  .run-dialog-error-box {
    padding-top: 16px;
    spacing: 6px;
  }

  .run-dialog-button-box {
    padding-top: 1em;
  }

  .run-dialog-label {
    font-size: 1em;
    font-weight: normal;
    color: $tertiary_fg_color;
    padding-bottom: .4em;
  }
}

// Message Dialog
.message-dialog-main-layout {
  padding: 12px 20px 0;
  spacing: 12px;
}

.message-dialog-content {
  spacing: 20px;

  .message-dialog-title {
    text-align: center;
    font-size: 18pt;
    font-weight: 800;

    &.leightweight {
      font-size: 13pt;
      font-weight: 800;
    }
  }

  .message-dialog-description { text-align: center; }
}

// Dialog List
.dialog-list {
  spacing: 18px;

  .dialog-list-title {
    text-align: center;
    font-weight: bold;
  }

  .dialog-list-scrollview { max-height: 200px; }
  .dialog-list-box {
    spacing: 1em;

    .dialog-list-item {
      spacing: 1em;

      .dialog-list-item-title { font-weight: bold; }
      .dialog-list-item-description {
        color: $secondary_fg_color;
        @include font(title);
      }
    }
  }
}

// Run Dialog
.run-dialog {
  .modal-dialog-content-box {
    margin-top: 24px;
    margin-bottom: 14px;
  }
  .run-dialog-entry { width: 20em; }
  .run-dialog-description {
    text-align: center;
    color: $secondary_fg_color;
    @include font(title);
  }
}

// End Session Dialog
.end-session-dialog {
  width: 30em;

  .end-session-dialog-battery-warning,
  .dialog-list-title {
    color: $warning_color;
  }
}

// ShellMountOperation Dialogs
.shell-mount-operation-icon { icon-size: 48px; }

.show-processes-dialog,
.mount-question-dialog {
  spacing: 24px;
}

.show-processes-dialog-subject,
.mount-question-dialog-subject {
  padding-top: 10px;
  padding-left: 17px;
  padding-bottom: 6px;
}

.mount-question-dialog-subject {
  max-width: 500px;
}

.show-processes-dialog-subject:rtl,
.mount-question-dialog-subject:rtl {
  padding-left: 0px;
  padding-right: 17px;
}

.show-processes-dialog-description,
.mount-question-dialog-description {
  padding-left: 17px;
  width: 28em;
}

.show-processes-dialog-description:rtl,
.mount-question-dialog-description:rtl {
  padding-right: 17px;
}

.show-processes-dialog-app-list {
  max-height: 200px;
  padding-top: 24px;
  padding-left: 49px;
  padding-right: 32px;
}

.show-processes-dialog-app-list:rtl {
  padding-right: 49px;
  padding-left: 32px;
}

.show-processes-dialog-app-list-item {
  color: $fg_color;
  &:hover { color: $fg_color; }
  &:ltr { padding-right: 1em; }
  &:rtl { padding-left: 1em; }
}

.show-processes-dialog-app-list-item-icon {
  &:ltr { padding-right: 17px; }
  &:rtl { padding-left: 17px; }
}

.show-processes-dialog-app-list-item-name {
  font-size: 1em;
}

.mount-dialog {
  spacing: 24px;

  .message-dialog-title {
    padding-top: 10px;
    padding-left: 17px;
    padding-bottom: 6px;
    max-width: 34em;
  }

  .message-dialog-title:rtl {
    padding-left: 0px;
    padding-right: 17px;
  }

  .message-dialog-body {
    padding-left: 17px;
    width: 28em;
  }

  .message-dialog-body:rtl {
    padding-left: 0px;
    padding-right: 17px;
  }
}

.mount-dialog-app-list {
  max-height: 200px;
  padding-top: 24px;
  padding-left: 49px;
  padding-right: 32px;
}

.mount-dialog-app-list:rtl {
  padding-right: 49px;
  padding-left: 32px;
}

.mount-dialog-app-list-item {
  color: $fg_color;
}

.mount-dialog-app-list-item:hover {
  color: $tertiary_fg_color;
}

.mount-dialog-app-list-item:ltr {
  padding-right: 1em;
}

.mount-dialog-app-list-item:rtl {
  padding-left: 1em;
}

.mount-dialog-app-list-item-icon:ltr {
  padding-right: 17px;
}

.mount-dialog-app-list-item-icon:rtl {
  padding-left: 17px;
}

.mount-dialog-app-list-item-name {
  font-size: 10pt;
}

// Password or Authentication Dialog
.prompt-dialog {
  //this is the width of the entire modal popup
  width: 28em;

  .modal-dialog-content-box {
    margin-bottom: 24px;
  }

  .message-dialog-main-layout { spacing: 24px; padding: 10px; }
  .message-dialog-content { spacing: 16px; }
  .message-dialog-title { @include font(title); color: $fg_color; }
}

.prompt-dialog-password-grid {
  spacing-rows: 8px;
  spacing-columns: 4px;

  .prompt-dialog-password-entry {
    width: auto;

    // 4px (spacing) + 16px (spinner-width)
    &:ltr { margin-left: 20px; }
    &:rtl { margin-right: 20px; }
  }
}

.prompt-dialog-password-layout {
  spacing: 8px;
}

.prompt-dialog-password-entry {
  width: 20em;
}

.prompt-dialog-error-label,
.prompt-dialog-info-label,
.prompt-dialog-null-label {
  text-align: center;
  @include font(title);
  margin: 6px;
}

.prompt-dialog-error-label {
  color: $warning_color;
}

.prompt-dialog-description:rtl {
  text-align: right;
}

.prompt-dialog-password-box {
  spacing: 1em;
  padding-bottom: 1em;
}

.prompt-dialog-error-label {
  font-size: 1em;
  color: $error_color;
  padding-bottom: 8px;
}

.prompt-dialog-info-label {
  font-size: 1em;
  padding-bottom: 8px;
  color: $tertiary_fg_color;
}

.hidden {
  color: rgba(0,0,0,0);
}

.prompt-dialog-null-label {
  font-size: 1em;
  padding-bottom: 8px;
  color: $tertiary_fg_color;
}

// Polkit Dialog
.polkit-dialog-user-layout {
  text-align: center;
  spacing: 8px;
  margin-bottom: 6px;

  .polkit-dialog-user-root-label {
    color: $warning_color;
  }

  .polkit-dialog-user-icon {
    border-radius: 5px;
    background-size: contain;
    width: 48px;
    height: 48px;
    margin: 6px;
  }
}

// Audio selection dialog
.audio-device-selection-dialog {
  .modal-dialog-content-box { margin-bottom: 28px; }
  .audio-selection-box { spacing: 20px; }
}

.audio-selection-device {
  border: 1px solid $borders_color;
  border-radius: 3px;

  &:active, &:hover, &:focus {
    background-color: $selected_bg_color;
    color: $selected_fg_color;
  }
}

.audio-selection-device-box {
  padding: 20px;
  spacing: 20px;
}

.audio-selection-device-icon {
  icon-size: 64px;
}

// Access Dialog
.access-dialog {
  spacing: 30px;
}

.access-dialog-main-layout {
  padding: 12px 20px 0;
  spacing: 12px;
}

.access-dialog-content {
  max-width: 28em;
  spacing: 20px;
}

.access-dialog-icon {
  min-width: 48px;
  icon-size: 48px;
}

.access-dialog-title {
  font-weight: bold;
}

.access-dialog-subtitle {
  color: $tertiary_fg_color;
  font-weight: bold;
}

// Geolocation Dialog
.geolocation-dialog {
  spacing: 30px;
}

.geolocation-dialog-main-layout {
  spacing: 12px;
}

.geolocation-dialog-content {
  spacing: 20px;
}

.geolocation-dialog-icon {
  icon-size: 48px;
}

.geolocation-dialog-title {
  font-weight: bold;
}

.geolocation-dialog-reason {
  color: $tertiary_fg_color;
  font-weight: bold;
}

// Extension Dialog
.extension-dialog .message-dialog-main-layout {
  spacing: 24px;
  padding: 10px;
}

.extension-dialog .message-dialog-title {
  font-weight: normal;
  color: $tertiary_fg_color;
}

// Inhibit-Shortcuts Dialog
.inhibit-shortcuts-dialog {
  spacing: 30px;
}

// Network Agent Dialog
.network-dialog-secret-table {
  spacing-rows: 15px;
  spacing-columns: 1em;
}

.keyring-dialog-control-table {
  spacing-rows: 15px;
  spacing-columns: 1em;
}

%theme_dialogs {
  background-color: $base_color;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(black, 0.25);
  border: solid $borders_color;
  border-width: if($variant == 'light', 0, 1px);
}

//
// Popovers/Menus
//
.popup-menu {
  min-width: 15em;
  color: $secondary_fg_color;
  padding: 0 0;
  background: none;
  border-image: none;

  // .popup-menu-arrow { } //defined globally in the TOP BAR

  .popup-menu-content {
    padding: 6px 0;
    margin: 0 6px;
    color: $secondary_fg_color;
    @extend %theme_dialogs;
  }

  .popup-menu-item {
    spacing: 12px;
    padding: 6px;
    margin: 0;
    border-radius: 0;
    color: $secondary_fg_color;
    // transition-duration: 0s;

    &:ltr { padding-right: 1.75em; padding-left: 0; }
    &:rtl { padding-right: 0; padding-left: 1.75em; }

    &:checked {
      color: $secondary_fg_color;
      font-weight: normal;
      box-shadow: inset 0 1px $borders_color;
      border: none;
      border-image: none;
      background-color: if($variant == 'light', rgba(black, 0.05), rgba(black, 0.15));
    }

    &:active, &.selected {
      color: $selected_fg_color;
      background-color: $selected_bg_color;
      border-image: none;
    }

    &:insensitive { color: $insensitive_fg_color; }
  }

  .popup-sub-menu {
    background-color: if($variant == 'light', rgba(black, 0.05), rgba(black, 0.15));
    border-image: none;
    box-shadow: inset 0 -1px $borders_color;
    border: none;
    border-radius: 0;
    margin: 0;
  }

  .popup-inactive-menu-item { //all icons and other graphical elements
    color: $secondary_fg_color;

    &:insensitive { color: $insensitive_fg_color; }
  }

  //.popup-status-menu-item { font-weight: normal;  color: pink; } //dunno what that is
  &.panel-menu {
    -boxpointer-gap: 4px;
    margin-bottom: 1.75em;
  }
}

.popup-menu-ornament {
  text-align: right;
  width: 16px;
  height: 16px;
}

.popup-menu-boxpointer {
  -arrow-border-radius: 2px;
  -arrow-background-color: transparent;
  -arrow-border-width: 1px;
  -arrow-border-color: transparent;
  -arrow-base: 0;
  -arrow-rise: 0;
  border: 0 none transparent;

  StEntry, .search-entry {
    caret-color: $fg_color;
  }
}

.popup-separator-menu-item {
  background: none;
  border: none;
  padding: 0;

  .popup-separator-menu-item-separator {
    height: 1px;
    background-color: $borders_color;
    padding: 0 0;
    margin: 0 40px;

    .popup-sub-menu & { //submenu separators
      padding: 0 0;
      margin: 0 40px 0 0;
    }
  }
}

// a little unstructured mess:

.system-switch-user-submenu-icon.user-icon {
  icon-size: 20px;
  padding: 0 2px;
}
.system-switch-user-submenu-icon.default-icon {
  icon-size: 16px;
  padding: 0 4px;
}

#appMenu {
  spinner-image: url("process-working.svg");
  spacing: 4px;

  .label-shadow { color: transparent; }
}

// system status popover menu
.aggregate-menu {
  min-width: 21em;

  // lock screen, shutdown, etc. buttons
  .popup-menu-icon {
    padding:0;
    margin: 0 4px;
    -st-icon-style: symbolic;
  }

  .popup-sub-menu .popup-menu-item > :first-child {
    &:ltr { /* 12px spacing + 2*4px padding */
            padding-left: 24px; margin-left: 1em; }
    &:rtl { /* 12px spacing + 2*4px padding */
            padding-right: 24px; margin-right: 1em; }
  }
}

.system-menu-action {
  color: $secondary_fg_color;
  border-radius: 100px; /* wish we could do 50% */
  padding: ($large_size - 16px) / 2;
  border: none;
  -st-icon-style: symbolic; // >= 3.29.90

  &:hover, &:focus {
    background-color: $semi_track_color;
    color: $fg_color;
    border: none;
    padding: ($large_size - 16px) / 2;
  }

  &:active { background-color: $track_color; color: $fg_color; }

  & > StIcon { icon-size: 16px; }
}

// shutdown and other actions in the grid
.system-action-icon {
  background-color: $track_color;
  color: $fg_color;
  border-radius: 99px;
  icon-size: 48px;
}


// Background menu
.background-menu { -boxpointer-gap: 4px; -arrow-rise: 0; }

// Rubberband for select-area screenshots
.select-area-rubberband {
  background-color: transparentize($selected_bg_color, 0.7);
  border: 1px solid $selected_bg_color;
}

// User icon
.user-icon {
  background-size: contain;
  color: $osd_fg_color;
  border-radius: 99px;

  &:hover {
    color: lighten($osd_fg_color,30%);
  }

  & StIcon {
    background-color: transparentize($osd_fg_color,0.95);
    border-radius: 99px;
  }
}

.user-widget.vertical .user-icon {
  icon-size: 128px; // 128px

  & StIcon {
    padding: 20px; // 20px
    padding-top: 18px; // 18 px
    padding-bottom: 22px; // 22px
    width: 88px; height: 88px; // 88px;
  }
}

.user-widget.horizontal .user-icon {
  icon-size: 64px; // 64px

  & StIcon {
    padding: 12px; // 12px
    width: 40; height: 40px; // 40px;
  }
}

//
// OSD
//
.osd-window {
  text-align: center;
  font-weight: bold;
  spacing: 1em;
  margin: 32px;
  min-width: 64px;
  min-height: 64px;

  .osd-monitor-label { @include font(display-2); }

  .level {
    height: 4px;
    border-radius: 3px;
    background-color: $track_color;
    color: $selected_bg_color;

    // For >= 3.29.90
    -barlevel-height: 3px;
    // FIXME: above 'background-color' property rendered correct trough
    // colour already, so keep -background-color style-property transparent
    -barlevel-background-color: rgba(black, 0.15);
    -barlevel-active-background-color: $selected_bg_color;
    -barlevel-overdrive-color: $destructive_color;
    -barlevel-overdrive-separator-width: 3px;
    -barlevel-border-width: 0;
  }

  .level-bar {
    background-color: $selected_bg_color;
    border-radius: 3px;
  }
}

//
// Pad OSD
//
.pad-osd-window {
  padding: 32px;
  background-color: transparentize(#000, 0.2);

  .pad-osd-title-box { spacing: 12px; }
  .pad-osd-title-menu-box { spacing: 6px; }
}

.combo-box-label {
  width: 15em;
}

//
// App Switcher
//
.switcher-popup {
  padding: 8px;
  spacing: 16px;
}

.osd-window,
.resize-popup,
.switcher-list {
  @extend %osd-panel;
}

.switcher-list-item-container { spacing: 8px; }

.switcher-list .item-box {
  padding: 8px;
  border-radius: 2px;
}

.switcher-list .item-box:outlined {
  padding: 8px;
  border: none;
  background-color: $insensitive_track_color;
}

.switcher-list .item-box:selected {
  background-color: $selected_bg_color;
  color: $selected_fg_color;
}

.switcher-list .thumbnail-box {
  padding: 2px;
  spacing: 4px;
}

.switcher-list .thumbnail {
  width:  256px;
}

.switcher-list .separator {
  width: 1px;
  background: $borders_color;
}

.switcher-arrow {
  border-color: rgba(0,0,0,0);
  color: $tertiary_fg_color;
  &:highlighted {
    color: $fg_color;
  }
}

.input-source-switcher-symbol {
  @include font(display-2);
  width: 96px;
  height: 96px;
}

// Window cycler highlight
.cycler-highlight {
  border: 5px solid $selected_bg_color;
}

// Workspace Switcher
.workspace-switcher-group { padding: 8px; }

.workspace-switcher-container {
  @extend %osd-panel;
}

.workspace-switcher {
  background: transparent;
  border: 0px;
  border-radius: 0px;
  padding: 0px;
  spacing: 8px;
}

.ws-switcher-active-up, .ws-switcher-active-down {
  height: 48px;
  background-color: $selected_bg_color;
  color: $selected_fg_color;
  background-size: 32px;
  border-radius: 2px;
}

.ws-switcher-box {
  height: 48px;
  border: none;
  background: $insensitive_track_color;
  border-radius: 2px;
}

%osd-panel {
  color: $fg_color;
  background-color: $base_color;
  border: none;
  box-shadow: $z-depth-4;
  border-radius: 2px;
  padding: 12px;
}

// Tiled window previews
.tile-preview {
  background-color: scale-alpha($secondary_selected_bg_color, $lower_opacity);
  border: 1px solid $secondary_selected_bg_color;
}

  .tile-preview-left.on-primary {
    border-radius: $panel-corner-radius $panel-corner-radius 0 0;
  }

  .tile-preview-right.on-primary {
    border-radius: 0 $panel-corner-radius 0 0;
  }

  .tile-preview-left.tile-preview-right.on-primary {
    border-radius: $panel-corner-radius $panel-corner-radius 0 0;
  }

//
// TOP BAR
//
#panel {
  background-color: $topbar_color;
  font-weight: bold;
  height: $menuitem_size;
  box-shadow: none;

  &:overview,
  &.unlock-screen,
  &.login-screen,
  &.lock-screen {
    background-color: transparent;

    .panel-corner {
      -panel-corner-radius: 0;
      -panel-corner-background-color: transparent;
      -panel-corner-border-color: transparent;
    }
  }

  #panelLeft, #panelCenter { // spacing between activities<>app menu and such
    spacing: 0;
  }

  .panel-corner {
    -panel-corner-radius: $panel-corner-radius;
    -panel-corner-background-color: $bg_color;
    -panel-corner-border-width: 2px;
    -panel-corner-border-color: transparent;

    &:active, &:overview, &:focus {
      -panel-corner-border-color: $selected_fg_color;
    }

    &.lock-screen, &.login-screen, &.unlock-screen {
      -panel-corner-radius: 0;
      -panel-corner-background-color: transparent;
      -panel-corner-border-color: transparent;
    }
  }

  .panel-button {
    -natural-hpadding: 8px;
    -minimum-hpadding: 8px;
    font-weight: bold;
    color: $topbar_secondary_fg_color;
    transition-duration: 0.2s;
    border-radius: 0;
    border: none !important;

    .app-menu-icon {
      -st-icon-style: symbolic;
      margin-left: 0;
      margin-right: 0;
      icon-size: 16px;

      > StIcon {
        padding-left: 4px;
        padding-right: 6px;
      }
    }

    .popup-menu-arrow { width: 0; height: 0; } // Remove panel arrows

    &:hover {
      color: $topbar_fg_color;
      background-color: $topbar_overview_color;
      box-shadow: none;
    }

    &:active, &:overview, &:focus, &:checked {
      // Trick due to St limitations. It needs a background to draw
      // a box-shadow
      background-color: $topbar_active_color;
      box-shadow: inset 0 -2px $primary_color;
      color: $topbar_fg_color;
      border-image: none;

      & > .system-status-icon { icon-shadow: none; }
    }

    &.clock-display {
      border-radius: 0;
      // Move highlight from .panel-button to .clock
      &:hover, &:active, &:overview, &:focus, &:checked {
        .clock { //reset
          background-color: transparent;
          box-shadow: none
        }
      }
    }

    .system-status-icon { @include em(16px); padding: 0 4px; }
    .unlock-screen &,
    .login-screen &,
    .lock-screen & {
      color: $secondary_selected_fg_color;
      &:focus, &:hover, &:active { color: $selected_fg_color; }
    }
  }

  .panel-status-indicators-box,
  .panel-status-menu-box {
    spacing: 2px;
  }

  // spacing between power icon and (optional) percentage label
  .power-status.panel-status-indicators-box {
    spacing: 0;
  }

  .screencast-indicator { color: $error_color; }
  .remote-access-indicator { color: $warning_color; } // > 3.29.4

  &.solid {
    background-color: $topbar_color;
    /* transition from transparent to solid */
    transition-duration: 250ms;
    background-gradient-direction: none; // for Ubuntu session
    text-shadow: none; // for Ubuntu session

    &:overview { background-color: transparent; } // for Ubuntu session

    .panel-corner {
      -panel-corner-background-color: $topbar_color;
    }

    .panel-button {
      color: $topbar_secondary_fg_color;
      text-shadow: none;

      &:hover, &:active, &:overview, &:focus, &:checked {
        color: $topbar_fg_color;
      }
    }
  }
}

// Date/Time Menu
.clock-display-box {
  spacing: 3px;

  .clock {
    padding-left: 6px;
    padding-right: 6px;
  }
}


// calendar popover
#calendarArea {
  padding: 10px 0;
}

.datemenu-today-button {
  padding: 8px;
  box-shadow: none;
  background: none;
  text-shadow: none;
  border: none;
  border-radius: 3px;

  // weekday label
  .day-label {
    @include font(title);
    font-weight: bold;
  }

  // date label
  .date-label {
    @include font(headline);
  }

  &:hover, &:focus {
    color: $fg_color;
    background-color: $semi_track_color;
  }

  &:active {
    color: $fg_color;
    background-color: $track_color;
  }
}

.calendar {
  border: none;
  box-shadow: none;
  background: none;
  padding: 6px;
  margin: 0;
  text-shadow: none;
}

// pane-separator between messages and calendar
.datemenu-calendar-column {
  spacing: 6px;
  border: 0 solid $borders_color;
  padding: 0 12px;

  &:ltr { margin-right: 8px; border-left-width: 1px; }
  &:rtl { margin-left: 8px; border-right-width: 1px; }

  // .datemenu-displays-section { padding-bottom: 0; }

  .datemenu-displays-box {
    spacing: 6px;
  }
}

.calendar-month-label {
  height: $menuitem_size - 4px * 2;
  margin: 2px;
  padding: 6px;
  border-radius: 3px;
  color: $fg_color;
  font-weight: bold;
  text-align: center;
  text-shadow: none;
}

.pager-button {
  width: $menuitem_size;
  height: $menuitem_size;
  margin: 2px;
  border-radius: 1000px;
  background-color: transparent;
  color: $fg_color;
  &:hover, &:focus { background-color: $semi_track_color; }
  &:active { background-color: $track_color; }
}

.calendar-change-month-back { //arrow back
  padding: 0 2px;
  background-image: url("assets/calendar-arrow-left.svg");
  &:rtl { background-image: url("assets/calendar-arrow-right.svg"); }
}

.calendar-change-month-forward { //arrow foreward
  padding: 0 2px;
  background-image: url("assets/calendar-arrow-right.svg");
  &:rtl { background-image: url("assets/calendar-arrow-left.svg"); }
}

// prev/next month icons
.calendar-change-month-back StIcon,
.calendar-change-month-forward StIcon {
  icon-size: 16px;
}

.calendar-day-base {
  @include font(caption);
  text-align: center;
  text-shadow: none;
  width: $menuitem_size;
  height: $menuitem_size;
  padding: 0 0;
  margin: 4px;
  border-radius: 100px;
  color: $secondary_fg_color;
  border: none;
  font-feature-settings: "tnum";

  &:hover, &:focus { background-color: $semi_track_color; }

  &:active, &:selected {
    color: $fg_color;
    background-color: $semi_track_color;
    border-color: transparent; //avoid jumparound due to today
  }

  &.calendar-day-heading {  //day of week heading
    margin-top: 1em;
    border-radius: 1000px;
    background-color: transparent;
    color: $tertiary_fg_color;
    @include font(caption);
    font-weight: bold;
    text-align: center;
    text-shadow: none;
  }
}

.calendar-day { //border collapse hack - see calendar.js
  border-width: 0;
}

.calendar-day-top { border-top-width: 0; }
.calendar-day-left { border-left-width: 0; }
// .calendar-work-day { }

.calendar-nonwork-day {
  color: $fg_color;
}

.calendar-today {
  font-weight: bold;
  color: $selected_fg_color;
  background-color: $selected_bg_color;
  border: none;

  &:hover, &:focus {
    background-color:lighten($selected_bg_color, 3%);
    color: $selected_fg_color;
  }

  &:active, &:selected {
    background-color: $selected_bg_color;
    color: $selected_fg_color;

    &:hover, &:focus {
      background-color:lighten($selected_bg_color, 3%);
      color: $selected_fg_color;
    }
  }
}

.calendar-day-with-events {
  background-image: url("assets/calendar-today.svg");
  &.calendar-work-day {
     color: $tertiary_fg_color;
     font-weight: bold;
  }
}

.calendar-other-month-day {
  color: $insensitive_fg_color;
  opacity: 0.5;
  text-shadow: none;
}

.calendar-week-number {
  height: 1.8em;
  width: 2.6em;
  border-radius: 3px;
  margin: 6px 6px 6px 0;
  background-color: if($variant == 'light', rgba(black, 0.04), rgba(white, 0.03));
  color: $tertiary_fg_color;
  font-size: 7pt;
  font-size: inherit;
  font-weight: bold;
  text-align: center;
  text-shadow: none;
}

// butons under calendar
.world-clocks-button,
.weather-button,
.events-button {
  padding: 12px;
  margin: 2px 0;
  border-radius: 3px;
  border: none;
  box-shadow: none;
  background-color: if($variant == 'light', rgba(black, 0.04), rgba(white, 0.03));
  color: $secondary_fg_color;
  text-shadow: none;

  &:hover, &:focus {
    background-color: $semi_track_color;
    text-shadow: none;
  }

  &:active {
    background-color: $track_color;
  }
}

.world-clocks-header,
.weather-header,
.message-list-section-title,
.events-section-title,
.events-title {
  color: $tertiary_fg_color;
  font-weight: bold;
  text-shadow: none;
}

.weather-grid,
.world-clocks-grid {
  spacing-rows: 8px;
  spacing-columns: 16px;
}

// World clocks
.world-clocks-button {
  .world-clocks-city {
    color: $tertiary_fg_color;
    font-weight: normal;
    font-size: 11pt;
  }

  .world-clocks-time {
    color: $tertiary_fg_color;
    font-feature-settings: "tnum";
    font-weight: bold;
    font-size: 11pt;

    &:ltr { text-align: right; }
    &:rtl { text-align: left; }
  }

  .world-clocks-timezone {
    color: $tertiary_fg_color;
    font-feature-settings: "tnum";
    font-size: 10pt;
  }
}

// Weather
.weather-button {
  .weather-box {
    spacing: 12px;
  }

  .weather-header-box {
    spacing: 8px;
  }

  .weather-header.location {
    font-size: 10pt;
    font-weight: normal;
    color: $tertiary_fg_color;
  }

  .weather-forecast-time {
    color: $tertiary_fg_color;
    font-feature-settings: "tnum";
    font-weight: normal;
    font-size: 9pt;
    padding-top: 0.2em;
    padding-bottom: 0.4em;
  }

  .weather-forecast-icon {
    icon-size: 32px;
  }

  .weather-forecast-temp {
    font-weight: bold;
  }
}

// Events
.events-button {
  .events-box {
    spacing: 6px;
  }

  .events-list {
    spacing: 12px;
    text-shadow: none;
  }

  .events-title {
    margin-bottom: 4px;
  }

  .event-time {
    color: $insensitive_fg_color;
    font-feature-settings: "tnum";
    font-size: 10pt;
  }
}

// Message list
.message-list {
  width: 31.5em;
  padding: 0 8px;

  .message-list-placeholder { spacing: 12px; }
}

.message-list-sections {
  spacing: 6px;
  margin: 0 16px; // to account for scrollbar
}

.message-list-section-list {
  spacing: 6px;
}

.message-list-section-close > StIcon {
  icon-size: 16px;
  border-radius: 16px;
  padding: ($menuitem_size - 16px) / 2;
  color: $secondary_fg_color;
  background-color: transparent;
}

// FIXME: how do you do this in sass?
.message-list-section-close:hover > StIcon,
.message-list-section-close:focus > StIcon {
  color: $fg_color;
  background-color: $semi_track_color;
}

.message-list-section-close:active > StIcon {
  color: $fg_color;
  background-color: $track_color;
}

// do-not-disturb + clear button
.message-list-controls {
  margin: 8px 16px 0;
  // NOTE: remove the padding if notification_bubble could remove margin for drop shadow
  padding: 4px;
  spacing: 16px;
}

.message {
  min-height: $menuitem_size * 2;
  margin: 4px;
  background-color: if($variant == 'light', rgba(black, 0.04), rgba(white, 0.03));
  border: none;
  border-radius: 3px;
  color: $secondary_fg_color;
  box-shadow: none;
  text-shadow: none;

  &:hover, &:focus {
    color: $fg_color;
    background-color: $semi_track_color;
  }

  &:active {
    color: $fg_color;
    background-color: $track_color;
  }

  .message-icon-bin {
    margin: 8px 0;
    padding: 8px 0px 8px 8px;
    &:rtl { padding: 8px 8px 8px 0px; }

    > StIcon {
      icon-size: 32px;
      -st-icon-style: symbolic;
    }

    > .fallback-app-icon,
    > .fallback-window-icon {
      width: 16px;
      height: 16px;
    }
  }

  .message-secondary-bin {
    color: $tertiary_fg_color;
    padding: 0 8px;
    text-shadow: none;

    > .event-time {
      color: $insensitive_fg_color;
      font-size: 0.7em;
      /* HACK: the label should be baseline-aligned with a 1em label,
               fake this with some bottom padding */
      padding-bottom: 0.13em;
      text-shadow: none;
    }

    > StIcon {
      icon-size: 16px;
    }
  }

  // close button
  .message-close-button {
    color: $secondary_fg_color;
    &:hover, &:active { color: $fg_color; }
  }

  // body
  .message-body {
    color: $secondary_fg_color;
  }

  .message-title {
    min-height: $small_size - 2px;
    padding-top: 2px;
    color: $fg_color;
    font-weight: bold;
    font-size: 1em;
    text-shadow: none;
  }

  .message-content {
    padding: 12px;
    color: $secondary_fg_color;
    font-size: 1em;
    spacing: 4px;
    text-shadow: none;
  }

  .message-content * > StIcon {
    icon-size: 16px;
    border-radius: 16px;
    padding: ($small_size - 16px) / 2;
    color: $secondary_fg_color;
  }

  // FIXME: how do you do this in sass?
  .message-content *:hover > StIcon,
  .message-content *:focus > StIcon {
    color: $fg_color;
    background-color: $semi_track_color;
  }

  .message-content *:active > StIcon {
    color: $fg_color;
    background-color: $track_color;
  }
}

.message-media-control {
  margin: 18px 3px;
  padding: 8px;
  border-radius: 100px;
  color: $secondary_fg_color;
  &:hover, &:focus { color: $fg_color; background-color: $semi_track_color; }
  &:active { color: $fg_color; background-color: $track_color; }
  &:insensitive { color: $insensitive_secondary_fg_color; }

  &:last-child:ltr { margin-right: 16px; padding-right: 8px; }
  &:last-child:rtl { margin-left: 16px; padding-left: 8px; }
}

.media-message-cover-icon {
  icon-size: 32px !important;

  &.fallback {
    icon-size: 32px !important;
    border: none;
    border-radius: 5px;
    background-color: $semi_track_color;
    color: $tertiary_fg_color;
  }
}

//Activities Ripples
.ripple-box {
  width: 48px;
  height: 48px;
  border-radius: 0 0 48px 0;
  background-color: rgba($primary_color, 0.35);
  background-image: none;
  background-size: auto;
}

.ripple-box:rtl {
  border-radius: 0 0 0 48px;
  background-image: none;
}

// Pointer location
.ripple-pointer-location {
  width: 50px;
  height: 50px;
  border-radius: 25px; // radius equals the size of the box to give us the curve
  background-color: lighten(transparentize($selected_bg_color, 0.7), 30%);
  box-shadow: 0 0 2px 2px lighten($selected_bg_color, 20%);
}

// Pointer accessibility notifications
.pie-timer {
  width: 60px;
  height: 60px;
  -pie-border-width: 3px;
  -pie-border-color: $selected_bg_color;
  -pie-background-color: lighten(transparentize($selected_bg_color, 0.7), 40%);
}

// not really top bar only
.popup-menu-arrow { width: 16px; height: 16px; }
.popup-menu-icon { @include em(16px); }

//close buttons

.window-close {
  background-size: 26px;
  height: 26px;
  width: 26px;
  -shell-close-overlap: 10px;
  border-radius: 100px;
  border: 0 none transparent;
  background-color: transparent;
  color: transparent;
  box-shadow: none;
  StIcon { icon-size: 26px; } // for safety
  background-image: url("assets/window-close.svg");

  &:hover {
    background-size: 26px;
    height: 26px;
    width: 26px;
    background-image: url("assets/window-close-hover.svg");
  }

  &:active {
    background-size: 26px;
    height: 26px;
    width: 26px;
    background-image: url("assets/window-close-active.svg");
  }
}

//
// NETWORK DIALOGS
//
.nm-dialog {
  max-height: 500px;
  min-height: 450px;
  min-width: 470px;
}

.nm-dialog-content {
  spacing: 20px;
  padding: 24px;
}
.nm-dialog-header-hbox { spacing: 10px; }
.nm-dialog-airplane-box { spacing: 12px; }

.nm-dialog-airplane-headline {
  font-weight: bold;
  text-align: center;
}

.nm-dialog-airplane-text { color: $fg_color; }
.nm-dialog-header-icon { icon-size: 32px; }
.nm-dialog-scroll-view {
  border: 1px solid $borders_color;
  padding: 0;
  background-color: darken($base_color, 3%);
  border-radius: 2px;
}
.nm-dialog-header { @include font(title); }

.nm-dialog-item {
  font-size: 1em;
  border-bottom: none;
  border-radius: 2px;
  padding: 12px;
  spacing: 20px;
  &:hover, &:focus { background-color: $semi_track_color; }
  &:active { background-color: $track_color; }
}

.nm-dialog-item:selected {
  background-color: $selected_bg_color;
  color: $selected_fg_color;
}

.nm-dialog-icons { spacing: .5em; }
.nm-dialog-icon { icon-size: 16px; }
.no-networks-label { color: $tertiary_fg_color; }
.no-networks-box { spacing: 12px; }

//
// OVERVIEW
//
#overview {
  spacing: 24px;
  StScrollBar { @extend %overview_scrollbar; }

  //.app-display { spacing: 20px; }

  .app-view-controls { //favorties | all toggle container
    width: 320px;
    padding-bottom: 32px;
  }

  .app-view-control { //favorties | all toggle button
    padding: 0 16px;
    margin: 0;
    font-weight: bold;
    color: $secondary_selected_fg_color;
    background-color: rgba(white, 0.10);
    border: 1px solid rgba(black, 0.8);

    &:hover {
      color: $selected_fg_color;
      background-color: rgba(white, 0.15);
      box-shadow: none;
    }
    &:active {
      color: $selected_fg_color;
      background-color: $selected_bg_color;
      border: 1px solid rgba(black, 0.8);
      box-shadow: none;
    }
    &:checked {
      color: $selected_fg_color;
      background-color: $selected_bg_color;
      border: 1px solid rgba(black, 0.8);
      box-shadow: none;
    }
    &:first-child {
      border-right-width: 0;
      border-radius: 2px 0 0 2px;
      &:checked { border-radius: 2px 0 0 2px; }
    }
    &:last-child {
      border-left-width: 0;
      border-radius: 0 2px 2px 0;
      &:checked { border-radius: 0 2px 2px 0; }
    }
  }
}

.overview-controls {
  padding-bottom: 32px;
}

.window-picker { //container around window thumbnails
  -horizontal-spacing: 32px;
  -vertical-spacing: 32px;
  padding-left: 32px;
  padding-right: 32px;
  padding-bottom: 48px;

  &.external-monitor { padding: 32px; }
}

.window-clone-border {
  border: 4px solid scale-alpha($selected_bg_color, 0.7);
  border-radius: 2px;
  // For window decorations with round corners we can't match
  // the exact shape when the window is scaled. So apply a shadow
  // to fix that case
  box-shadow: inset 0 0 0 1px scale-alpha($selected_bg_color, 0.7);
}

.window-caption {
  spacing: 25px;
  color: $selected_fg_color;
  background-color: scale-alpha(black, 0.5);
  border-radius: 2px;
  padding: 4px 8px;
  -shell-caption-spacing: 12px;
  border: none;
  font-weight: normal;
  @include font(body);
  &:hover { background-color: scale-alpha($selected_bg_color, 0.8); color: $selected_fg_color; }
}

//search entry
.search-entry {
  width: 320px;
  padding: 0 8px;
  border-radius: 1000px;
  color: $entry_color;
  caret-color: $entry_color;
  background-color: rgba(white, 0.10);
  box-shadow: none;
  border: 1px solid rgba(black, 0.8);
  text-shadow: none;

  &:hover {
    .search-entry-icon { color: $entry_hover_color; }
    box-shadow: none;
    background-color: rgba(white, 0.15);
  }

  &:focus {
    padding: 0 8px;
    color: $entry_hover_color;
    background-color: rgba(white, 0.10);
    box-shadow: none;
    border: 1px solid $selected_bg_color;
  }

  &:insensitive {
    color: $insensitive_secondary_selected_fg_color;
    box-shadow: none;
    border: 1px solid rgba(black, 0.45);

    StLabel.hint-text,
    .search-entry-icon {
      color: $insensitive_secondary_selected_fg_color;
    }
  }

  StLabel.hint-text {
    margin-left: 2px;
    color: transparentize($entry_color, 0.3);
  }

  .search-entry-icon { icon-size: 16px; padding: 0 0; color: $entry_color; }
}

//
//search results
//
#searchResultsContent {
  max-width: 1024px;
  spacing: 8px;
}

.search-statustext { // "no results"
  @extend %status_text;
}

.list-search-results { spacing: 3px; }

.search-section-separator {
  height: 0;
  background-color: transparent;
}

.search-provider-icon-more {
  width: 16px;
  height: 16px;
  background-image: url("assets/more-results.svg");
}

// search results sections "the boxes"
.search-section {
  // This should be equal to #searchResultsContent spacing
  spacing: 16px;

  // separator
  .search-section-separator {
    height: 0;
    background-color: transparent;
  }
}

// content
.search-section-content {
  background-color: $overview_bg_color;
  border-radius: 3px;
  border: none;
  box-shadow: none;
  text-shadow: none;
  color: $selected_fg_color;
  padding: 18px;
  // This is the space between the provider icon and the results container
  spacing: 8px;
}

%search-section-content-item {
  @extend %icon_tile;
  transition-duration: 0ms;

  &:focus,
  &:hover,
  &:selected {
    background-color: $selected_fg_color;
    transition-duration: 200ms;
  }

  &:active,
  &:checked {
    background-color: $overview_bg_color;
  }
}

// "no results" text
.search-statustext {
  @extend %status_text;
}

.grid-search-results {
  spacing: 36px;
}

// search result provider
.search-provider-icon {
  @extend %search-section-content-item;

  // content
  .list-search-provider-content {
    spacing: 12px;

    // provider labels
    .list-search-provider-details {
      width: 120px;
      margin-top: 0;
      color: darken($selected_fg_color, 8%);
      // font-weight: bold;
    }
  }
}

// search results list
.list-search-results {
  spacing: 6px;
}

// search result listitem
.list-search-result {
  @extend %search-section-content-item;

  // content
  .list-search-result-content {
    spacing: 6px;
  }

  // list item title (with leading icon)
  .list-search-result-title {
    spacing: 8px;
    font-weight: bold;
    font-size: 1em;
  }

  // list item description
  .list-search-result-description {
    color: $secondary_selected_fg_color;
  }
}

//
// DASHBOARD
//
#dash {
  font-size: 1em;
  color: $selected_fg_color;
  background-color: $overview_bg_color;
  padding: 3px 0;
  border: none;
  border-left: 0px;
  border-radius: 0px 2px 2px 0px;

  &:rtl {
    border-radius: 2px 0 0 2px;
  }

  .placeholder {
    background-image: url("assets/dash-placeholder.svg");
    background-size: contain;
    height: 24px;
  }

  .empty-dash-drop-target {
    width: 24px;
    height: 24px;
  }
}

.dash-item-container > StWidget {
  padding: 3px 6px;
}

.dash-label { //osd tooltip
  // min-height: 32px - 6px * 2;
  border-radius: 3px;
  padding: 6px 10px;
  color: white;
  background-color: rgba(black, 0.75);
  box-shadow: none;
  text-align: center;
  -x-offset: 8px;
}

// App Vault/Grid
.icon-grid {
  // spacing: 30px;
  // -shell-grid-horizontal-item-size: 136px;
  // -shell-grid-vertical-item-size: 136px;

  row-spacing: 36px;
  column-spacing: 36px;
  max-row-spacing: 72px;
  max-column-spacing: 72px;

  // .overview-icon { icon-size: 96px; }
}

//Icon tile
.search-provider-icon,
.list-search-result {
  @extend %icon_tile;
  &:focus, &:selected, &:hover {
    background-color: $selected_semi_track_color;
    transition-duration: 0s;
  }
  &:active, &:checked {
    background-color: $selected_track_color;
    transition-duration: 0.2s;
  }
}
.app-well-app,
.show-apps,
.grid-search-result {
  & .overview-icon {
    @extend %icon_tile;
  }
  &:hover .overview-icon,
  &:focus .overview-icon,
  &:selected .overview-icon {
    background-color: $selected_semi_track_color;
    transition-duration: 0s;
    border-image: none;
    background-image: none;
  }
  &:active .overview-icon,
  &:checked .overview-icon {
    background-color: $selected_track_color;
    box-shadow: $z-depth-0;
    transition-duration: 0.2s;
  }
}

.app-well-app-running-dot { //running apps indicator
  width: 16px; height: 2px;
  background-color: $selected_track_color;
  margin-bottom: 0;
  border-radius: 0;
}

StWidget.focused .app-well-app-running-dot {
  width: 24px;
  background-color: $selected_bg_color;
}

%icon_tile {
  color: $selected_fg_color;
  border-radius: 3px;
  padding: 6px;
  border: none;
  transition-duration: 100ms;
  text-align: center;
}

.app-well-app.app-folder > .overview-icon {
  background-color: $overview_bg_color;
}

.show-apps .show-apps-icon {
  color: $secondary_selected_fg_color;
}

.show-apps:hover .show-apps-icon,
.show-apps:active .show-apps-icon,
.show-apps:checked .show-apps-icon,
.show-apps:focus .show-apps-icon {
  color: $selected_fg_color;
  transition-duration: 0.2s;
}

// Collections
.app-folder-popup { //expanded collection
  -arrow-border-radius: 2px;
  -arrow-background-color: $overview_bg_color;
  -arrow-base: 24px;
  -arrow-rise: 12px;
}

.app-folder-popup-bin { padding: 5px; }

.app-folder-icon {
  padding: 6px;
  spacing-rows: 6px;
  spacing-columns: 6px;
}

.page-indicator {
  padding: 15px 20px;

  .page-indicator-icon {
    width: 12px;
    height: 12px;
    border-radius: 12px;
    margin: 0;
    padding: 0;
    background-image: none;
    color: transparent;
    border: none;
    box-shadow: none;
    background-color: scale-alpha($selected_fg_color, $lower_opacity);
  }
  &:hover .page-indicator-icon {
    margin: 0;
    padding: 0;
    background-image: none;
    color: transparent;
    border: none;
    box-shadow: none;
    background-color: scale-alpha($selected_fg_color, $middle_opacity);
  }
  &:active .page-indicator-icon, &:checked .page-indicator-icon {
    margin: 0;
    padding: 0;
    background-image: none;
    color: transparent;
    border: none;
    box-shadow: none;
    background-color: scale-alpha($selected_fg_color, $hint_opacity);
    transition-duration: 0s;
  }
  &:checked:active {
    background-image: none;
  }
}

.no-frequent-applications-label { @extend %status_text; }

.app-well-app .overview-icon.overview-icon-with-label,
.grid-search-result .overview-icon.overview-icon-with-label { // Search results with icons
  padding: 10px 8px 5px 8px;
  // spacing: 6px;

  > StBoxLayout {
    spacing: 6px;
  }
}

// App Folders
.app-folder {
  background: none;

  .overview-icon {
    background-color: rgba(white, 0.15);
    border-radius: 3px;
  }

  &:hover .overview-icon {
    background-color: rgba(white, 0.2);
  }
}

// expanded folder
.app-folder-dialog {
  border-radius: 12px;
  border: none;
  spacing: 6px;
  padding: 0;
  background-color: rgba($topbar_color, 0.95);
  border: 2px solid rgba(white, 0.15);

  & .folder-name-container {
    padding: 24px 36px 0;
    spacing: 12px;

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

    & .folder-name-entry {
      @extend .search-entry;
    }

    /* FIXME: this is to keep the label in sync with the entry */
    & .folder-name-label { padding: 5px 7px; color: $selected_fg_color; }

    & .edit-folder-button {
      background-color: $overview_bg_color;
      color: $selected_fg_color;
      border: none;
      background-image: none;
      padding: 0;
      width: 36px;
      height: 36px;
      border-radius: 1000px;

      & > StIcon { icon-size: 16px }

      &:hover { background-color: rgba(white, 0.15); background-image: none; }
      &:checked, &:active { background-color: rgba(white, 0.25); background-image: none; }
    }
  }

  & .icon-grid {
    row-spacing: 12px;
    column-spacing: 30px;
  }

  & .page-indicators {
    margin-bottom: 18px;

    .page-indicator {
      padding: 15px 12px;
    }
  }

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

.app-folder-dialog-container {
  padding: 6px;
  width: 600px;
  height: 600px;
}

// Rename popup for app folders
.rename-folder-popup {
  .rename-folder-popup-item {
    spacing: 6px;
    &:ltr, &:rtl { padding: 0 12px; }
  }
}

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

// Workspace pager
.workspace-thumbnails { //container ala dash
  @extend %overview-panel;
  visible-width: 32px; //amount visible before hover
  spacing: 12px;
  padding: 12px;
  border-radius: 2px 0 0 2px;
  //border-width: 0; //fixme: can't have non unoform borders :(
  &:rtl { border-radius: 0 2px 2px 0;}
}

.workspace-thumbnail-indicator {
  border: 0 solid $selected_bg_color;
  border-left-width: 2px;
  padding: 6px;
  border-radius: 0;
}

%overview-panel {
  color: $selected_fg_color;
  background-color: $overview_bg_color;
  border: none;
}

%status_text {
  font-size: 2em;
  font-weight: bold;
  color: $tertiary_selected_fg_color;
}

//
// NOTIFICATIONS & MESSAGE TRAY
//
.url-highlighter { link-color: $link_color; }

// Banners
.notification-banner {
  font-size: 1em;
  width: 34em;
  min-height: $menuitem_size * 2;
  margin: 5px;
  border-radius: 2px;
  color: $fg_color;
  background-color: $base_color;
  border: none;
  box-shadow: $z-depth-2;

  &:hover { background-color: $base_color; }
  &:focus { background-color: $base_color; }

  .notification-icon { padding: 5px; }
  .notification-content { padding: 5px; spacing: 5px; }
  .secondary-icon { icon-size: em(16px); }
  .notification-actions {
    background-color: transparent;
    padding-top: 0;
    border-top: 1px solid $borders_color;
    spacing: 1px;
  }
  .notification-button {
    min-height: 40px;
    padding: 0 16px;
    background-color: transparent;
    color: $secondary_fg_color;
    font-weight: 500;
    border-width: 0;
    &:first-child { border-radius: 0 0 0 2px; }
    &:last-child { border-radius: 0 0 2px 0; }
    &:hover, &:focus:hover { background-color: $semi_track_color; color: $fg_color; }
    &:focus { background-color: transparent; box-shadow: none; }
    &:active { background-color: $track_color; color: $fg_color; }
  }
}
.summary-source-counter {
  font-size: 1em;
  font-weight: bold;
  height: 1.6em; width: 1.6em;
  -shell-counter-overlap-x: 3px;
  -shell-counter-overlap-y: 3px;
  background-color: $selected_bg_color;
  color: $selected_fg_color;
  border: 2px solid $selected_fg_color;
  box-shadow: 0 2px 2px rgba(0,0,0,0.5);
  border-radius: 0.9em; // should be 0.8 but whatever; wish I could do 50%;
}

.secondary-icon { @include em(16px); }

//chat bubbles
.chat-body { spacing: 5px; }
.chat-response { margin: 5px; }
.chat-log-message { color: $fg_color; }
.chat-new-group { padding-top: 1em; }
.chat-received {
  padding-left: 4px;
  &:rtl { padding-left: 0px; padding-right: 4px; }
}
.chat-sent {
  padding-left: 18pt;
  color: $secondary_fg_color;
  &:rtl { padding-left: 0; padding-right: 18pt; }
}
.chat-meta-message {
  padding-left: 4px;
  @include font(caption);
  color: $tertiary_fg_color;
  &:rtl { padding-left: 0; padding-right: 4px; }
}

//hotplug
.hotplug-transient-box {
  spacing: 6px;
  padding: 2px 72px 2px 12px;
}

.hotplug-notification-item {
  padding: 2px 10px;
  &:focus { padding: 1px 71px 1px 11px; }
}

.hotplug-notification-item-icon {
  icon-size: 24px;
  padding: 2px 5px;
}

.hotplug-resident-box { spacing: 8px; }

.hotplug-resident-mount {
  spacing: 8px;
  border-radius: 2px;
  &:hover { background-color: $semi_track_color; }
  &:active { background-color: $track_color; }
}

.hotplug-resident-mount-label {
  color: inherit;
  padding-left: 6px;
}

.hotplug-resident-mount-icon {
  icon-size: 24px;
  padding-left: 6px;
}

.hotplug-resident-eject-icon {
  icon-size: 16px;
}

.hotplug-resident-eject-button {
  padding: 7px;
  border-radius: 2px;
  color: $fg_color;
}

//
// Eeeky things
//

$legacy_icon_size: 24px;

.legacy-tray {
  background-color: $bg_color;
  color: $selected_fg_color;
  border: none;
  border-bottom-width: 0;
  &:ltr { border-radius: 0 2px 0 0; border-left-width: 0; }
  &:rtl { border-radius: 2px 0 0 0; border-right-width: 0; }
}

.legacy-tray-handle,
.legacy-tray-icon {
  padding: 6px;
  & StIcon { icon-size: $legacy_icon_size; }
  &:hover,&:focus { background-color: $selected_semi_track_color; }
  &:active { background-color: $selected_track_color; }
}

.legacy-tray-icon-box {
  spacing: 12px;
  &:ltr { padding-left: 12px; }
  &:rtl { padding-right: 12px; }
  & StButton { width: $legacy_icon_size; height: $legacy_icon_size }
}

//magnifier

.magnifier-zoom-region {
  border: 2px solid $selected_bg_color;
  &.full-screen { border-width: 0; }
}

//
//Keyboard
//
.word-suggestions {
  font-size: 14pt;
  spacing: 12px;
  min-height: 20pt;
}

$key_bg_color: lighten($topbar_color, 15%);

#keyboard {
  background-color: rgba(#101010, 0.95);
  box-shadow: none;

  .page-indicator {
    padding: 6px;

    .page-indicator-icon {
      width: 8px;
      height: 8px;
    }
  }
}

// the container for individual keys
.key-container,
.keyboard-layout {
  padding: 4px;
  spacing: 4px;
}

.keyboard-key {
  min-height: 2em;
  min-width: 2em;
  font-size: 14pt;
  font-weight: bold;
  border-radius: 3px;
  border: none;
  color: $selected_fg_color;
  background-color: $key_bg_color;
  box-shadow: inset 0 -1px rgba(black, 0.75);
  &:focus, &:hover { color: $selected_fg_color; background-color: $accent_bg_color; }
  &:checked, &:active { color: $selected_fg_color; background-color: darken($accent_bg_color, 6%); }
  &:grayed { //FIXME
    background-color: $key_bg_color;
    color: $selected_fg_color;
  }

  // &.default-key { background-size: 20px; } // backspace button
  &.default-key,
  &.enter-key,
  &.shift-key-lowercase,
  &.shift-key-uppercase,
  &.hide-key,
  &.layout-key {
    background-color: darken($key_bg_color, 10%);
    box-shadow: inset 0 -1px rgba(black, 0.75);
    &:focus, &:hover { color: $selected_fg_color; background-color: $key_bg_color; }
    &:checked, &:active { color: $selected_fg_color; background-color: darken($key_bg_color, 6%); }
  }
  &.enter-key {
    background-color: $primary_color;
    // background-image: url("assets/key-enter.svg");
    &:focus, &:hover { color: $selected_fg_color; background-color: lighten($primary_color, 5%); }
    &:checked, &:active { color: $selected_fg_color; background-color: darken($primary_color, 10%); }
  }

  StIcon { icon-size: 1.125em; }
}

.keyboard-subkeys { //long press on a key popup
  color: inherit;
  -arrow-border-radius: 3px;
  -arrow-background-color: rgba(black, 0.75);
  -arrow-border-width: 0;
  -arrow-border-color: transparent;
  -arrow-base: 20px;
  -arrow-rise: 10px;
  -boxpointer-gap: 5px;
  box-shadow: 0 3px 3px rgba(black, 0.35);
}

// emoji
.emoji-page {
  .keyboard-key {
    background-color: transparent;
    border: none;
    color: initial;
  }
}

.emoji-panel {
  .keyboard-key:latched {
    border-color: lighten($selected_bg_color, 5%);
    background-color: $selected_bg_color;
  }
}

// suggestions
.word-suggestions {
  spacing: 12px;
  min-height: 20pt;
}

// IBus Candidate Popup

.candidate-popup-boxpointer {
  -arrow-border-radius: 2px;
  -arrow-background-color: transparent;
  -arrow-border-width: 1px;
  -arrow-border-color: transparent;
  -arrow-base: 64px;
  -arrow-rise: 6px;
  border: none;
  border-image: none;
}

.candidate-popup-content {
  padding: 6px;
  spacing: 6px;
  margin: 12px 6px;
  color: $secondary_fg_color;
  @extend %theme_dialogs;
}

.candidate-index {
  padding-top: 3px;
  spacing: 6px;
  color: $tertiary_fg_color;
  font-weight: bold;

  .candidate-box:selected & { color: $tertiary_selected_fg_color; }
}

.candidate-box {
  transition-duration: 0s;
  min-height: $menuitem_size;
  padding: 2px 8px;
  spacing: 0;
  border-radius: 2px;
  margin: 2px;

  StLabel { margin: 3px 0; }

  &:hover { background-color: $semi_track_color; color: $fg_color; }
  &:active { background-color: $track_color; color: $fg_color; }
  &:selected { background-color: $selected_bg_color; color: $selected_fg_color; }
}

.candidate-page-button-box {
  // height: $menuitem_size;
  .vertical & { padding-top: 0; }
  .horizontal & { padding-left: 0; }
}

.candidate-page-button {
  // min-width: $menuitem_size;
  // min-height: $menuitem_size;
  padding: 2px 8px;
  margin: 2px;
}

.candidate-page-button-previous { border-radius: 2px; }
.candidate-page-button-next { border-radius: 2px;  }
.candidate-page-button-icon { @include em(16px); }

/* Auth Dialogs & Screen Shield */

.framed-user-icon {
  background-size: contain;
  border: none;
  color: $selected_fg_color;
  border-radius: 2px;
  &:hover {
    border-color: $selected_fg_color;
    color: $selected_fg_color;
  }
}

// LOGIN DIALOG

.login-dialog-banner-view {
  padding-top: 24px;
  max-width: 23em;
}

.login-dialog,
.unlock-dialog {
  //reset
  background-color: transparent;

  StEntry {
    color: $selected_fg_color;
    caret-color: $selected_fg_color;;
    selection-background-color: $selected_bg_color;
    selected-color: $selected_fg_color;
    border: 1px solid rgba(white, 0.2);
    background-color: rgba(white, 0.1);

    &:focus {
      border: 1px solid $selected_bg_color;
      background-color: rgba(white, 0.1);
      selection-background-color: $selected_bg_color;
      selected-color: $selected_fg_color;
    }

    &:insensitive {
      @include entry(insensitive);
      color: $insensitive_selected_fg_color;
    }
  }

  .modal-dialog-button-box { spacing: 3px; }

  .modal-dialog-button {
    padding: 4px 18px;
    @include button(flat-normal);
    &:hover { @include button(hover); }
    &:focus { @include button(focus); }
    &:active { @include button(flat-active); }
    &:insensitive { @include button(flat-insensitive); }

    &:default {
      @include button(normal);
      &:hover { @include button(hover); }
      &:focus { @include button(focus); }
      &:active { @include button(active); }
      &:insensitive { @include button(insensitive); }
    }
  }

  .cancel-button,
  .switch-user-button,
  .login-dialog-session-list-button {
    padding: 0;
    border-radius: 100px;
    width: 32px;
    height: 32px;
    border: 0 solid transparent;
    background-color: transparentize($bg_color, 0.7);

    &, &:hover, &:active, &:focus {
      border-width: 0;
    }

    StIcon { icon-size: 16px; }
  }

  .login-dialog-message-warning {
    color: $warning_color;
  }
}

// Caps-lock warning
.caps-lock-warning-label {
  text-align: center;
  padding-bottom: 8px;
  color: $warning_color;
}

.login-dialog-logo-bin { padding: 24px 0px; }
.login-dialog-banner { color: $secondary_selected_fg_color; }
.login-dialog-button-box { width: 23em; spacing: 5px; }
.login-dialog-message { text-align: center; }
.login-dialog-message-warning { color: $warning_color; }
.login-dialog-message-hint { padding-top: 0; padding-bottom: 20px; }
.login-dialog-user-selection-box { padding: 100px 0px; }
.login-dialog-not-listed-label {
  padding-left: 2px;
  .login-dialog-not-listed-button:focus &,
  .login-dialog-not-listed-button:hover & {
    color: $selected_fg_color;
  }
}

.login-dialog-not-listed-label {
  font-size: 1em;
  font-weight: bold;
  color: $secondary_selected_fg_color;
  padding-top: 1em;
  &:hover { color: $selected_fg_color; }
  &:focus { background-color: $selected_semi_track_color; }
}

.login-dialog-user-list-view { -st-vfade-offset: 1em; }
.login-dialog-user-list {
  spacing: 12px;
  width: 23em;
  &:expanded .login-dialog-user-list-item:focus { background-color: $selected_semi_track_color; color: $selected_fg_color; }
  &:expanded .login-dialog-user-list-item:hover { background-color: $selected_semi_track_color; color: $selected_fg_color; }
  &:expanded .login-dialog-user-list-item:active { background-color: $selected_track_color; color: $selected_fg_color; }
  &:expanded .login-dialog-user-list-item:logged-in { border-right: 2px solid $selected_fg_color; }
}

.login-dialog-user-list-item {
  border-radius: 3px;
  padding: 6px;
  color: $secondary_selected_fg_color;
  &:ltr .user-widget { padding-right: 1em; }
  &:rtl .user-widget { padding-left: 1em; }
  &:hover { background-color: $selected_semi_track_color; color: $selected_fg_color; }
  &:active { background-color: $selected_track_color; color: $selected_fg_color; }
  .login-dialog-timed-login-indicator {
    height: 2px;
    margin-top: 6px;
    background-color: $selected_fg_color;
  }
  &:focus .login-dialog-timed-login-indicator { background-color: $selected_fg_color; }
}

// .login-dialog-username,
.user-widget-label {
  color: $selected_fg_color;
}

.user-widget.horizontal .user-widget-label {
  // @include font(title);
  font-weight: bold;
  text-align: left;
  padding-left: 15px;

  &:ltr { padding-left: 14px; }
  &:rtl { padding-right: 14px; }
}

.user-widget.vertical .user-widget-label {
  text-align: center;
  font-weight: normal;
  padding-top: 16px;
}

.login-dialog-prompt-entry {
  height: 1.5em;
}

.login-dialog-prompt-layout {
  padding-top: 24px;
  padding-bottom: 12px;
  spacing: 8px;
  width: 23em;
}

.login-dialog-prompt-label {
  color: $tertiary_selected_fg_color;
  font-size: 1em;
  padding-top: 1em;
}

//SCREEN SHIELD

.screen-shield-arrows {
  padding-bottom: 3em;
}

.screen-shield-arrows Gjs_Arrow {
  color: white;
  width: 80px;
  height: 48px;
  -arrow-thickness: 12px;
  -arrow-shadow: $z-depth-1;
}

.screen-shield-clock {
  color: white;
  text-shadow: $z-depth-1;
  font-weight: normal;
  text-align: center;
  padding-bottom: 1.5em;
}

.screen-shield-clock-time {
  @include font(display-4);
  text-shadow: $z-depth-1;
}

.screen-shield-clock-date { @include font(display-2); }

.screen-shield-notifications-container {
  spacing: 6px;
  width: 30em;
  background-color: transparent;
  max-height: 500px;
  .summary-notification-stack-scrollview {
    padding-top: 0;
    padding-bottom: 0;
  }

  .notification,
  .screen-shield-notification-source {
    padding: 8px;
    border: none;
    background-color: $osd_bg_color;
    color: $selected_fg_color;
    border-radius: 2px;
  }
  .notification { margin-right: 16px; } //compensate for space allocated to the scrollbar
}


.screen-shield-notification-label {
  min-height: $small_size - 2px;
  padding: 2px 0px 0px 16px;
  font-weight: bold;
}

.screen-shield-notification-count-text {
  min-height: $small_size - 2px;
  padding: 2px 0px 0px 16px;
  color: $secondary_selected_fg_color;
}

#panel.lock-screen { background-color: $osd_bg_color; }

.screen-shield-background { //just the shadow, really
  background: black;
  box-shadow: $z-depth-5;
}

.unlock-dialog-clock {
  color: white;
  font-weight: 300;
  text-align: center;
  spacing: 24px;
  padding-bottom: 2.5em;
}

.unlock-dialog-clock-time {
  font-size: 64pt;
  padding-top: 42px;
  font-feature-settings: "tnum";
}

.unlock-dialog-clock-date {
  font-size: 16pt;
  font-weight: normal;
}

.unlock-dialog-clock-hint {
  font-weight: normal;
  padding-top: 48px;
}

.unlock-dialog-notifications-container {
  margin: 12px 0;
  spacing: 6px;
  width: 23em;
  background-color: transparent;
  .summary-notification-stack-scrollview {
    padding-top: 0;
    padding-bottom: 0;
  }

  .notification,
  .unlock-dialog-notification-source {
    padding: 12px 6px;
    border: none;
    background-color: transparentize($osd_bg_color,0.7);
    color: $osd_fg_color;
    border-radius: 3px;

    &.critical { background-color: transparentize($osd_bg_color,0.1) }
  }
}

.unlock-dialog-notification-label {
  padding: 0px 0px 0px 12px;
}

.unlock-dialog-notification-count-text {
  weight: bold;
  padding: 0 6px;
  color: $osd_bg_color;
  background-color: transparentize($osd_fg_color, 0.7);
  border-radius: 99px;
  margin-right: 12px;
}

#lockDialogGroup {
  background: lighten($topbar_color, 10%) url("assets/noise-texture.png");
  background-repeat: repeat;
}

#screenShieldNotifications {
  StButton#vhandle, StButton#hhandle {
    background-color: transparentize($bg_color, 0.7);
    &:hover, &:focus { background-color: transparentize($bg_color, 0.5); }
    &:active { background-color: transparentize($selected_bg_color, 0.5); }
  }

  StScrollBar { @extend %overview_scrollbar; }
}

//
// Looking Glass
//
#LookingGlassDialog {
  color: $secondary_fg_color;
  background-color: rgba($base_color, 0.95);
  spacing: 4px;
  padding: 0;
  border: 1px solid $borders_color;
  border-radius: 3px;
  box-shadow: $z-depth-4;

  & > #Toolbar {
    padding: 0 8px;
    border: none;
    border-radius: 0;
    background-color: rgba($base_color, 0.01);
    box-shadow: inset 0 -1px 0 $borders_color;
  }

  .labels { spacing: 0; }

  .notebook-tab {
    -natural-hpadding: 12px;
    -minimum-hpadding: 6px;
    font-weight: bold;
    color: $tertiary_fg_color;
    transition-duration: 0.2s;
    padding-left: 16px;
    padding-right: 16px;
    min-height: $medium_size;
    padding: 0 16px * 2;
    border-bottom-width: 2px;

    &:hover {
      color: $fg_color;
      text-shadow: none;
      box-shadow: inset 0 -2px $track_color;
    }

    &:selected {
      border-bottom-width: 2px;
      border-color: transparent;
      background-color: rgba($base_color, 0.01);
      box-shadow: inset 0 -2px $selected_bg_color;
      color: $fg_color;
      text-shadow: none;
    }
  }

  StBoxLayout#EvalBox { padding: 4px; spacing: 4px; }
  StBoxLayout#ResultsArea { spacing: 4px; }
}

.lg-dialog {
  StEntry {
    selection-background-color: $selected_bg_color;
    selected-color: $selected_fg_color;
  }
  .shell-link {
    color: $link_color;
    &:hover { color: $link_color; }
  }
}

.lg-completions-text {
  font-size: 1em;
  font-style: italic;
}

.lg-obj-inspector-title {
  spacing: 4px;
}

.lg-obj-inspector-button {
  min-height: $medium_size;
  padding: 0 16px;
  border: none;
  border-radius: 2px;
  @include font(button);
  @include button(flat-normal);
  &:hover { @include button(flat-hover); border: none; }
  &:active { @include button(flat-active); }
  &:insensitive { @include button(flat-insensitive); }
  &:focus { @include button(flat-focus); }
}

#lookingGlassExtensions { padding: 4px; }

.lg-extensions-list {
  padding: 4px;
  spacing: 6px;
}

.lg-extension {
  border: none;
  border-radius: 3px;
  padding: 4px;
  background-color: rgba($fg_color, 0.06);
}

.lg-extension-name {
  @include font(headline);
}

.lg-extension-meta {
  spacing: 6px;
}

#LookingGlassPropertyInspector {
  background: $base_color;
  border: 1px solid $borders_color;
  border-radius: 3px;
  padding: 6px;
  box-shadow: none;
}
