//This is the RIGHT PLACE to edit the stylesheet

$panel-corner-radius: 0px;
$asset_path: if($variant == 'dark', dark-assets, light-assets);

/* Copyright 2009, 2015 Red Hat, Inc.
 *
 * Portions adapted from Mx's data/style/default.css
 *   Copyright 2009 Intel Corporation
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU Lesser General Public License,
 * version 2.1, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
 * more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 */

//
// Globals
//
$font-size: 11;
$_bubble_bg_color: opacify($osd_bg_color,0.25);
$_bubble_fg_color: $osd_fg_color;
$_bubble_borders_color: transparentize($osd_fg_color,0.8);
$_shell_fg_color: white;
$_panel_fg_color: $_shell_fg_color;
$_system_bg_color: opacify(desaturate(darken($dark_sidebar_bg, 9%), 5%), 1);

$_popup_shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.19);
$_popup_menu_shadow: if($variant!='dark', 0 1px 3px 2.1px rgba(0, 0, 0, 0.06), $_popup_shadow);

$panel_transition_duration: 250ms;

stage {
  @include fontsize($font-size);
  color: $fg_color;
}

%reset_style {
  background-color: transparent !important;
  background-gradient-direction: none !important;
  border: none !important;
  border-radius: 0 !important;
}

//
// Buttons
//
.button {
  min-height: 20px;
  padding: 5px 32px;
  transition-duration: 0;
  border-radius: 2px;

  @extend %button;
}

%button {
  @include button(normal);

  &:focus { @include button(focus); }
  &:hover { @include button(hover); }
  &:hover:focus { @include button(focus-hover); }
  &:active, &:active:focus { @include button(active); }
  &:insensitive { @include button(insensitive); }
}

%osd_button {
  @include button(osd);

  &:hover { @include button(osd-hover); }
  &:focus { color: $selected_bg_color; }
  &:active { @include button(osd-active); }
  &:insensitive { @include button(osd-insensitive); }
}

//
// Entries
//
StEntry {
  padding: 7px;
  caret-size: 1px;
  caret-color: $fg_color;
  selection-background-color: $selected_bg_color;
  selected-color: $selected_fg_color;
  transition-duration: 300ms;
  border-radius: 3px;

  @include entry(normal);

  &:focus, &:hover { @include entry(focus); }
  &:insensitive { @include entry(insensitive); }

  StIcon.capslock-warning {
    icon-size: 16px;
    warning-color: $warning_color;
    padding: 0 4px;
  }

  StIcon.peek-password {
    icon-size: 16px;
    padding: 0 4px;
  }

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

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

StScrollBar {

  padding: 8px;

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

  StBin#trough {
    background-color: transparentize($base_color, 0.9);
    border-radius: 8px;
  }

  StButton#vhandle, StButton#hhandle {
    border-radius: 4px;
    background-color: mix($fg_color, $bg_color, 40%);
    margin: 0px;

    &:hover { background-color: mix($fg_color, $bg_color, 30%); }

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

//
// Slider
//
.slider {
  -barlevel-height: 4px;
  -barlevel-background-color: $button_border;                   //background of the trough
  -barlevel-border-color: transparentize(black, 1);             //trough border color
  -barlevel-active-background-color: $selected_bg_color;        //active trough fill
  -barlevel-active-border-color: transparentize(black, 1);      //active trough border
  -barlevel-overdrive-color: $warning_color;
  -barlevel-overdrive-border-color: transparentize(black, 1); 
  -barlevel-overdrive-separator-width: 1px;
  -barlevel-border-width: 0;
  -slider-handle-radius: 0px;
  height: 18px;
  border: 0 solid transparent;
  border-right-width: 1px;
  border-left-width: 5px;
  color: $selected_bg_color;

  .popup-menu-item.selected & {
    -barlevel-background-color: transparentize(black, 0.8);
    -barlevel-active-background-color: $selected_fg_color;
    color: $selected_fg_color;
  }
}

//
// Check Boxes
//
.check-box {

  StBoxLayout { spacing: .8em; }

  StBin {
    width: 16px;
    height: 16px;
    background-image: url("#{$asset_path}/checkbox/checkbox-unchecked.svg");
  }

  &:focus StBin { background-image: url("#{$asset_path}/checkbox/checkbox-unchecked-focused.svg"); }

  &:checked StBin { background-image: url("#{$asset_path}/checkbox/checkbox-checked.svg"); }

  &:focus:checked StBin { background-image: url("#{$asset_path}/checkbox/checkbox-checked-focused.svg"); }
}

//
// Switches
//
.toggle-switch {
  width: 50px;
  height: 20px;
  background-size: contain;
  background-image: url("#{$asset_path}/switch/switch-off.svg");

  &:checked { background-image: url("#{$asset_path}/switch/switch-on.svg"); }

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

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

//
// Links
//
.shell-link {
  color: $link_color;

  &:hover { color: lighten($link_color,10%); }
}

//
// App Icons
//
/* Outline for low res icons */
.lowres-icon {
  icon-shadow: none;
}

/* Drapshadow for large icons */
.icon-dropshadow {
  icon-shadow: none;
}

//
// Modal Dialogs
//
.headline { @include fontsize($font-size * 1.1); }
.lightbox { background-color: black; }
.flashspot { background-color: white; }

.modal-dialog {
  color: $fg_color;
  background-color: transparentize($bg_color, 1);
  border: 1px solid $shell_modal_border_color;
  border-radius: 2px;
  padding: 0;
  box-shadow: $_popup_menu_shadow;

  .modal-dialog-content-box {
    margin: 0;
    padding: 25px 20px;

    @extend %modal_dialog_content_box;
  }

  &-linked-button {
    height: if($variant=='light', 39px, 38px);
    padding: 0;
    box-shadow: inset 0 0 black;
    border-top-width: if($variant=='light', 0px, 1px);
    border-bottom-width: 0;
    border-right-width: 1px;

    color: $osd_fg_color;
    background-color: $osd_bg_color;
    border-color: if($variant!='dark', darken($osd_bg_color, 5%), darken($osd_bg_color, 8%));

    &:hover { background-color: lighten($osd_bg_color, 5%); }
    &:focus { color: $selected_bg_color; }
    &:active {
      color: $selected_fg_color;
      background-color: $selected_bg_color;
    }
    &:insensitive {
      color: transparentize($osd_fg_color, 0.5);
      background-color: darken($osd_bg_color, 2%);
    }

    &: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;
    }
  }
}

%modal_dialog_content_box {
  background-color: $shell_modal_background_color;
}

//
// Message Dialog
//
.message-dialog-content {
  spacing: 18px;

  .message-dialog-title {
    text-align: center;
    @include fontsize($font-size * 1.6);
    font-weight: 800;

    &.lightweight {
      @include fontsize($font-size * 1.2);
      font-weight: 800;
    }
  }
  .message-dialog-description { text-align: center; }
}

//
// Run Dialog
//
.run-dialog {
  .modal-dialog-content-box {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 12px;
    padding-bottom: 14px;
  }

  .message-dialog-title {
    font-size: 0;
  }

  &-entry {
    width: 21em;
  }
  &-description {
    @include fontsize($font-size - 1);
    text-align: center;
    color: $fg_color;
  }
}

//
// 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: darken($fg_color,5%);
        @include fontsize($font-size - 1);
      }
    }
  }
}


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

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

  .modal-dialog-linked-button:last-child {
    color: $destructive_fg_color;
    background-color: $destructive_color;

    &:hover {
      color: $destructive_fg_color;
      background-color: lighten($destructive_color, 9%);
    }
    &:active {
      color: $destructive_fg_color;
      background-color: darken($destructive_color, 5%);
    }
  }
}

