/********************************************************************************
 * Copyright (C) 2017, 2018 TypeFox and others.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 *
 * This Source Code may also be made available under the following Secondary
 * Licenses when the conditions for such availability set forth in the Eclipse
 * Public License v. 2.0 are satisfied: GNU General Public License, version 2
 * with the GNU Classpath Exception which is available at
 * https://www.gnu.org/software/classpath/license.html.
 *
 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 ********************************************************************************/

@import url('~perfect-scrollbar/css/perfect-scrollbar.css');

/* ::-webkit-scrollbar {
  height: var(--g-scrollbar-width);
  width: var(--g-scrollbar-width);
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--g-scrollbarSlider-background);
  min-width: 160px;
  border-radius: var(--g-scrollbar-width);
}

::-webkit-scrollbar:hover {
  background: transparent;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--g-scrollbarSlider-hoverBackground);
}

::-webkit-scrollbar-thumb:active {
  background: var(--g-scrollbarSlider-activeBackground);
}

::-webkit-scrollbar-corner {
  background: transparent;
} */

/*-----------------------------------------------------------------------------
| Perfect scrollbar
|----------------------------------------------------------------------------*/

#theia-app-shell .ps__rail-x,
#theia-dialog-shell .ps__rail-x {
  height: var(--g-scrollbar-rail-width);
}

#theia-app-shell .ps__rail-x > .ps__thumb-x,
#theia-dialog-shell .ps__rail-x > .ps__thumb-x {
  height: var(--g-scrollbar-width);
  bottom: calc((var(--g-scrollbar-rail-width) - var(--g-scrollbar-width)) / 2);
  background: var(--g-scrollbarSlider-background);
  border-radius: 0px;
}

#theia-app-shell .ps__rail-x:hover,
#theia-app-shell .ps__rail-x:focus,
#theia-dialog-shell .ps__rail-x:hover,
#theia-dialog-shell .ps__rail-x:focus {
  height: var(--g-scrollbar-rail-width);
}

#theia-app-shell .ps__rail-x:hover > .ps__thumb-x,
#theia-app-shell .ps__rail-x:focus > .ps__thumb-x,
#theia-app-shell .ps__rail-x.ps--clicking .ps__thumb-x,
#theia-dialog-shell .ps__rail-x:hover > .ps__thumb-x,
#theia-dialog-shell .ps__rail-x:focus > .ps__thumb-x,
#theia-dialog-shell .ps__rail-x.ps--clicking .ps__thumb-x {
  height: var(--g-scrollbar-width);
}

#theia-app-shell .ps__rail-y,
#theia-dialog-shell .ps__rail-y {
  width: var(--g-scrollbar-rail-width);
}

#theia-app-shell .ps__rail-y > .ps__thumb-y,
#theia-dialog-shell .ps__rail-y > .ps__thumb-y {
  width: var(--g-scrollbar-width);
  right: calc((var(--g-scrollbar-rail-width) - var(--g-scrollbar-width)) / 2);
  background: var(--g-scrollbarSlider-background);
  border-radius: 6px;
  transition: background-color 0.3s;
}

#theia-app-shell .ps__rail-y:hover,
#theia-app-shell .ps__rail-y:focus,
#theia-dialog-shell .ps__rail-y:hover,
#theia-dialog-shell .ps__rail-y:focus {
  width: var(--g-scrollbar-rail-width);
}

#theia-app-shell .ps__rail-y:hover > .ps__thumb-y,
#theia-app-shell .ps__rail-y:focus > .ps__thumb-y,
#theia-app-shell .ps__rail-y.ps--clicking .ps__thumb-y,
#theia-dialog-shell .ps__rail-y:hover > .ps__thumb-y,
#theia-dialog-shell .ps__rail-y:focus > .ps__thumb-y,
#theia-dialog-shell .ps__rail-y.ps--clicking .ps__thumb-y {
  right: calc((var(--g-scrollbar-rail-width) - var(--g-scrollbar-width)) / 2);
  width: var(--g-scrollbar-width);
}

#theia-app-shell .ps [class^='ps__rail'].ps--clicking > [class^='ps__thumb'],
#theia-dialog-shell
  .ps
  [class^='ps__rail'].ps--clicking
  > [class^='ps__thumb'] {
  background-color: var(--g-scrollbarSlider-activeBackground);
}

#theia-app-shell .ps [class^='ps__rail'] > [class^='ps__thumb']:hover,
#theia-app-shell .ps [class^='ps__rail'] > [class^='ps__thumb']:focus,
#theia-dialog-shell .ps [class^='ps__rail'] > [class^='ps__thumb']:hover,
#theia-dialog-shell .ps [class^='ps__rail'] > [class^='ps__thumb']:focus {
  background: var(--g-scrollbarSlider-hoverBackground);
}

#theia-app-shell .ps [class^='ps__rail'] > [class^='ps__thumb']:active,
#theia-dialog-shell .ps [class^='ps__rail'] > [class^='ps__thumb']:active {
  background: var(--g-scrollbarSlider-activeBackground);
}

#theia-app-shell .ps:hover > [class^='ps__rail'],
#theia-app-shell .ps--focus > [class^='ps__rail'],
#theia-app-shell .ps--scrolling-y > [class^='ps__rail'],
#theia-dialog-shell .ps:hover > [class^='ps__rail'],
#theia-dialog-shell .ps--focus > [class^='ps__rail'],
#theia-dialog-shell .ps--scrolling-y > [class^='ps__rail'] {
  opacity: 1;
  background: transparent;
}
