$asset_path: assets;

$active_color: if($variant =='light', rgba(black, 0.26), rgba(white, 0.2));
$track_color: if($variant =='light', rgba(black, 0.20), rgba(white, 0.16));
$visit_color: if($variant =='light', rgba(black, 0.16), rgba(white, 0.12));
$divider_color: if($variant =='light', rgba(black, 0.12), rgba(white, 0.1));
$fill_color: if($variant =='light', rgba(black, 0.06), rgba(white, 0.05));

//
// Globals
//
$font-size: 9;
$font-family: Futura Bk bt, sans, Sans-Serif;
$_bubble_bg_color: transparentize($solid_osd_bg_color, 0.75);
$_bubble_fg_color: $osd_fg_color;
$_bubble_borders_color: transparentize($osd_fg_color, 0.8);

/* General Typography */
%large_title {
  font-weight: 300;
  @include fontsize(24pt);
}

%title_1 {
  font-weight: 800;
  @include fontsize(20pt);
}

%title_2 {
  font-weight: 800;
  @include fontsize(15pt);
}

%title_3 {
  font-weight: 700;
  @include fontsize(15pt);
}

%title_4 {
  font-weight: 700;
  @include fontsize(13pt);
}

%heading {
  font-weight: 700;
  @include fontsize(11pt);
}

%caption_heading {
  font-weight: 700;
  @include fontsize(9pt);
}

%caption {
  font-weight: 400;
  @include fontsize(9pt);
}

%smaller {
  font-weight: 400;
  @include fontsize(8pt);
}

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

.label-shadow {
  color: rgba(0, 0, 0, 0);
}

%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: 100ms;
  border-radius: $bt_radius;
  @include button(normal);

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

%flat_button {
  border-radius: $bt_radius;
  @include button(flat);

  &:hover { @include button(flat-hover); border-radius: $bt_radius; }
  &:active { @include button(flat-active); border-radius: $bt_radius; }
  &:insensitive { @include button(flat-insensitive); border-radius: $bt_radius; }
}

%osd_button {
  min-height: 20px;
  padding: 5px 32px;
  transition-duration: 100ms;
  border-radius: $bt_radius;

  @include button(osd);

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

//
// Entries
//
%entry {
  padding: $container_padding;
  caret-size: 1px;
  selection-background-color: $selected_bg_color;
  selected-color: $selected_fg_color;
  transition-duration: 300ms;
  border-radius: $bt_radius;

  @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;
  }
}

%osd_entry {
  padding: $container_padding;
  caret-size: 1px;
  caret-color: $osd_fg_color;
  selection-background-color: $selected_bg_color;
  selected-color: $selected_fg_color;
  transition-duration: 300ms;
  border-radius: $bt_radius;

  @include entry(osd);

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

//
// 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: 100px;
  }

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

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

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

.separator {
  -gradient-height: 1px;
  -gradient-start: rgba(0,0,0,0);
  -gradient-end: rgba(0,0,0,0);
  -margin-horizontal: 1.5em;
  height: 1em;
}

//
// Slider
//
.popup-slider-menu-item,
.slider {
  -slider-height: 0.3em;
  -slider-background-color: $borders_color;            //background of the trough
  -slider-border-color: transparent;                //trough border color
  -slider-active-background-color: $selected_bg_color; //active trough fill
  -slider-active-border-color: transparent;            //active trough border
  -slider-border-width: 0;
  -slider-handle-radius: 0.6em;
  height: 1.2em;
  min-width: 15em;
  color: white;

  .popup-menu-item:active & {
    -slider-background-color: rgba(black, 0.2);
    -slider-active-background-color: white;
  }
}