//
// Password or Authentication Dialog
//
.prompt-dialog {
  width: 28em;

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

  &-password-grid {
    spacing-rows: 8px;
    spacing-columns: 4px;
  }

  &-password-grid &-password-entry {
    width: auto;

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

  &-password-layout {
    spacing: 8px;
  }

  &-password-entry {
    width: 20em;
  }

  &-error-label,
  &-info-label,
  &-null-label {
    text-align: center;
    @include fontsize($font-size);
  }

  &-error-label {
    color: $warning_color;
  }
}

.hidden {
  color: transparentize(black, 1);
}

.caps-lock-warning-label {
  text-align: center;
  padding-bottom: 8px;
  @include fontsize($font-size);
  color: $warning_color;
}

//
// Workspace animation
//
.workspace-animation {
  background-color: $_system_bg_color;
}

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

  &-layout &-root-label {
    color: $warning_color;
  }
}

//
// Audio selection dialog
//
.audio-device-selection-dialog { 
  .modal-dialog-content-box { padding-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;
      border-color: $selected_bg_color;
    }
  }

  &-device-box {
    padding: 20px;
    spacing: 20px;
  }

  &-device-icon { icon-size: 64px; }
}

//
// Welcome dialog
//
.welcome-dialog-image {
  background-image: url("resource:///org/gnome/shell/theme/gnome-shell-start.svg");
  background-size: contain;
  /* Reasonable maximum dimensions */
  height: 300px;
  width: 300px;
}

//
// Popvers/Menus
//
.popup-menu {
  $_popup_submenu_background_color: if($variant!='dark', rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.15));
  $_popup_submenu_border_color: if($variant!='dark', rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.15));

  min-width: 15em;

  .popup-menu-content {
    margin: if($variant!='dark', 4px, 3px);

    @extend %popup_menu;
  }

  .popup-menu-arrow { } //defined globally in the TOP BAR
  .popup-sub-menu {
    padding-bottom: 1px;
    background-color: $_popup_submenu_background_color;
    box-shadow: inset 0 -1px $_popup_submenu_border_color;
    border: none;
  }

  .popup-menu-content { padding: .7em 0em .7em 0em; }
  .popup-menu-item {
    spacing: 12px;

    &:ltr { padding: .4em 32px .4em 0em; }
    &:rtl { padding: .4em 0em .4em 32px; }

    &:checked {
      font-weight: normal;
      background-color: $_popup_submenu_background_color;
      box-shadow: inset 0 1px $_popup_submenu_border_color;
    }

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

    &:insensitive {
      color: transparentize($fg_color, 0.5);
      background: none;
    }
  }

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

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

.popup-menu-ornament {
  margin-left: 4px;
  width: 16px;

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

.popup-menu-boxpointer {
  -arrow-border-radius: 2px;
  -arrow-background-color:  rgba(0,0,0,0.0);
  -arrow-border-width: 1px;
  -arrow-border-color: rgba(0,0,0,0.0);
  -arrow-base: 0;
  -arrow-rise: 0;
}

.candidate-popup-boxpointer {
  -arrow-border-radius: 2px;
  -arrow-background-color: $osd_bg_color;
  -arrow-border-width: 1px;
  -arrow-border-color: transparentize(black, 0.6);
  -arrow-base: 20px;
  -arrow-rise: 10px;
}

.popup-separator-menu-item-separator {
  //-margin-horizontal: 24px;
  height: 2px; //not really the whole box
  margin: 0;
  background-color: transparent;
  border: none;
}

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

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

// fallback menu
//- odd thing for styling App menu when apparently not running under shell. Light Adwaita styled
//  app menu inside the main app window itself rather than the top bar
//

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

  color: $_panel_fg_color;
  @extend %shell_osd;

  .osd-monitor-label { @include fontsize($font-size * 3); }

  .level {
    padding: 0;
    height: 4px;
    -barlevel-height: 4px;
    -barlevel-background-color: transparentize(black, 0.5);
    -barlevel-active-background-color: $selected_bg_color;
    -barlevel-overdrive-color: $warning_color;
    -barlevel-overdrive-separator-width: 1px;
    color: $selected_bg_color;
  }
}

.resize-popup {
  color: $osd_fg_color;
  padding: 12px;
  @extend %shell_osd;
}

%shell_osd {
  border: 1px solid $shell_osd_border_color;
  border-radius: 2px;
  background: $shell_osd_background_color;
  //background-clip: padding-box;
  box-shadow: $_popup_shadow;
}

