// the panel widget at the top
#panel_window {
  background-color: $panel_bg;
  color: $panel_fg;
  font-weight: bold;
  box-shadow: inset 0 -1px darken($panel_bg, 7%);

  // the menubars/menus of the panel, i.e. indicators
  menubar,
  menubar > menuitem {
    background-color: transparent;
    color: $panel_fg;
    font-weight: bold;
  }

  menubar menuitem:disabled {
    color: transparentize($panel_fg, 0.5);

    label { color: inherit; }
  }
  menubar menu > menuitem { font-weight: normal; }
}

// the login window
#login_window,
#shutdown_dialog,
#restart_dialog {
  font-weight: normal;
  border-style: none;
  background-color: transparent;
  color: $fg_color;
}

// the top half of the login-window, in GtkDialog terms, the content
#content_frame {
  padding-bottom: 14px;
  background-color: $bg_color;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  border: solid transparentize(black, 0.9);
  border-width: 1px 1px 0 1px;
}

#content_frame button {
  @include button(normal);

  &:hover { @include button(hover); }
  &:active, &:checked { @include button(active); }
  &:disabled { @include button(insensitive); }
}

// the lower half of the login-window, in GtkDialog terms the buttonbox or action area
#buttonbox_frame {
  padding-top: 20px;
  padding-bottom: 0px;
  border-style: none;
  background-color: if($variant=='light', $osd_bg_color, $header_bg);
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  border: solid transparentize(black, 0.9);
  border-width: 0 1px 1px 1px;
  box-shadow: inset 0 1px if($variant=="light", $dark_sidebar_border, $header_border);
}

#buttonbox_frame button {
  @include button(osd);

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

#login_window #user_combobox {
  color: $fg_color;
  font-size: 13px;

  menu { font-weight: normal; }
}

// the user's avatar box
#user_image {
  padding: 3px;
  border-radius: 2px;
}

// the border around the user's avatar box
#user_image_border {}

// the shutdown button
#shutdown_button.button {
  @include button(suggested_destructive, $destructive_color);

  &:hover { @include button(suggested_destructive, lighten($destructive_color, 10%)); }
  &:active, &:checked { @include button(suggested_destructive, darken($destructive_color, 10%)); }
}

// the restart button
#restart_button.button {
  @include button(suggested_destructive, $suggested_color);

  &:hover { @include button(suggested_destructive, lighten($suggested_color, 10%)); }
  &:active, &:checked { @include button(suggested_destructive, darken($suggested_color, 10%)); }
}

// the warning, in case a wrong password is entered or something else goes wrong according to PAM
#greeter_infobar {
  border-bottom-width: 0;
  font-weight: bold;
}

//
// Lightdm
//

window.background.lightdm {
  menubar {
    > menuitem { padding : 0 5px 0 5px; }
  }

  button {

    &.flat.option-button {
      background-color: transparent;
      color: #dadada;

      &:hover {
        border-color: transparentize($borders_color, 0.8);
        background-color: transparentize(black, 0.5);
      }

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

    &,
    &.toggle-button {
      border-color: transparent;
      background-color: transparent;
      color: #dadada;

      &:hover {
        border-color: transparentize($borders_color, 0.8);
        background-color: transparentize(black, 0.5);
      }

      &:active,
      &.selected {
        border-color: transparentize($borders_color, 0.8);
        background-color: $selected_bg_color;
        color: $selected_fg_color;
      }
    }
  }

 entry {
    background-image: none;
    border-image: none;
    background-color: transparentize(black, 0.7);
    border-color: transparentize(white, 0.4);
    border-radius: 5px;
    padding: 7px;
    color: white;
    text-shadow: none;
    caret-color: white;

    &:focus {
      border-color: transparentize(white, 0.1);
      border-width: 1px;
      border-style: solid;
      color: white;
    }

    &:selected {background-color: transparentize(white, 0.8); }

    &:active {
      -gtk-icon-source: -gtk-icontheme('process-working-symbolic');
      animation: dashentry_spinner 1s infinite linear;
    }

    image { color: white; }
  }

  .lightdm-combo {
    border-radius: 0;
    background-color: transparent;
  }
}