//
// Check Boxes
//
.check-box {
  CinnamonGenericContainer {
    spacing: .2em;
    min-height: 30px;
    padding-top: 2px;
  }

  StLabel { font-weight: normal; }

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

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

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

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

//
// Radio Buttons
//
.radiobutton {

  CinnamonGenericContainer {
    spacing: .2em;
    height: 26px;
    padding-top: 2px;
  }

  StLabel {
    padding-top: 4px;
    font-size: 0.9em;
    box-shadow: none;
  }

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

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

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

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

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

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

  .popup-menu-item:active & {
    background-image: url("#{$asset_path}/toggle-off.svg");

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

//
// Links
//
.cinnamon-link {
  color: $link_color;
  text-decoration: underline;

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

//
// Tooltip
//
#Tooltip {
  border-radius: $bt_radius;
  padding: 5px 12px;
  background-color: $osd_bg_color;
  color: $osd_fg_color;
  font-size: 1em;
  font-weight: normal;
  text-align: center;
}

//
// Popovers/Menus
//

.menu,
.popup-menu,
%menu {
  min-width: 15em;
  margin: 0;
  padding: 0 $container_padding $container_padding / 2;
  color: $fg_color;

  @if $trans == 'true' {
    border-image: url("assets/menu.svg") 20 20 23 20;
  }

  @else {
    border-image: url("assets/menu-solid.svg") 20 20 23 20;
  }

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

  .popup-sub-menu {
    border-radius: $bt_radius;
    background-gradient-direction: none;
    box-shadow: none;
    background-color: if($variant == 'light', rgba(white, 0.75), rgba(white, 0.15));

    // .popup-menu-item:ltr { padding-right: 8px; }
    // .popup-menu-item:rtl { padding-left: 8px; }

    StScrollBar {
      padding: 4px;
      StBin#trough, StBin#vhandle { border-width: 0; }
    }
  }

  .popup-menu-content {
    padding: 1em 6px 1em 6px;
    background-color: transparent;
    border: none;
    box-shadow: none;
  }

  .popup-menu-item {
    padding: .4em 1.75em;
    spacing: 1em;
    border-radius: $bt_radius;

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

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

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

    &:insensitive { color: $disabled_fg_color; }
  }

  .popup-menu-item:active .popup-inactive-menu-item { color: $selected_fg_color; }

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

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

.popup-combo-menu {
  @extend %menu;
  padding: 10px;
}

// .popup-image-menu-item {}

.popup-combobox-item { spacing: 1em; }

.popup-separator-menu-item {
  -gradient-height: 2px;
  -gradient-start: transparent;
  -gradient-end: transparent;
  -margin-horizontal: 1.5em;
  height: 1px;
  margin: 0;
  padding: 0;
  border-color: $borders_color;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  background-color: transparent;
}

.popup-alternating-menu-item:alternate {
  font-weight: normal;
}

.popup-device-menu-item { spacing: .5em; }

.popup-subtitle-menu-item { font-weight: normal; }

.nm-menu-item-icons { spacing: .5em; }

//
// Panel
//
#panel {
  font-weight: bold;
  min-height: 20px;
  min-width: 20px;

  &:highlight {
    border-image: none;
    background-color: transparentize($error_color, 0.5);
  }

  &Left {
    spacing: $base_margin;

    &:dnd {
      background-gradient-direction: vertical;
      background-gradient-start: rgba(255,0,0,0.05);
      background-gradient-end: rgba(255,0,0,0.2);
    }

    &:ltr { padding-right: $base_padding; }
    &:rtl { padding-left: $base_padding; }

    &.vertical {
      padding: 0;

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

  &Right {
    &:dnd {
      background-gradient-direction: vertical;
      background-gradient-start: rgba(0,0,255,0.05);
      background-gradient-end: rgba(0,0,255,0.2);
    }

    &:ltr { padding-left: $base_padding; spacing: 0px; }
    &:rtl { padding-right: $base_padding; spacing: 0px; }

    &.vertical {
      padding: 0;

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

  &Center {
    spacing: $base_margin;

    &:dnd {
      background-gradient-direction: vertical;
      background-gradient-start: rgba(0,255,0,0.05);
      background-gradient-end: rgba(0,255,0,0.2);
    }
  }
}

.panel {
  &-top, &-bottom, &-left, &-right {
    color: $panel_fg;
    font-size: 1em;
    padding: 0;
    background-color: $panel_bg;
    box-shadow: 0 0 5px rgba(#000, 0.5), 0 0 16px rgba(#000, 0.24);

    .panel-button,
    .panel-status-button {
      &:hover {
        color: $fg_color;
        background-color: rgba($fg_color, 0.1);
      }

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

  &-bottom {
    padding: 0 $base_padding / 2;

    .applet-box {
      margin: $base_padding / 2 0;
    }
  }

  &-dummy {
    background-color: transparentize($error_color, 0.5);

    &:entered { background-color: transparentize($error_color, 0.4); }
  }

  &-status-button {
    border-width: 0;
    -natural-hpadding: 3px;
    -minimum-hpadding: 3px;
    font-weight: bold;
    height: 22px;
    color: $panel_fg;
  }

  &-button {
    -natural-hpadding: 6px;
    -minimum-hpadding: 2px;
    font-weight: bold;
    transition-duration: 100ms;
    color: $panel_fg;
  }
}

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

//
// Overview
//
#overview { spacing: 12px; }

.window-caption {
  background-color: $osd_bg_color;
  border: 1px solid $osd_bg_color;
  color: $osd_fg_color;
  spacing: 25px;
  border-radius: $bt_radius;
  font-size: 9pt;
  padding: 5px 8px;
  -cinnamon-caption-spacing: 4px;

  &#selected {
    background-color: $selected_bg_color;
    color: $selected_fg_color;
    border: 1px solid $selected_bg_color;
    spacing: 25px;
  }
}

.expo-workspaces-name-entry,
.expo-workspaces-name-entry#selected {
  height: 15px;
  border-radius: $bt_radius;
  font-size: 9pt;
  padding: 5px 8px;
  -cinnamon-caption-spacing: 4px;
  @include entry(osd);

  &:focus {
    border: 1px solid $selected_bg_color;
    background-color: $selected_bg_color;
    color: $selected_fg_color;
    font-style: italic;
    transition-duration: 300;
    selection-background-color: $selected_fg_color;
    selected-color: $selected_bg_color;
  }
}

.expo-workspace-thumbnail-frame {
  border: 4px solid rgba(255,255,255,0.0);
  background-color: rgba(255,255,255,0.0);
  border-radius: $bt_radius;

  &#active {
    border: 4px solid $selected_bg_color;
    background-color: black;
    border-radius: $bt_radius;
  }
}

.expo-background {
  background-color: $solid_osd_bg_color;
}

.workspace {
  //&-controls { visible-height: 32px; }

  &-thumbnails {
    spacing: 26px;

    &-background, &-background:rtl { padding: 8px; }
  }

  &-add-button {
    background-image: url("#{$asset_path}/add-workspace.svg");
    height: 200px;
    width: 35px;
    transition-duration: 100;

    &:hover {
      background-image: url("#{$asset_path}/add-workspace-hover.svg");
      transition-duration: 100;
    }
    &:active {
      background-image: url("#{$asset_path}/add-workspace-active.svg");
      transition-duration: 100;
    }
  }
  &-overview-background-shade { background-color: rgba(0,0,0,0.5); }
}

.workspace-close-button,
.window-close {
  background-image: url("#{$asset_path}/close.svg");
  background-size: 26px;
  height: 26px;
  width: 26px;
  -cinnamon-close-overlap: 10px;

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

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

.workspace-thumbnail-indicator {
  outline: 2px solid $borders_color;
  border: 1px solid $highlight_color;
}

.window-close:rtl {
  -st-background-image-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}

.window-close-area {
  background-image: url("#{$asset_path}/trash-icon.svg");
  height: 120px;
  width: 400px;
}

//
// About Dialog (applet.js and desklet.js)
//
.about {
  &-content {
    width: 550px;
    height: 250px;
    spacing: 8px;
    padding-bottom: 10px;
  }
  &-title {
    font-size: 2em;
    font-weight: bold;
  }
  &-uuid {
    font-size: 10px;
    color: #888;
  }
  &-icon {
    padding-right: 20px;
    padding-bottom: 14px;
  }
  &-scrollBox {
    border: 1px solid $borders_color;
    border-radius: $bt_radius;
    background-color: $base_color;
    padding: 4px;
    padding-right: 0;
    border-radius: 0;

    &-innerBox {
      padding: 1.2em;
      spacing: 1.2em;
    }
  }
  &-description {
    padding-top: 4px;
    padding-bottom: 16px;
  }
  &-version {
    padding-left: 7px;
    font-size: 10px;
    color: #888;
  }
}

//
// Calendar
//
.calendar {
  padding: .4em 1.75em;
  spacing-rows: 0px;
  spacing-columns: 0px;
}

.calendar-month-label {
  color: $fg_color;
  font-weight: bold;
  margin: 0 2px;
  padding: 2px; // label centering
}

.calendar-today-home-button,
.calendar-today-home-button-enabled {
  margin: $container_padding 0;
  padding: $container_padding;
  border-radius: $bt_radius;
}

.calendar-today-home-button-enabled:hover {
  background-gradient-direction: vertical;
  background-gradient-start: $fill_color;
  background-gradient-end: $fill_color;
  box-shadow: none;
}

.calendar-today-day-label {
  font-size: 1.75em;
  color: $disabled_fg_color;
  font-weight: bold;
  text-align: center;
  padding-bottom: .1em;
}

.calendar-today-date-label {
  font-size: 1.1em;
  color: $disabled_fg_color;
  font-weight: bold;
  text-align: center;
}

.calendar-change-month-back,
.calendar-change-month-forward {
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border-radius: $circular_radius;

  &:focus, &:hover { background-color: rgba($fg_color, 0.1); }
  &:active { background-color: rgba($fg_color, 0.25); }
}

//arrow back
.calendar-change-month-back {
  background-image: url("#{$asset_path}/calendar-arrow-left.svg");

  &:rtl {
    background-image: url("#{$asset_path}/calendar-arrow-right.svg");
  }
}

//arrow forward
.calendar-change-month-forward {
  background-image: url("#{$asset_path}/calendar-arrow-right.svg");

  &:rtl {
    background-image: url("#{$asset_path}/calendar-arrow-left.svg");
  }
}

.datemenu-date-label {
  padding: .4em 1.75em;
  font-weight: normal;
  text-align: center;
  font-size: 14px;
  color: $fg_color;
  border-radius: $bt_radius;
}

.calendar-day-event-dot-box {
  margin-top: 22px;
  max-rows: 2;
}

.calendar-day-event-dot {
  margin: 1px;
  border-radius: 2px;
  width: 4px;
  height: 4px;
}

.calendar-day-base {
  text-align: center;
  min-width: 28px;
  height: 28px;
  padding: 0;
  margin: 2px;
  border-radius: $circular_radius;
  color: $alt_fg_color;

  &:hover {
    color: $fg_color;
    font-weight: bold;
    background-color: $fill_color;
  }

  &:active {
    color: $fg_color;
    font-weight: bold;
    background-color: $divider_color;
  }
}

.calendar-day-heading {
  color: transparentize($fg_color, 0.15);
  margin-top: 1em;
}

.calendar-day {
  border-width: 0;
  color: $alt_fg_color;
}

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

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

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

.calendar-today,
.calendar-today:active,
.calendar-today:focus,
.calendar-today:hover {
  font-weight: bold;
  color: $selected_fg_color;
  background-color: $selected_bg_color;
  border-width: 0;
}

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

.calendar-not-today {
  color: $alt_fg_color;

  &:selected {
    color: $fg_color;
    font-weight: bold;
  }
}

.calendar-week-number {
  min-width: 20px;
  height: 20px;
  margin: 6px 0;
  color: transparentize($fg_color, 0.3);
  font-weight: bold;
  background-color: rgba($fg_color, 0.05);
  border-radius: 100px;

  StLabel {
    padding: 0;
    margin-top: 3px;
  }
}

.calendar-events-main-box {
  height: 300px;
  margin: 8px 0.8em 0 0;
  padding: 8px;
  min-width: 350px;
  border: none;
  border-radius: $bt_radius;
  background-gradient-direction: vertical;
  background-gradient-start: $fill_color;
  background-gradient-end: $fill_color;
  color: $alt_fg_color;
}

.calendar-events-no-events-box {
}

.calendar-events-no-events-button {
  margin: 6px 0;
  padding: 6px;
  border-radius: $bt_radius;

  &:hover {
    background-gradient-direction: vertical;
    background-gradient-start: $fill_color;
    background-gradient-end: $fill_color;
    box-shadow: none;
  }
}

.calendar-events-no-events-icon {
  color: $disabled_fg_color;
}

.calendar-events-no-events-label {
  font-size: 1.1em;
  color: $disabled_fg_color;
  font-weight: bold;
  text-align: center;
  margin-top: 10px;
}

.calendar-events-date-label {
  padding: 3px 0 12px 3px;
  font-size: 1.1em;
  color: $alt_fg_color;
  font-weight: bold;
  text-align: center;
}

.calendar-events-event-container {
  padding: 2px;
}

.calendar-events-scrollbox {
}

.calendar-events-main-box .separator {
  -margin-horizontal: 1em;
  -gradient-height: 1px;
  -gradient-start: $borders_color;
  -gradient-end: $borders_color;
}

.calendar-event-button {
  margin: 6px 0;
  border-radius: $bt_radius;
  background-color: $fill_color;

  &:hover {
    background-gradient-direction: none;
    box-shadow: none;
    background-color: $divider_color;
  }

  &:active {
    background-gradient-direction: none;
    box-shadow: none;
    background-color: $track_color;
  }
}

.calendar-event-color-strip {
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.calendar-event-row-content {
  margin: 6px;
}

.calendar-event-time-past {
  color: $disabled_fg_color;
  font-weight: bold;
  text-align: left;
  margin-bottom: .6em;
}

.calendar-event-time-present {
  font-weight: bold;
  text-align: left;
  margin-bottom: .6em;
}

.calendar-event-time-present:all-day {
  color: rgba($success_color, 0.6);
}

.calendar-event-time-future {
  text-align: left;
  margin-bottom: .6em;
}

.calendar-event-countdown {
  color: $disabled_fg_color;
  font-weight: bold;
  text-align: right;
  margin-bottom: .6em;
}

.calendar-event-countdown:soon {
  color: white;
}

.calendar-event-countdown:imminent {
  color: rgba($warning_color, 0.6);
}

.calendar-event-countdown:current {
  color: rgba($success_color, 0.6);
}

.calendar-event-summary {
  color: $disabled_fg_color;
  text-align: left;
  width: 200px;
}

//
// Notifications
//
#notification {
  border-radius: $wm_radius;
  padding: 12px;
  spacing-rows: 10px;
  spacing-columns: 10px;
  margin-from-right-edge-of-screen: 20px;
  width: 34em;
  color: $text_color;
  background-color: $menu_bg;
  box-shadow: 0 5px 12px rgba(black, 0.25);

  .notification-button, .notification-icon-button {
    @extend %flat_button;
    padding: 5px;
  }

  StEntry { @extend %entry; }

  .menu &,
  .popup-menu & {
    border: none;
    border-radius: $bt_radius;
    background-color: rgba($fg_color, 0.05);
    box-shadow: none;

    &:hover, &:selected {
      background-color: rgba($fg_color, 0.1);
      box-shadow: 0 3px 8px rgba(black, 0.15);
    }

    &, &.multi-line-notification { color: $text_color; }

    .notification-button, .notification-icon-button {
      @extend %flat_button;
      padding: $container_padding;
    }

    StEntry { @extend %entry; }
  }

  &.multi-line-notification {
    padding-bottom: 13px;
    color: $text_color;
  }

  &-scrollview {
    max-height: 10em;

    > .top-shadow, > .bottom-shadow { height: 1em; }

    &:ltr > StScrollBar { padding-left: 6px; }
    &:rtl > StScrollBar { padding-right: 6px; }
  }

  &-body { spacing: 5px; }
  &-actions { spacing: 10px; }
}

.notification {

  &-with-image {
    min-height: 159px;
    color: $text_color;
  }

  &-button, &-icon-button {
    @extend %flat_button;
    padding: 5px;
  }

  &-icon-button > StIcon { icon-size: 36px; }

  StEntry { @extend %entry; }
}

//
// Alt Tab
//
#altTabPopup {
  padding: 8px;
  spacing: 16px;
}

.switcher-list {
  color: $text_color;
  background-color: $menu_bg;
  border: none;
  border-radius: $bt_radius;
  padding: 20px;

  @if $trans == 'true' {
    border-image: url("assets/menu.svg") 20 20 23 20;
  }

  @else {
    border-image: url("assets/menu-solid.svg") 20 20 23 20;
  }

  > StBoxLayout {
    padding: 4px;
  }

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

  .item-box {
    padding: 8px;
    border-radius: $bt_radius;

    &:outlined {
      padding: 8px;
      border: 1px solid $selected_bg_color;
    }

    &:selected {
      color: $selected_fg_color;
      background-color: $selected_bg_color;
      border: 0px solid $selected_bg_color;
    }
  }

  .thumbnail { width: 256px; }

  .thumbnail-box {
    padding: 2px;
    spacing: 4px;
  }
  .separator {
    width: 1px;
    background: rgba(255,255,255,0.2);
  }
}

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

  &:highlighted {
    border-color: rgba(0,0,0,0);
    color: $panel_fg;
  }
}

//.switcher-preview-backdrop { background-color: rgba(25,25,25,0.95); }

.thumbnail-scroll-gradient-left {
  background-color: rgba(0, 0, 0, 0);
  border-radius: 24px;
  border-radius-topright: 0px;
  border-radius-bottomright: 0px;
  width: 60px;
}

.thumbnail-scroll-gradient-right {
  background-color: rgba(0, 0, 0, 0);
  border-radius: 24px;
  border-radius-topleft: 0px;
  border-radius-bottomleft: 0px;
  width: 60px;
}

//
//Activities Ripples
//
.ripple-box {
  width: 104px;
  height: 104px;
  background-image: url("#{$asset_path}/corner-ripple.svg");
  background-size: contain;
}

//
// Modal dialogs
//
.lightbox { background-color: rgba(0, 0, 0, 0.4); }
.flashspot { background-color: white; }

.dialog,
.modal-dialog {
  @extend %osd_window;

  > StBoxLayout:first-child {
    padding: 20px 10px 10px 10px;
  }

  &-button-box {
    spacing: $container_padding;
    margin: 0;
    padding: $container_padding;
    background-color: transparent;
    border: none;
  }

  &-button {
    padding: $container_padding $container_padding * 2;
    min-height: 24px;
    min-width: 100px;
    @extend %osd_button;

    &:not(:last-child) {
      margin-right: $container_padding;
    }

    &:destructive-action {
      background-color: $destructive_color;
      color: white;

      &:hover {
        background-color: lighten($destructive_color, 8%);
      }

      &:active {
        background-color: darken($destructive_color, 8%);
      }

      &:insensitive {
        background-color: rgba($destructive_color, 0.3);
        color: rgba(white, 0.3);
      }
    }

    &:default {
      background-color: $suggested_color;
      color: white;

      &:hover {
        background-color: lighten($suggested_color, 8%);
      }

      &:active {
        background-color: darken($suggested_color, 8%);
      }

      &:insensitive {
        background-color: rgba($suggested_color, 0.3);
        color: rgba(white, 0.3);
      }
    }
  }

  &-content-box {
    margin-top: 8px;
    margin-bottom: 16px;
    spacing: 32px;
    max-width: 28em;
  }

  .confirm-dialog-title {
    @extend %title_2;
    text-align: center;
  }
}


// Lists in dialogs

.dialog-list {
  spacing: $base_padding * 3;

  .dialog-list-title {
    @extend %heading;
    text-align: center;
  }

  .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 {
        @extend %caption;
        color: darken($osd_fg_color, 5%);
      }
    }
  }
}

// End session dialog

.end-session-dialog {
  min-width: 40em;

  .dialog-content-box { spacing: 0; }

  .dialog-list {
    spacing: 0;

    .dialog-list-title {
      color: $warning_color;
      background-color: tranparentize($warning_color, 0.9);
      padding: $base_padding * 1.5;
      border-radius: $bt_radius;
      margin: $base_margin 0;
    }
  }
}

// message dialog

.message-dialog-content {
  spacing: $base_padding * 3;

  .message-dialog-title {
    text-align: center;
    @extend %title_2;

    &.lightweight { @extend %title_4; }
  }

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

  .message-dialog-caption {
    @extend %caption; 
    text-align: center;
  }
}

//
// Run dialog
//
.run-dialog {
  .dialog-content-box {
    margin: $base_margin;
  }

  &-description {
    @extend %caption;
    text-align: center;
    color: $osd_fg_color;

    &.error { color: $error_color; }
  }

  &-label {
    font-size: 0;
    font-weight: bold;
    color: $osd_fg_color;
    padding-bottom: 0;
  }

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

  &-error-box {
    padding-top: 15px;
    spacing: $base_padding;
  }

  &-completion-box {
    padding-top: $base_padding;
    padding-left: $base_padding * 2;
  }

  &-entry {
    width: 21em;
    @extend %osd_entry;
  }

  .dialog-button-box,
  .modal-dialog-button-box {
    border: none;
    box-shadow: none;
    background: none;
    background-gradient-direction: none;
  }
}

// password or authentication dialog

.prompt-dialog {
  width: 26em;

  .dialog-content-box {
    spacing: $base_margin * 4;
    margin-bottom: $base_margin * 3;
  }

  &-password-entry {
    @extend %osd_entry;
    width: 20em;
  }

  &-password-layout { spacing: $base_margin * 2; }

  &-error-label,
  &-info-label,
  &-null-label {
    text-align: center;
    @extend %caption;
  }

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

// polkit dialog

.polkit-dialog {
  &-user-layout {
    text-align: center;
    spacing: $container_padding;
  }

  &-user-combo {
    @extend %osd_button;
    @extend %heading;
    border-radius: $bt_radius;
    padding: $base_padding $base_padding * 6;
    margin: $base_padding * 2 0 $base_padding 0;

    // special case the :insensitive button sinc we want
    // the label to be the normal color when there are
    // not multiple users
    &:insensitive { color: $osd_fg_color; }
  }
}

// Audio selection dialog

.audio-device-selection-dialog {
  min-width: 24em;

  .audio-selection-box {
    spacing: $base_padding *2;

    .audio-selection-device {
      @extend %osd_button;
      border-radius: $bt_radius;

      .audio-selection-device-box {
        padding: $base_padding * 2;
        spacing: $base_padding * 2;
      }

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

/* CinnamonMountOperation Dialogs */
.cinnamon-mount-operation-icon {
  icon-size: 48px;
}

.mount-password-reask {
  color: $warning_color;
}

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

  &-subject {
    padding-top: 10px;
    padding-left: 17px;
    padding-bottom: 6px;

    &:rtl {
      padding-left: 0px;
      padding-right: 17px;
    }
  }
  &-description {
    padding-left: 17px;
    width: 28em;

    &:rtl { padding-right: 17px; }
  }
}

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

  &:rtl {
    padding-right: 49px;
    padding-left: 32px;
  }

  &-item {
    color: #ccc;

    &:hover { color: white }

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

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

    &-name { font-size: 1.1em; }
  }
}

//
// Magnifier
//
.magnifier-zoom-region {
  border: 2px solid rgba(128, 0, 0, 1);

  .full-screen { border-width: 0px; }
}

//
// On-Screen Keyboard
//
#keyboard {
  background-color: $osd_bg_color;
  border-width: 0;
  border-top-width: 1px;
  border-color: transparentize(black, 0.6);
}

.keyboard-layout {
  spacing: 10px;
  padding: 10px;
}

.keyboard-row {
  spacing: 15px;
}

.keyboard-key {
  min-height: 2em;
  min-width: 2em;
  font-size: 14pt;
  font-weight: bold;
  border-radius: $bt_radius;
  box-shadow: none;

  @include button(osd);

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

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

.keyboard-subkeys { //long press on a key popup
  color: $osd_fg_color;
  padding: 5px;
  -arrow-border-radius: $bt_radius;
  -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;
}

//
// Cinnamon Specific Section
//

//
// Menu (menu.js)
//
.menu {
  &-favorites-box {
    margin: 0 0 8px 1px;
    padding: 6px;
    transition-duration: 300;
    background-color: rgba($fg_color, 0.05);
    border: none;
    border-radius: $bt_radius;
  }

  &-favorites-button {
    padding: 10px;
    border: none;
    border-radius: $bt_radius;

    &:hover {
      border-radius: $bt_radius;
      background-color: rgba($fg_color, 0.1);
    }
  }

  &-places {
    &-box {
      margin: auto;
      padding: 10px;
      border: 1px solid rgba(0,0,0,0);
    }

    &-button { padding: 10px; }
  }

  &-categories-box { padding: 10px 30px 10px 30px; }

  &-applications-inner-box,
  &-applications-outer-box { padding: 10px 10px 0 10px; }

  &-application-button {
    padding: 6px;
    border-radius: $bt_radius;
    border: none;

    // This style is used in menu application buttons for applications which were newly installed
    &:highlighted { font-weight: bold; }

    &-selected {
      @include button(active);
      padding: 6px;
      border-radius: $bt_radius;
      border: none;

      &:highlighted { font-weight: bold; }
    }

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

  StScrollView.menu-application-button { // extracted submenu container
    padding: 3px 0;
    border-radius: $bt_radius;
    background-color: $base_color;

    .popup-menu-item {
      padding: 0;
      spacing: 0;
      margin: 0 3px;
      border-radius: $bt_radius;

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

      &:active {
        border-image: none; // image independent
        background-color: $selected_bg_color;
      }

      StIcon { min-width: 22px; } // indentation

      StLabel {
        &:ltr { padding: 6px 0 7px 5px; }
        &:rtl { padding: 6px 5px 7px 0; }
      }
    }
  }

  &-category-button {
    padding: 6px;
    border-radius: $bt_radius;

    &-selected {
      padding: 6px;
    }
    &-hover, &-selected {
      @include button(flat-hover);
      border-radius: $bt_radius;
    }
    &-greyed {
      padding: 6px;
      color: $disabled_fg_color;
    }

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

  // Name and description of the currently hovered item in the menu
  // This appears on the bottom right hand corner of the menu
  &-selected-app-box {
    padding-right: 30px;
    padding-left: 28px;
    text-align: right;
    height: 30px;

    &:rtl {
      padding-top: 10px;
      height: 30px;
    }
  }

  &-selected-app-title { font-weight: bold; }

  &-selected-app-description { max-width: 150px; }

  &-search-box:ltr { padding-left: 30px; }
  &-search-box-rtl { padding-right: 30px; }
}

#menu-search-entry {
  min-width: 250px;
  min-height: 16px;
  font-weight: normal;
  caret-color: $fg_color;

  @extend %entry;
}

.menu-search-entry-icon {
  icon-size: 1em;
  color: $fg_color;
}

// Context menu (at the moment only for favorites)
// .menu-context-menu { }

//
// OSD
//

%osd_window {
  color: $osd_fg_color;
  background-color: $osd_bg_color;
  box-shadow: inset 0 0 0 1px rgba(white, 0.08);
  border: 1px solid black;
  border-radius: $wm_radius * 1.5;
  text-align: center;
  padding: 20px;
}

.info-osd {
  font-weight: bold;
  spacing: 1em;
  @extend %osd_window;
}

.osd-window {
  font-weight: bold;
  spacing: 1em;
  min-width: 64px;
  min-height: 64px;
  @extend %osd_window;

  .osd-monitor-label { font-size: 3em; }

  .level {
    padding: 0;
    height: 4px;
    background-color: rgba(black, 0.35);
    border-radius: $bt_radius;
    color: $selected_bg_color;
  }

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

.media-keys-osd {
  font-weight: bold;
  font-size: 1.182em;
  @extend %osd_window;

  margin-bottom: 1em;
  border-radius: 9999px;
  spacing: 12px;
  padding: 12px 24px;

  > * { spacing: 12px; }
  StIcon { icon-size: 32px; }
  StLabel:ltr { margin-right: 6px; }
  StLabel:rtl { margin-left: 6px; }

  .level {
    min-width: 160px;
    -barlevel-height: 6px;
    -barlevel-background-color: #303030;
    -barlevel-active-background-color: white;
    -barlevel-amplify-color: #f8e45c;
    -barlevel-amplify-separator-width: 3px;
  }

  .level:ltr { margin-right: 6px; }
  .level:rtl { margin-left: 6px; }

  .level-bar {
    border-radius: 8px;
    background-color: white;
  }
}

//
// Workspace OSD
//

.workspace-osd {
  text-shadow: black 5px 5px 5px;
  font-weight: bold;
  font-size: 48pt;
}

.workspace-switch-osd {
  min-width: 140px;
  margin-bottom: 1em;
  border-radius: 9999px;
  font-weight: bold;
  padding: 12px 36px 0 36px;
}

.workspace-switch-osd-indicator-box { spacing: 12px; }

.workspace-switch-osd-indicator {
  background-color: rgba(255, 255, 255, 0.5);
  padding: 3px;
  margin: 12px;
  border-radius: 32px;

  &:active {
    background-color: #3584e4;
    padding: 6px;
    margin: 12px;
  }
}

.monitor-label {
  border-radius: 0;
  color: black;
  padding: 12px;
  text-align: center;
}

.resize-popup {
  padding: 12px;
}

//
// Window list (windowList.js)
//

.window-list {
  &-box {
    spacing: 2px;

    .panel-bottom &,
    .panel-top & {
      &:ltr { padding: 0 0 0 8px; }
      &:rtl { padding: 0 8px 0 0; }
    }

    &.vertical {
      padding: 6px 0 0 0;

      #appMenuIcon {
        padding-top: 2px;
      }
    }

    &:highlight { background-color: rgba($error_color, 0.5); }
  }

  &-item-label {
    font-weight: normal;
    width: 15em;
    min-width: 5px;
  }

  &-item-box {
    font-weight: normal;
    background-image: none;
    transition-duration: 100;
    color: rgba($panel_fg, 0.9);
    border-radius: $bt_radius;

    .panel-bottom & StLabel { padding-left: 6px; }
    .panel-top & StLabel { padding-left: 6px; }
    .panel-left & StLabel { padding-top: 6px; }
    .panel-right & StLabel { padding-top: 6px; }

    @each $position in (top),
                       (bottom),
                       (left),
                       (right) {
      .panel-#{$position} & {
        border-#{$position}-width: 2px;
        StIcon, StBin, #appMenuIcon { padding: 2px; padding-#{$position}: 0; }
      }
    }

    &:hover {
      color: $panel_fg;
      background-gradient-direction: none;
      background-color: rgba($panel_fg, 0.15);
    }

    &:active,
    &:checked,
    &:running {
      color: $panel_fg;
      background-gradient-direction: none;
      background-color: rgba($panel_fg, 0.25);

      &:hover {
        background-color: rgba($panel_fg, 0.3);
      }
    }

    &:focus {
      color: $panel_fg;
      background-gradient-direction: none;
      background-image: radial-gradient(5px 5px 45deg, circle cover, $panel_fg 0%, $panel_fg 100%);

      @each $position in (top),
                         (bottom),
                         (left),
                         (right) {
        .panel-#{$position} & {
          background-position: #{$position} center;
        }
      }
    }

    &.right, &.left {
      padding-left: 0px;
      padding-right: 0px;
    }

    .progress {
      background-gradient-direction: vertical;
      background-gradient-start: $progress_color;
      background-gradient-end: $progress_color;
      border-radius: $bt_radius;
      box-shadow: none;
    }
  }

  &-item-demands-attention {
    background-gradient-start: $warning_color;
    background-gradient-end: $warning_color;
  }

  // >= 3.6.7
  &-preview { // thumbnail popup windows = .switcher-list
    padding: 16px; // = .switcher-list - .item-box
    spacing: 8px; // = .switcher-list-item-container
    border: none;
    background-color: $base_color;
    border-radius: $bt_radius;
    color: $fg_color;
    box-shadow: 0 3px 5px rgba(#000, 0.35), 0 3px 12px rgba(#000, 0.16);
  }
}

//
// Grouped window list (grouped-window-list@cinnamon.org) // >= 4.0
//

.grouped-window-list {
  &-thumbnail-label {
    padding-left: $base_padding;
  }

  &-thumbnail-alert {
    background-color: rgba($error_color, 0.5);
  }

  &-thumbnail-menu {
    padding: $container_padding + 6px $container_padding + 6px $container_padding + 10px;
    margin: $base_padding / 2;

    @if $trans == 'true' {
      border-image: url("assets/menu.svg") 20 20 23 20;
    }
  
    @else {
      border-image: url("assets/menu-solid.svg") 20 20 23 20;
    }

    .item-box {
      padding: $container_padding;
      border-radius: $bt_radius;
      spacing: $container_padding;
      margin: $base_padding / 2;

      &:outlined {
        background-color: rgba($fg_color, 0.1);
      }

      &:hover {
        background-color: rgba($fg_color, 0.15);
      }
    }

    .thumbnail {
      width: 256px;
    }

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

  &-button-label {
    padding-left: $base_padding;
  }

  &-number-label {
    font-size: 0.8em;
    z-index: 99;
    text-shadow: none;
    color: $selected_fg_color;
    padding: 0.1em;
  }

  &-badge {
    border-radius: $circular_radius;
    background-color: $selected_bg_color;
  }

  &-item-box {
    font-weight: normal;
    transition-duration: 100;
    border: none;
    margin: 0;
    color: rgba($panel_fg, 0.6);
    border-radius: 0;
    spacing: $base_padding / 2;

    &.top, &.bottom {
      padding: 0 $base_padding / 2;
    }

    &.top {
      border-top: 2px solid transparent;
    }

    &.bottom {
      border-bottom: 2px solid transparent;
    }

    &.left {
      border-left: 2px solid transparent;
    }

    &.right {
      border-right: 2px solid transparent;
    }

    &:hover {
      color: $panel_fg;
      background-gradient-direction: none;
      background-color: rgba($panel_fg, 0.15);
    }

    &:active {
      color: $panel_fg;
      background-gradient-direction: none;
      background-color: transparent;
      border-color: rgba($panel_fg, 0.5);

      &:hover {
        background-color: rgba($panel_fg, 0.15);
      }
    }

    &:focus {
      color: $panel_fg;
      background-gradient-direction: none;
      background-color: rgba($panel_fg, 0.2);
      border-color: $selected_bg_color;

      &:hover {
        background-color: rgba($panel_fg, 0.3);
      }
    }

    .progress {
      background-gradient-direction: vertical;
      background-gradient-start: $progress_color;
      background-gradient-end: $progress_color;
      border-radius: $bt_radius;
      box-shadow: none;
    }
  }

  &-item-demands-attention {
    background-color: $destructive_color;
  }
}

///
// Sound Applet (status/volume.js)
//
.sound-button {
  width: 22px;
  height: 13px;
  padding: 8px;

  @extend %button;

  &-container {
    padding-right: 3px;
    padding-left: 3px;
  }
  StIcon { icon-size: 1.4em; }
}

.sound-track {
  &-infos { padding: 5px; }
  &-info {
    padding-top: 2px;
    padding-bottom: 2px;

    StIcon { icon-size: 16px; }

    StLabel {
      padding-left: 5px;
      padding-right: 5px;
    }
  }
  &-box {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 220px;
  }
}

.sound-seek-box {
  padding-left: 15px;

  StLabel { padding-top: 2px; }
  StIcon { icon-size: 16px; }
}

.sound-seek-slider { width: 140px; }

.sound-volume-menu-item {
  padding: .4em 1.75em;

  StIcon {
    icon-size: 1.14em;
    padding-left: 8px;
    padding-right: 8px;
  }
}

.sound-playback-control { padding: 5px 10px 10px 10px; }

// 2.8
.sound-player {
  padding: 0 0;
  margin-top: 6px;
  border-radius: $bt_radius;
  background-color: if($variant == 'light', rgba(white, 0.75), rgba(white, 0.15));

  > StBoxLayout:first-child {
    padding: 5px 10px 10px 10px;
    spacing: 0.5em;

    StButton:small {
      width: 24px;
      height: 24px;
      border-radius: 100px;

      &:hover { background-color: rgba($fg_color, 0.1); }
      &:active { background-color: rgba($fg_color, 0.25); }

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

  &-generic-coverart {
    background: rgba(black, 0.2);
  }

  &-overlay {
    width: 290px;
    height: 80px;
    padding: 12px 16px 8px;
    spacing: 0.5em;
    background-color: if($variant == 'light', rgba(#454545, 0.9), rgba(#686868, 0.9));
    border: none;
    border-radius: 0 0 $bt_radius $bt_radius;
    color: $osd_fg_color;

    StButton {
      width: 16px;
      height: 16px;
      padding: 8px;
      margin: 0 6px 6px;
      color: $osd_fg_color;
      border-radius: 100px;
      border: none;

      StIcon { icon-size: 16px; }

      &:hover { background-color: rgba($osd_fg_color, 0.1); }
      &:active { background-color: rgba($osd_fg_color, 0.25); }
      &:insensitive {
        opacty: 0.35;
        color: rgba($osd_fg_color, 0.35);
      }
    }

    StLabel { padding: 0 6px; }

    StBoxLayout {
      padding-top: 2px;
    }
  }

  .slider {
    height: 0.5em;
    padding: 0;
    border: 0px solid darken($solid_osd_bg_color, 8%);
    border-bottom: 1px;
    -slider-height: 0.5em;
    -slider-background-color: if($variant == 'light', $button_border, darken($bg_color, 5%));
    -slider-border-color: transparent;
    -slider-active-background-color: $selected_bg_color;
    -slider-active-border-color: transparent;
    -slider-border-width: 0px;
    -slider-handle-radius: 1em;
  }
}

//
// Workspace Switcher applet (workspaceSwitcher.js)
//
#workspaceSwitcher {
  spacing: 0px;
  padding: 3px;
}

/* Controls the styling when using the "Simple buttons" option */
.workspace-switcher {
  padding-left: 3px;
  padding-right: 3px;
}

.workspace-button {
  width: 20px;
  height: 10px;
  color: $panel_fg;
  padding: 3px;
  padding-top: 4px;
  transition-duration: 300;

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

/* Controls the style when using the "Visual representation" option */
.workspace-graph {
  padding: 3px;
  spacing: 3px;
}

.workspace-graph .workspace {
  border: 1px solid transparentize(black, 0.6);
  background-gradient-direction: none;
  background-color: transparentize(black, 0.8);
}

.workspace-graph .workspace:active {
  border: 1px solid $selected_bg_color;
  background-gradient-direction: none;
}

.workspace-graph .workspace .windows {
  -active-window-background: lighten($panel_bg, 15%);
  -active-window-border: rgba(0, 0, 0, 0.8);
  -inactive-window-background: lighten($panel_bg, 15%);
  -inactive-window-border: rgba(0, 0, 0, 0.8);
}

.workspace-graph .workspace:active .windows {
  -active-window-background: lighten($panel_bg, 20%);
  -active-window-border: rgba(0, 0, 0, 0.8);
  -inactive-window-background: lighten($panel_bg, 5%);
  -inactive-window-border: rgba(0, 0, 0, 0.8);
}

//
// Panel Launchers Applet (panelLaunchers.js)
//
#panel-launchers-box {
  padding: 0 6px;

  &.vertical {
    padding: 3px 0;
  }
}

.panel-launcher {
  padding: 2px;
  transition-duration: 200ms;
  border-radius: $bt_radius;

  &:hover {
    background-gradient-direction: none;
    background-color: rgba($fg_color, 0.1);
  }

  &:active {
    background-color: rgba($fg_color, 0.2);
  }
}

// 3.2.x
.launcher {
  padding: 2px;
  spacing: 2px;
  transition-duration: 0.2s;
  border-radius: $bt_radius;

  &:hover {
    background-gradient-direction: none;
    background-color: rgba($fg_color, 0.1);
  }

  &:active {
    background-color: rgba($fg_color, 0.2);
  }

  .icon-box { padding: 2px; }
}

//
// Overview corner
//
#overview-corner {
//  background-image: url("#{$asset_path}/overview.png");

//  &:hover { background-image: url("#{$asset_path}/overview-hover.png"); }
}

//
// Applets (applet.js)
//
.applet {
  &-separator { padding: 1px 4px; }

  &-separator-line {
    width: 1px;
    background: rgba($panel_fg, 0.12);
  }

  &-box {
    padding: 0 8px;
    spacing: $base_margin;
    color: $panel_fg;
    text-shadow: none;
    transition-duration: 100;
    border-radius: $bt_radius;

    &.vertical {
      padding: 8px 0;
    }

    &:hover {
      color: $panel_fg;
      background-color: rgba($panel_fg, 0.15);
    }

    &:checked, &:checked:hover {
      color: $panel_fg;
      background-color: rgba($panel_fg, 0.25);
    }

    &:highlight {
      background-image: none;
      border-image: none;
      background-color: transparentize($error_color, 0.5);
    }
  }

  &-label {
    font-weight: bold;
    color: $panel_fg;

    .applet-box:checked & {
      color: $panel_fg;
      text-shadow: none;
    }
  }

  &-icon {
    color: $panel_fg;
    icon-size: 16px;

    .applet-box:checked & {
      color: $panel_fg;
      text-shadow: none;
    }
  }
}

//
// User Applet
//
.user-icon {
    width: 32px;
    height: 32px;
    background-color: transparent;
    border: none;
    border-radius: 32px;
}

.user-label {
    color: $fg_color;
    font-size: 1em;
    font-weight: bold;
    margin: 0px;
}

//
// Desklets (desklet.js)
//
.desklet {
  color: $osd_fg_color;

  &:highlight {
    background-color: transparentize($error_color, 0.5);
  }

  &-with-borders {
    color: $osd_fg_color;
    background-color: $osd_bg_color;
    padding: 12px;
    padding-bottom: 16px;

    &:highlight {
      background-color: transparentize($error_color, 0.5);
    }
  }
  &-with-borders-and-header {
    color: $osd_fg_color;
    background-color: $osd_bg_color;
    border-radius: 6px;
    border-radius-topleft: 0;
    border-radius-topright: 0;
    padding: 12px;
    padding-bottom: 17px;

    &:highlight {
      background-color: transparentize($error_color, 0.5);
    }
  }
  &-header {
    color: $osd_fg_color;
    background-color: $osd_bg_color;
    border-radius: 0;
    border-radius-topleft: 6px;
    border-radius-topright: 6px;
    font-size: 1em;
    padding: 12px;
    padding-bottom: 6px;
  }
  &-drag-placeholder {
    border: 2px solid $selected_bg_color;
    background-color: transparentize($selected_bg_color, 0.7);
  }
}

.photoframe-box {
  color: $osd_fg_color;
  background-color: $osd_bg_color;
  padding: 12px;
  padding-bottom: 16px;
}

//
// Notification Applet
//
.notification-applet-padding { padding: .5em 1em; }

.notification-applet-container { max-height: 100px; }

//
// Tile Preview
//
.tile-preview, .tile-preview.snap,
.tile-hud, .tile-hud.snap {
  background-color: transparentize($selected_bg_color, 0.7);
  border: 1px solid $selected_bg_color;
}

//
// Xkcd Desklet
//
.xkcd-box {
  padding: 6px;
  border: 0px;
  background-color: rgba(0,0,0,0);
  border-radius: 0px;
}