//
// Pad OSD
//
.pad-osd-window {
  padding: 32px;
  background-color: $osd_bg_color;

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

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

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

.switcher-list {
  padding: 15px;
  @extend %shell_bg;

  &-item-container { spacing: 8px; }

  .item-box {
    padding: 8px;
    color: $_panel_fg_color;
    border-radius: 2px;
    border: 1px solid transparent;

    &:outlined, &:selected {
      color: $selected_fg_color;
      background-color: $selected_bg_color;
      border: 1px solid $selected_bg_color;
    }
  }

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

  .thumbnail {
    width: 256px;
  }

  .separator {
    width: 1px;
    background: transparentize($fg_color, 0.67);
  }
}

.switcher-arrow {
  border-color: rgba(0,0,0,0);
  color: $osd_fg_color;

  &:highlighted {
    color: $_panel_fg_color;
  }
}

.input-source-switcher-symbol {
  font-size: 34pt;
  width: 96px;
  height: 96px;
}

%shell_bg {
  background: $dark_sidebar_bg;
  //background-clip: padding-box;
  border: 1px solid $shell_bg_border_color;
  border-radius: 2px;
  box-shadow: $_popup_shadow;
}

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

//
// Workspace Switcher
//
.workspace-switcher {

  background: transparent;
  border: 0px;
  border-radius: 0px;
  padding: 0px;
  spacing: 8px;

  &-group { padding: 12px; }

  &-container {
    padding: 14px;
    padding-bottom: 17px;
    @extend %shell_bg;
  }
}

.ws-switcher-active-up, .ws-switcher-active-down,
.ws-switcher-active-left, .ws-switcher-active-right {
  height: 64px;
  background-color: $selected_bg_color;
  background-size: 64px;
  border-radius: 2px;
  border: 1px solid $selected_bg_color;
}

.ws-switcher-active-up {
  background-image: url("common-assets/misc/ws-switch-arrow-up.svg");
}

.ws-switcher-active-down {
  background-image: url("common-assets/misc/ws-switch-arrow-down.svg");
}

.ws-switcher-active-left {
  background-image: url("common-assets/misc/ws-switch-arrow-left.svg");
}

.ws-switcher-active-right {
  background-image: url("common-assets/misc/ws-switch-arrow-right.svg");
}

.ws-switcher-box {
  height: 64px;
  background-color: transparentize(black, 0.67);
  border: 1px solid transparentize(black, 0.67);
  border-radius: 2px;
}

//
// Tiled window previews
//
.tile-preview {
  background-color: transparentize($selected_bg_color, 0.65);
  border: 1px solid $selected_bg_color;

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

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

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

//
// Top Bar
//
#panel {
  font-weight: bold;
  font-feature-settings: "tnum";
  height: 2.1em;
  min-height: 26px;
  background-gradient-direction: none;
  background-color: $shell_osd_background_color;
  //background-clip: padding-box;
  border: 0 solid $shell_osd_border_color;
  border-bottom-width: 1px;
  transition-duration: $panel_transition_duration;

  // Fix dynamic top bar extension
  &.dynamic-top-bar-white-btn { border-image: none; }

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

    .panel-button {
      &:focus, &:active, &:checked {
        &, &.clock-display .clock {
          color: $selected_fg_color;
          border-color: transparent;
        }
      }
    }
  }
  &.unlock-screen {
    .panel-button {
      color: $_shell_fg_color;

      &:hover {
        color: $_shell_fg_color;
      }
    }
  }

  .panel-corner {
    -panel-corner-radius: $panel-corner-radius;
    -panel-corner-background-color: transparentize(black, 1);
    -panel-corner-border-width: 0px;
    -panel-corner-border-color: black;
    -panel-corner-opacity: 0;

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

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

  .panel-button {
    -natural-hpadding: 10px;
    -minimum-hpadding: 6px;
    font-weight: bold;
    color: $_panel_fg_color;
    transition-duration: 100ms;
    border-width: 0;
    border-bottom-width: 1px;
    border-color: transparent;
    border-radius: 0;

    // Hide icon for the application menu
    .app-menu-icon {
      width: 0;
      height: 0;
    }

    @at-root %panel_button_hover,
    &:hover {
      box-shadow: inset 0 0 0 100px transparentize(black, 0.83);
      border-color: transparent;
    }

    @at-root %panel_button_active,
    &:active, &:overview, &:focus, &:checked {
      color: $selected_fg_color;
      box-shadow: inset 0 0 0 100px $selected_bg_color;
      border-color: black;
    }

    .system-status-icon { icon-size: 16px; padding: 0 4px; }

    &.clock-display {
      // Move highlight from .panel-button to .clock
      background: transparent;
      border-bottom-width: 0;

      .clock {
        @extend .panel-button;

        padding: 0 10px;
        box-shadow: none;

        //HACK: compensate for bottom border to ensure the clock stays vertically centered
        padding-top: 1px;
      }

      &:hover .clock { @extend %panel_button_hover; }

      &:active, &:overview, &:focus, &:checked {
        .clock { @extend %panel_button_active; }
      }

      & StIcon {
        color: $_panel_fg_color;
        margin: 0 4px;
      }
    }
  }

  #panelActivities.panel-button { -natural-hpadding: 12px; }

  .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: $error_color; }

  .popup-menu-arrow { width: 0; }
}

// Activities button
#panel #panelActivities.panel-button {

  > * {
    background-image: url("common-assets/panel/activities.svg");
    background-size: contain;
    width: 24px;
    height: 24px;
    background-color: transparent !important;
    background-gradient-direction: none !important;
    border: 0 solid transparent !important;
    text-shadow: 0 0 transparent !important;
    transition-duration: 0ms !important;
    box-shadow: none !important;
    color: transparent;
  }

  &:active, &:overview, &:focus, &:checked {
    background-color: transparent;
    box-shadow: none;
    border-bottom-width: 1px;
    border-color: transparent;

    > * { background-image: url("common-assets/panel/activities-active.svg"); }
  }
}

// a little unstructured mess:

#appMenu {
  spacing: 0;
  padding: 0;

  .label-shadow { color: transparent; }
}

#appMenu .panel-status-menu-box {
  padding: 0;
  spacing: 4px;
}

.app-menu {
  max-width: 27.25em;
}

.aggregate-menu {
  min-width: 23.5em;
  .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 + 16px icon */
            padding-left: 36px; }
    &:rtl { /* 12px spacing + 2*4px padding + 16px icon */
            padding-right: 36px; }
  }
}

//
// Calendar popover
//

@mixin datemenu_bubble {
  box-shadow: none;
  background: transparent;
  color: inherit;
  text-shadow: none;
  border: none;
  border-radius: 3px;
  margin: 0;
  padding: 7px 10px;

  &:hover, &:focus { background-color: transparentize(black, 0.9); }
  &:active {
    background-color: $selected_bg_color;
    color: $selected_fg_color;
  }
}

/* Date/Time Menu */

// overall menu
#calendarArea {
  padding: 0;
}

// Calendar menu side column
.datemenu-calendar-column {
  spacing: 5px;
  border: 0 solid transparent;
  padding: 9px 0;

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

  .datemenu-displays-section {
  }

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

.events-section-title {
  @include datemenu_bubble;
  color: transparentize($fg_color, 0.6);
  font-weight: bold;
}


/* today button (the date) */
.datemenu-today-button {
  @include datemenu_bubble;

  // weekday label
  .day-label {
    @include fontsize($font-size);
    font-weight: 400;
  }

  // date label
  .date-label {
    @include fontsize($font-size * 1.5);
    font-weight: 300;
  }
}

/* Calendar */
.calendar {
  @include datemenu_bubble;
  padding: 0;

  // month
  .calendar-month-label {
    color: $fg_color;
    font-weight: bold;
    padding: 8px 0;
    &:focus {}
  }

  // prev/next month icons
  .calendar-change-month-back,
  .calendar-change-month-forward:rtl {
    background-image: url("#{$asset_path}/misc/calendar-arrow-left.svg");
    &:focus, &:hover { background-image: url("#{$asset_path}/misc/calendar-arrow-left-hover.svg"); }
    &:active { background-image: url("#{$asset_path}/misc/calendar-arrow-left.svg"); }
  }

  .calendar-change-month-forward,
  .calendar-change-month-back:rtl {
    background-image: url("#{$asset_path}/misc/calendar-arrow-right.svg");
    &:focus, &:hover { background-image: url("#{$asset_path}/misc/calendar-arrow-right-hover.svg"); }
    &:active { background-image: url("#{$asset_path}/misc/calendar-arrow-right.svg"); }
  }

  .pager-button {
    color: transparent;
    background-color: transparent;
    height: 32px;
    width: 32px;
    border-radius: 2px;
    &:focus, &:hover, &:active { background-color: transparent; }
  }

  $calendar_day_size: 27px;

  .calendar-day-base {
    @include fontsize($font-size * 0.8);
    text-align: center;
    width: $calendar_day_size;
    height: $calendar_day_size;
    padding: 0;
    margin: 2px;
    border-radius: $calendar_day_size * 0.5;
    border: 0 solid transparent;
    font-feature-settings: "tnum";
    &:hover, &:focus { background-color: transparentize(black, 0.9); }
    &:active,&:selected {
      color: $fg_color;
      background-color: transparentize(black, 0.85);
    }

    // day of week heading
    &.calendar-day-heading {
      color: transparentize($fg_color, 0.15);
      margin-top: 9px;
      @include fontsize($font-size * 0.7);
      height: 23px;//adjusts bottom margin
    }
  }

  .calendar-day { //border collapse hack - see calendar.js
    border-width: 0;
    color: transparentize($fg_color, 0.2);
  }

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

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

  .calendar-work-day {}

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

  // Today
  .calendar-today {
    font-weight: bold;
    border: 0 solid transparent;

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

  .calendar-day-with-events {
    font-weight: bold;
    background-image: url("common-assets/misc/calendar-today.svg");

    &.calendar-today {
      background-image: url("common-assets/misc/calendar-today-active.svg");
    }
  }

  .calendar-other-month-day {
    color: transparentize($fg_color, 0.7);
  }

  .calendar-week-number {
    @include fontsize($font-size * 0.7);
    font-weight: bold;
    height: 15px;
    width: 19px;
    border-radius: 2px;
    margin: 6px;
    background-color: if($variant!='dark', transparentize($fg_color,0.9), transparentize($fg_color,0.7));
    color: if($variant!='dark', transparentize($fg_color,0.5), $bg_color);

    &:ltr { margin-left: 10px; }
    &:rtl { margin-right: 10px; }
  }
}

/* Events */
.events-button {
  @include datemenu_bubble;

  .events-box {
    spacing: 5px;
  }

  .events-list {
    spacing: 10px;
  }

  .events-title {
    color: transparentize($fg_color, 0.6);
    font-weight: bold;
  }
  &:active .events-title {
    color: $selected_fg_color;
  }

  .event-time {
    color: transparentize($fg_color, 0.4);
    font-feature-settings: "tnum";
    @include fontsize($font-size * 0.9);
  }
  &:active .event-time {
    color: transparentize($selected_fg_color, 0.4);
  }
}

/* World clocks */
.world-clocks-button {
  @include datemenu_bubble;

  .world-clocks-grid {
    spacing-rows: 5px;
    spacing-columns: 10px;
  }

  // title
  .world-clocks-header {
    color: transparentize($fg_color, 0.6);
    font-weight: bold;
  }
  &:active .world-clocks-header {
    color: $selected_fg_color;
  }

  // city label
  .world-clocks-city {
    color: inherit;
    @include fontsize($font-size * 0.9);
    font-weight: bold;
  }

  // timezone time
  .world-clocks-time {
    font-weight: normal;
    color: transparentize($fg_color, 0.2);
    font-feature-settings: "tnum";
    @include fontsize($font-size * 1.2);

    &:ltr { text-align: right; }
    &:rtl { text-align: left; }
  }
  &:active .world-clocks-time { color: transparentize($selected_fg_color, 0.2); }

  // timezone offset label
  .world-clocks-timezone {
    color: transparentize($fg_color, 0.4);
    font-feature-settings: "tnum";
    @include fontsize($font-size * 0.9);
  }
  &:active .world-clocks-timezone { color: transparentize($selected_fg_color, 0.4); }
}

/* Weather */
.weather-button {
  @include datemenu_bubble;

  .weather-box {
    spacing: 5px;
  }

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

  .weather-header {
    color: transparentize($fg_color, 0.6);
    font-weight: bold;

    &.location {
      font-weight: normal;
      @include fontsize($font-size * 0.9);
    }
  }
  &:active .weather-header {
    color: $selected_fg_color;
  }

  .weather-grid {
    spacing-rows: 5px;
    spacing-columns: 10px;
  }

  .weather-forecast-time {
    color: transparentize($fg_color, 0.4);
    font-feature-settings: "tnum";
    @include fontsize($font-size * 0.8);
    font-weight: normal;
    padding-top: 2px;
    padding-bottom: 4px;
  }
  &:active .weather-forecast-time { color: transparentize($selected_fg_color, 0.4); }

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

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

//
// Message list
//

// main list
.message-list {
  width: 31.5em;
  padding: 9px 0;

  .message-list-placeholder {
    StIcon { width: 0; height: 0; }
    StLabel { color: $insensitive_fg_color; }
  }

  StScrollBar { padding: 2px 0; }
}

.message-list-sections {
  spacing: 12px;
  margin: 0 18px; // to account for scrollbar

  &:ltr { margin-right: 9px; }
  &:rtl { margin-left: 9px; }
}

.message-list-section,
.message-list-section-list {
  spacing: 5px;
}

// do-not-disturb + clear button
.message-list-controls {
  margin: 18px 18px 0;
  padding: 0;
  spacing: 10px;

  &:ltr { margin-right: 9px; }
  &:rtl { margin-left: 9px; }

  .dnd-button {
    // We need this because the focus outline isn't inset like for the buttons
    // so the dnd button would grow when it gets focus if we didn't change only
    // its color when focusing.
    border-width: 1px;
    border-color: transparent;
    border-radius: 99px;
    border-style: solid;

    &:focus {
      border-color: $selected_bg_color;
    }
  }
}

.message-list-clear-button {
  margin: 0;
  padding: 4px 12px;
}

// message bubbles
.message {
  margin: 0;
  text-shadow: none;

  padding: 3px;
  color: $fg_color;
  background-color: $shell_message_background_color;
  border: 1px solid $shell_message_border_color;
  border-radius: 2px;
  box-shadow: inset 4px 0 0 if($variant!='dark', -1px, -2px) $selected_bg_color;
  text-shadow: none;

  &:hover, &:focus {
    color: $fg_color;
    border-color: $selected_bg_color;
  }

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

  // icon container
  $message_icon_size: 16px;

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

    // icon size and color
    > StIcon {
      color: inherit;
      icon-size: $message_icon_size;
      -st-icon-style: symbolic;
    }

    // fallback
    > .fallback-app-icon {
      width: $message_icon_size;
      height: $message_icon_size;
    }
  }

  // content
  .message-content {
    padding: 8px;
    spacing: 0;
  }

  // title
  .message-title {
    font-weight: bold;
  }

  // secondary container in title box
  .message-secondary-bin {
    padding: 0 10px;

    // notification time stamp
    > .event-time {
      color: transparentize($fg_color, 0.4);
      @include fontsize($font-size * 0.9);
      /* HACK: the label should be baseline-aligned with a 1em label, fake this with some bottom padding */
      padding-bottom: 0.05em;//Use em instead of px, since this depends on font-size

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

  &:active .message-secondary-bin,
  &:active .message-secondary-bin > .event-time {
    color: transparentize($selected_fg_color, 0.4);
  }

  // close button
  .message-close-button {
    color: $fg_color;
    &:hover { color: transparentize($fg_color, 0.3); }
    &:active { color: $selected_bg_color }
  }

  // body
  .message-body {
    color: inherit;
  }
}

// URLs in messages
.url-highlighter {
  link-color: $link_color;
}

/* Media Controls */
.message-media-control {
  padding: 12px;
  color: $fg_color;
  background-color: transparent;

  &:hover { color: transparentize($fg_color, 0.3); }
  &:active { color: $selected_bg_color; }
  &:insensitive { color: $insensitive_fg_color; }

  &:last-child:ltr { padding-right: 18px; }
  &:last-child:rtl { padding-left: 18px; }
}

.message:active .message-media-control {
  color: $selected_fg_color;
}

// album-art
.media-message-cover-icon {
  icon-size: 48px !important;

  // when there is no artwork
  &.fallback {
    color: $insensitive_fg_color !important;
    background-color: $bg_color;
    border-radius: 2px;
    icon-size: 32px !important;
    padding: 6px;
    border: 1px solid $borders_color;
  }

  .message:active &.fallback {
    color: transparentize($selected_fg_color, 0.2) !important;
    background-color: lighten($selected_bg_color, 7%);
    border-color: transparentize($selected_fg_color, 0.2);
  }
}


//
// Activities Ripples
//
.ripple-box {
  width: 52px;
  height: 52px;
  border-radius: 0 0 52px 0; // radius the size of the box give us the curve
  background-color: transparentize($selected_bg_color, 0.5);

  &:rtl { border-radius: 0 0 0 52px; } // just a simple change to the border radius position
}

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

// Pointer location
.ripple-pointer-location {
  width: 50px;
  height: 50px;
  border-radius: 25px 25px 25px 25px; // radius the size of the box give us the curve
  background-color: transparentize($selected_bg_color, 0.5);
}

// not really top bar only
.popup-menu-arrow { icon-size: 16px; }
.popup-menu-icon { icon-size: 16px; }


//
// Close buttons
//
$window_close_button_size: 26px;
$window_close_button_padding: 0;

.window-close {
  background-color: lighten(saturate($destructive_color, 6%), 4%);
  border-radius: $window_close_button_size * 0.5 + $window_close_button_padding * 2;;
  border: none;
  box-shadow: 0 1px 0 0 rgba(0,0,0,0.1);;
  color: $destructive_fg_color;
  height: $window_close_button_size;
  width: $window_close_button_size;
  padding: $window_close_button_padding;
  transition-duration: 100ms;

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

  &:hover {
    background-color: lighten(saturate($destructive_color, 15%), 12%);
    color: $destructive_fg_color;
  }

  &:active {
    background-color: darken(adjust-hue(desaturate($destructive_color, 18%), -5%), 9%);
    color: $destructive_fg_color;
  }
}

.workspace-background {
  // keep in sync with BACKGROUND_CORNER_RADIUS_PIXELS in workspace.js
  border-radius: 30px;
  box-shadow: 0 8px 16px 0 transparentize(black, 0.8);
}

// Pointer accessibility notifications
.pie-timer {
  width: 60px;
  height: 60px;
  -pie-border-width: 2px;
  -pie-border-color: $selected_bg_color;
  -pie-background-color: transparentize($selected_bg_color, 0.5);
}

//
// Network Dialogs
//
.nm-dialog {
  max-height: 34em;
  min-height: 31em;
  min-width: 32em;

  &-content {
    spacing: 20px;
    padding: 10px;

    @extend %modal_dialog_content_box;
  }

  &-header-hbox { spacing: 10px; }

  &-airplane-box { spacing: 12px; }

  &-airplane-headline {
    @include fontsize($font-size * 1.1);
    font-weight: bold;
    text-align: center;
  }

  &-airplane-text { color: $fg_color; }

  &-header-icon { icon-size: 32px; }

  &-scroll-view {
    border: 1px solid $borders_color;
    border-radius: 2px;
    background-color: $base_color;
  }

  &-header {
    font-weight: bold;
    @include fontsize($font-size * 1.2);
  }

  &-item {
    @include fontsize($font-size);
    border-bottom: 0px solid;
    padding: 12px;
    spacing: 0px;

    &:selected {
      background-color: $selected_bg_color;
      color: $selected_fg_color;
    }
  }

  &-icons { spacing: .5em; }

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

.no-networks-label { color: $insensitive_fg_color; }

.no-networks-box { spacing: 12px; }

//
// Overview
//
.controls-manager,
.secondary-monitor-workspaces {
  spacing: 12px;
}

#overviewGroup {
  background-color: $_system_bg_color;
}

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

.window-picker { //container around window thumbnails
  spacing: 6px;
}

.window-caption {
  spacing: 25px;
  color: $selected_fg_color;
  background-color: $selected_bg_color;
  border-radius: 2px;
  padding: 4px 12px;
  border-width: 0;
  @include fontsize($font-size);
  font-weight: normal;
}

//
// Search Entry
//
.search-entry {
  width: 320px;
  padding: 7px 9px;
  border-radius: 20px;
  border: 1px solid transparentize(black, 0.75);
  background-color: transparentize($entry_bg, 0.1);
  transition-duration: 0ms;
  margin-top: 10px;
  margin-bottom: 5px;

  &:focus {
    padding: 7px 9px;
  }

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

  .search-entry-icon {
    icon-size: 16px;
    padding: 0 4px;
  }

  .hint-text { margin-left: 0; }

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

    selection-background-color: $selected_fg_color;
    selected-color: $selected_bg_color;

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

//
// Search Results
//
#searchResultsContent {
  max-width: 1000px;
  spacing: 16px;
}

// This should be equal to #searchResultsContent spacing
.search-section { spacing: 16px; }

// This is the space between the provider icon and the results container
.search-section-content {
  background-color: transparent;
  border: none;
  box-shadow: none;
  text-shadow: none;
  color: $_shell_fg_color;
  spacing: 32px;
}

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

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

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

.search-section-separator {
  background-color: transparentize(white, 0.8);
  height: 1px;

  .search-section:last-child & { background-color: transparent; }
}

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

.list-search-result-title { color: $_shell_fg_color; spacing: 12px; }

.list-search-result-description { color: transparentize(darken($_shell_fg_color, 20%), 0.3); }

.list-search-provider-details { width: 150px; color: darken($_shell_fg_color,10%); margin-top: 0.1em; }

.list-search-provider-content { spacing: 20px; }

.search-provider-icon { padding: 15px; }

//
// Dash
//

$_dash_placeholder_size: 24px;
$_dash_padding: 10px;
$_dash_spacing: 4px;

$_dash_bottom_margin: 20px;

#dash {
  @include fontsize($font-size);
  margin-top: 15px;
  padding: 0 $_dash_padding;

  .placeholder {
    background-image: none;
    background-size: contain;
    height: $_dash_placeholder_size;
  }

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

  .overview-icon {
    padding: $_dash_padding / 2;
  }
}

.dash-background {
  background-color: $dark_sidebar_bg;
  margin-bottom: $_dash_bottom_margin;
  padding: $_dash_padding;
  border: 1px solid rgba(0,0,0,0.4);
  border-radius: 3px;
}

.dash-item-container .app-well-app, .show-apps {
  padding: $_dash_padding $_dash_spacing $_dash_padding + $_dash_bottom_margin;
}

.dash-separator {
  width: 1px;
  margin: 0 ($_dash_spacing + ($_dash_padding / 2)) $_dash_bottom_margin;
  background-color: transparentize(black, 0.5);
}

//osd tooltip
.dash-label {
  border-radius: 3px;
  padding: 4px 12px;
  color: $_shell_fg_color;
  background-color: transparentize(black, 0.3);
  border: 0;
  text-align: center;
  -y-offset: 3px;
  box-shadow: none;
}

// Dash Buttons
#dash .app-well-app {

  & .overview-icon {
    border: none;
  }

  &:hover .overview-icon {
    background-color: $selected_bg_color;
  }

  &:active .overview-icon {
    box-shadow: none;
    background-color: darken($selected_bg_color, 10%);
  }

  &-running-dot {
    width: 11px;
    height: 2px;
    margin-bottom: 2px;
    background-color: $selected_bg_color;
  }

  &:hover .app-well-app-running-dot {
    background-color: $selected_fg_color;
  }
}

#dashtodockContainer {

  &.bottom #dash {
    margin-top: 1px;
  }

  .app-well-app.focused .overview-icon {
    background-color: transparentize(black, 0.75);
  }

  .app-well-app.focused:hover .overview-icon {
    background-color: $selected_bg_color;
  }

  &.running-dots {
    .app-well-app .app-well-app-running-dot,
    .app-well-app.focused:hover .app-well-app-running-dot {
      background-color: $selected_bg_color;
    }

    .app-well-app:hover .app-well-app-running-dot {
      background-color: $selected_fg_color;
    }
  }

  .app-well-app-running-dot,
  .app-well-app:hover .app-well-app-running-dot {
    background: none;
    width: 28px;
    height: 4px;
  }

  @each $var in 1, 2, 3, 4 {
    .running#{$var} .app-well-app-running-dot {
      background-image: url("common-assets/dash/running#{$var}.svg");
    }
    .running#{$var}:hover .app-well-app-running-dot {
      background-image: url("common-assets/dash/running#{$var}-hover.svg");
    }
  }

  & .show-apps {
    margin: 0 1px 1px 0;
  }
}

.show-apps {

  .overview-icon {
    background-color: transparentize(black, 0.5);
    border-radius: 2px;
    border: 0px;
    padding: 6px;
    transition-duration: 0ms;
    text-align: center;
    color: $_panel_fg_color;
  }

  &:hover .overview-icon {
    background-color: transparentize(black, 0.3);
    color: $selected_bg_color;
  }

  &:active .overview-icon,
  &:active .show-apps-icon,
  &:checked .overview-icon,
  &:checked .show-apps-icon {
    color: $selected_fg_color;
    background-color: $selected_bg_color;
    box-shadow: none;
    transition-duration: 0ms;
  }
}

//
// App Vault/Grid
//
.icon-grid {
  row-spacing: 10px;
  column-spacing: 10px;
  max-row-spacing: 60px;
  max-column-spacing: 60px;
  page-padding-top: 20px;
  page-padding-bottom: 20px;
  page-padding-left: 10px;
  page-padding-right: 10px;
}

.system-action-icon {
  background-color: $bg_color;
  color: $fg_color;
  border-radius: 99px;
  icon-size: 48px;
}

.page-navigation-hint {
  width: 300px;

  &.dnd {
    background: rgba(255, 255, 255, 0.1);
  }

  &.next:ltr,
  &.previous:rtl {
    background-gradient-start: rgba(255, 255, 255, 0.05);
    background-gradient-end: transparent;
    background-gradient-direction: horizontal;
    border-radius: 15px 0px 0px 15px;
  }

  &.previous:ltr,
  &.next:rtl {
    background-gradient-start: transparent;
    background-gradient-end: rgba(255, 255, 255, 0.05);
    background-gradient-direction: horizontal;
    border-radius: 0px 15px 15px 0px;
  }
}

.page-navigation-arrow {
  margin: 6px;
  width: 24px;
  height: 24px;
}

//
// Icon Tile
//
.search-provider-icon,
.list-search-result {
  @extend %icon_tile;

  &:active, &:checked { background-color: transparentize(darken($osd_bg_color,10%),.1); }

  &:focus, &:selected, &:hover {
    background-color: transparentize($osd_fg_color,.6);
    transition-duration: 200ms;
  }
}
.app-well-app,
.app-well-app.app-folder,
.grid-search-result {

  .overview-icon {
    @extend %icon_tile;
  }

  &:active .overview-icon,
  &:checked .overview-icon {
    background-color: transparentize(darken($osd_bg_color,10%),.1);
    box-shadow: inset 0 0 $selected_bg_color;
  }

  &:hover .overview-icon,
  &:focus .overview-icon,
  &:selected .overview-icon {
    background-color: transparentize($osd_fg_color,.6);
    transition-duration: 0ms;
    border-image: none;
    background-image: none;
  }

  &:drop .overview-icon {
    background-color: $selected_bg_color;
  }
}

.app-well-app-running-dot { //running apps indicator
  width: 20px;
  height: 2px;
  margin-bottom: 4px;
  background-color: $selected_bg_color;
}

%icon_tile {
  color: $_shell_fg_color;
  border-radius: 2px;
  padding: 6px;
  border: 1px solid transparent;
  transition-duration: 0ms;
  text-align: center;
}

//
// App folders
//
.app-well-app.app-folder {

  > .overview-icon {
    background-color: darken($dark_sidebar_bg, 8%);
    border: 1px solid transparentize(darken($dark_sidebar_bg, 25%), 0.5);
  }

  &:hover > .overview-icon, &:focus > .overview-icon {
    background-color: lighten($dark_sidebar_bg, 3%);
  }

  &:active > .overview-icon, &:checked > .overview-icon {
    color: $selected_fg_color;
    background-color: $selected_bg_color;
    box-shadow: none;
  }
}

// expanded folder
.app-folder-dialog {
  border-radius: 2px;
  border: 1px solid transparentize(darken($dark_sidebar_bg, 25%), 0.5);
  background-color: darken($dark_sidebar_bg, 8%);
  padding: 12px 0;

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

    & .folder-name-label,
    & .folder-name-entry {
      @include fontsize($font-size * 1.6);
      font-weight: 800;
    }

    & .folder-name-entry { width: 300px; }

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

    & .edit-folder-button {
      @extend %button;

      padding: 0;
      width: 36px;
      height: 36px;
      border-radius: 18px;

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

  & .icon-grid {
    row-spacing: 10px;
    column-spacing: 25px;
    page-padding-top: 0;
    page-padding-bottom: 0;
    page-padding-left: 0;
    page-padding-right: 0;
  }

  & .page-indicators {
    margin-bottom: 18px;
  }
}
.app-folder-dialog-container {
  padding: 12px;
  width: 620px;
  height: 620px;
}

.page-indicator {
  padding: 5px 20px 0;

  .page-indicator-icon {
    width: 8px;
    height: 8px;
    background-color: $_shell_fg_color;
    border-radius: 4px;
  }

  &:active .page-indicator-icon { background-color: $selected_bg_color; }
}

.app-well-app .overview-icon.overview-icon-with-label,
.grid-search-result .overview-icon.overview-icon-with-label {
  padding: 10px 8px 5px 8px;
  spacing: 4px;
}

//
// Workspace pager
//
.workspace-thumbnails {
  visible-width: 40px;  //amount visible before hover
  spacing: 5px;
  padding: 5px;

  .workspace-thumbnail {
    background-color: $dark_sidebar_bg;
    background-clip: padding-box;
    border: 1px solid $shell_bg_border_color;
    border-radius: 0;
  }

  .placeholder {
    background-image: url("common-assets/dash/dash-placeholder-horizontal.svg");
    background-size: contain;
    width: 18px;
  }
}

.workspace-thumbnail-indicator {
  border: 3px solid transparentize($selected_bg_color, 0.2);
  border-radius: 1px;
  padding: 0;
}

.apps-scroll-view {
  padding: 0;
}

%status_text {
  @include fontsize($font-size * 2);
  font-weight: bold;
  color: $fg_color;
}

//
// Notifications & Message Tray
//

// Banners
.notification-banner,
.notification-banner:hover,
.notification-banner:focus {
  @include fontsize($font-size);
  width: 34em;
  min-height: 0;
  margin: 9px;
  padding: 6px;

  @extend %popup_menu;

  .notification-actions {
    background-color: transparent;
    border: 0;
    padding: 2px 2px 0 2px;
    spacing: 3px;
  }
  .notification-button {
    padding: 4px 4px 5px;
    min-height: 0;
    @extend %button;

    &:first-child, &:last-child { border-radius: 2px; }
  }
}

%popup_menu {
  color: $fg_color;
  background-color: $shell_popup_menu_background_color;
  //background-clip: padding-box;
  border: if($variant!='dark', 0, 1px) solid $shell_popup_menu_border_color;
  border-radius: 2px;
  box-shadow: $_popup_menu_shadow;
}

// 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: $selected_bg_color;

  &:rtl { padding-left: 0; padding-right: 18pt; }
}

.chat-meta-message {
  padding-left: 4px;
  @include fontsize($font-size * 0.8);
  font-weight: bold;
  color: transparentize($fg_color, 0.4);

  &:rtl { padding-left: 0; padding-right: 4px; }
}

.subscription-message { font-style: italic; }

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

.hotplug-notification-item {
  padding: 2px 10px;
  @extend %button;

  &:focus { padding: 2px 10px; }
}

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

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

.hotplug-resident-mount {
  spacing: 8px;
  border-radius: 4px;
  &:hover { background-color: transparentize($bg_color,0.7); }
}

.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: 5px;
  color: pink;
}

// Eeeky things

// Magnifier

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

//
// On-Screen Keyboard
//
.word-suggestions {
  @include fontsize($font-size * 1.25);
  spacing: 12px;
  min-height: 20pt;

  StButton {
    padding: 0 0.5em;
    border-radius: 2px;
    color: $osd_fg_color;

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

#keyboard {
  background-color: $osd_bg_color;
  border-width: 0;
  border-top-width: 1px;
  border-color: transparentize(black, 0.8);

  .page-indicator {
    padding: 4px 4px;

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

.key-container {
  padding: 4px;
  spacing: 4px;
}

.keyboard-key {
  min-height: 1.2em;
  min-width: 1.2em;
  @include fontsize($font-size * 1.44);
  border-radius: 3px;
  box-shadow: none;

  @include button(osd);

  &:hover { @include button(osd-hover); }
  &:active, &:checked { @include button(osd-active); }

  &:grayed { @include button(osd-insensitive); }

  &.default-key {
    background-color: darken($osd_button_bg, 13%);

    &:hover { background-color: darken($osd_button_bg, 5%); }
    &:active, &:checked { @include button(osd-active); }
  }

  &.enter-key {
    @include button(osd-active);

    &:hover { background-color: darken($selected_bg_color, 5%); }
    &:active, &:checked { @include button(osd-active); }
  }

  &.shift-key-lowercase {}
  &.shift-key-uppercase,
  &.shift-key-uppercase:latched  {
    color: $selected_bg_color;
  }
  &.hide-key,
  &.layout-key {
    &:active, &:checked { color: $selected_fg_color; }
  }

  StIcon { icon-size: 1.125em; }
}                             

.keyboard-subkeys { //long press on a key popup
  color: $osd_fg_color;
  -arrow-border-radius: 2px;
  -arrow-background-color: $osd_bg_color;
  -arrow-border-width: 1px;
  -arrow-border-color: transparentize(black, 0.6);;
  -arrow-base: 20px;
  -arrow-rise: 10px;
  -boxpointer-gap: 5px;
}

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

.emoji-panel {
  .keyboard-key:latched {
    @include button(osd-active);

    &:hover { background-color: darken($selected_bg_color, 5%); }
    &:active, &:checked { @include button(osd-active); }
  }
}

//
// IBus Candidate Popup
//
.candidate-popup-content {
  padding: 0.5em;
  spacing: 0.3em;
  color: $osd_fg_color;
  @include fontsize($font-size * 1.15);
}

.candidate-index {
  padding: 0 0.5em 0 0;
  color: lighten($osd_fg_color, 10%);
}

.candidate-box {
  padding: 0.3em 0.5em 0.3em 0.5em;
  border-radius: 2px;
  color: $osd_fg_color;
  &:selected,&:hover { background-color: $selected_bg_color; color: $selected_fg_color; }
}

.candidate-page-button-box {
  height: 2em;
  .vertical & { padding-top: 0.5em; }
  .horizontal & { padding-left: 0.5em; }
}

.candidate-page-button {
  padding: 4px;
}

.candidate-page-button-previous { border-radius: 2px 0px 0px 2px; border-right-width: 0; }
.candidate-page-button-next { border-radius: 0px 2px 2px 0px;  }
.candidate-page-button-icon { icon-size: 1em; }

//
// Auth Dialogs & Screen Shield
//
.user-icon {
  background-size: contain;
  color: $osd_fg_color;
  border-radius: 99px;
  border: 0;
  icon-size: 64px;

  .login-dialog-user-list-item:selected & { color: $selected_fg_color; }

  .unlock-dialog & { color: $_shell_fg_color; }

  &:hover {
    color: $osd_fg_color;
  }

  & StIcon {
    background-color: transparentize($osd_fg_color, 0.75);
    border-radius: 99px;
    padding: 12px;
    width: 40px; height: 40px;

    .login-dialog-user-list-item:selected & { background-color: transparentize($selected_fg_color, 0.75); }

    .unlock-dialog & { background-color: transparentize($_shell_fg_color, 0.75); }
  }

  &.user-avatar {
    border: none;
  }
}

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

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

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

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

  StEntry {
    caret-color: $selected_fg_color;
    selection-background-color: $selected_bg_color;
    selected-color: $selected_fg_color;

    @include entry(osd);

    StLabel.hint-text { color: transparentize($osd_fg_color, 0.3); }

    &:focus {
      selection-background-color: $selected_fg_color;
      selected-color: $selected_bg_color;

      @include entry(osd-focus);

      StLabel.hint-text { color: transparentize($selected_fg_color, 0.3); }
    }
  }

  .modal-dialog-button-box { spacing: 3px; }
  .modal-dialog-button {
    padding: 3px 18px;
    &, &:default {
      @extend %osd_button;
    }
  }

  .cancel-button,
  .switch-user-button,
  .login-dialog-session-list-button {
    padding: 0;
    border-radius: 99px;
    width: 32px;
    height: 32px;

    StIcon { icon-size: 16px; }
  }

  .caps-lock-warning-label,
  .login-dialog-message-warning {
    color: $osd_fg_color;
  }
}

.login-dialog-logo-bin { padding: 24px 0px; }
.login-dialog-banner { color: $osd_fg_color; @include fontsize($font-size * 1.1); }
.login-dialog-button-box { width: 23em; spacing: 5px; }
.login-dialog-message { text-align: center; }
.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: lighten($osd_fg_color, 25%);
  }
}
.login-dialog-not-listed-label {
  @include fontsize($font-size * 0.9);
  font-weight: bold;
  color: $osd_fg_color;
  padding-top: 1em;
}

.login-dialog-user-list-view { -st-vfade-offset: 1em; }
.login-dialog-user-list {
  spacing: 12px;
  width: 23em;
  &:expanded .login-dialog-user-list-item:selected { background-color: $selected_bg_color; color: $selected_fg_color; }
  &:expanded .login-dialog-user-list-item:logged-in { border-right: 2px solid $selected_bg_color; }
}
.login-dialog-user-list-item {
  border-radius: 5px;
  padding: 6px;
  color: $osd_fg_color;
  &:ltr .user-widget { padding-right: 1em; }
  &:rtl .user-widget { padding-left: 1em; }
  .login-dialog-timed-login-indicator {
    margin-top: 6px;
  }
  &:selected .login-dialog-timed-login-indicator { background-color: $selected_fg_color; }
}

.user-widget-label {
  color: $osd_fg_color;

  .login-dialog-user-list-item:selected & { color: $selected_fg_color; }

  .unlock-dialog & { color: $_shell_fg_color; }
}

.user-widget.horizontal .user-widget-label {
  @include fontsize($font-size * 1.2);
  font-weight: bold;
  padding-left: 15px;

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

.user-widget.vertical .user-widget-label {
  @include fontsize($font-size * 1.5);
  text-align: center;
  font-weight: normal;
  padding-top: 16px;
}

.login-dialog-timed-login-indicator {
  height: 2px;
  background-color: $osd_fg_color;
}

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

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

.login-dialog-prompt-label {
  color: $osd_fg_color;
  @include fontsize($font-size * 1.1);
  padding-top: 1em;
}

//
// Screen Shield
//
.unlock-dialog-clock {
  color: $_shell_fg_color;
  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;
    @extend %popup_menu;

    StIcon { -st-icon-style: symbolic; }

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

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

.unlock-dialog-notification-count-text {
  font-weight: bold;
  padding: 0 6px;
  color: $fg_color;
  border: 1px solid transparentize(white, 0.9);
  background-color: transparentize(white, 0.8);
  border-radius: 99px;
  margin-right: 12px;
}

.screen-shield-background { //just the shadow, really
  background: black;
  box-shadow: 0px 2px 4px transparentize(black,0.6);
}

#lockDialogGroup {
  background-color: $_system_bg_color;
}

#unlockDialogNotifications {
  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); }
  }
}

//
// Looking Glass
//
#LookingGlassDialog {
  margin: 4px;
  spacing: 4px;
  padding: 4px 4px 6px 4px;
  color: $osd_fg_color;
  @extend %shell_bg;

  & > #Toolbar {
    padding: 3px;
    border: none;
    background-color: transparent;
    border-radius: 0px;
  }
  .labels { spacing: 4px; }

  .notebook-tab {
    -natural-hpadding: 12px;
    -minimum-hpadding: 6px;
    font-weight: bold;
    color: $osd_fg_color;
    transition-duration: 100ms;
    padding-left: .3em;
    padding-right: .3em;

    &:hover {
      color: $_panel_fg_color;
      text-shadow: black 0px 2px 2px;
    }
    &:selected {
      border-bottom-width: 0px;
      color: $selected_bg_color;
      text-shadow: black 0px 2px 2px;
    }
  }
  StBoxLayout#EvalBox { padding: 4px; spacing: 4px; }
  StBoxLayout#ResultsArea { spacing: 4px; }
}

.lg-dialog {

  StEntry {
    caret-color: $selected_fg_color;
    selection-background-color: $selected_bg_color;
    selected-color: $selected_fg_color;

    @include entry(osd);
    &:focus {
      @include entry(osd-focus);

      selection-background-color: $selected_fg_color;
      selected-color: $selected_bg_color;
    }
  }
  .shell-link {
    color: $link_color;
    &:hover { color: lighten($link_color,10%); }
  }
  .actor-link {
    color: $osd_fg_color;
    &:hover { color: lighten($osd_fg_color, 10%); }
    &:active { color: darken($osd_fg_color, 10%); }
   }
}

.lg-completions-text {
  @include fontsize($font-size * 0.9);
  font-style: italic;
}

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

.lg-obj-inspector-button {
  border: 1px solid gray;
  padding: 4px;
  border-radius: 4px;
  &:hover { border: 1px solid #ffffff; }
}

#lookingGlassExtensions { padding: 4px; }

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

.lg-extension {
  border: 1px solid $osd_borders_color;
  border-radius: 2px;
  background-color: $osd_bg_color;
  padding: 4px;
}

.lg-extension-name {
  font-weight: bold;
}

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

#LookingGlassPropertyInspector {
  background: transparentize(black, 0.3);
  border: 1px solid grey;
  border-radius: 2px;
  color: $_shell_fg_color;
  padding: 6px;
}

//
// OpenWeather extension
//
.openweather-current-summarybox,
.openweather-forecast-icon,
.openweather-current-databox-captions,
.openweather-current-databox-values,
.openweather-current-icon,
.openweather-forecast-summary,
.openweather-forecast-temperature {
  color: $fg_color;
}
