@define-color root_headerbar_bg_color       shade(@red_1, 1.48);
@define-color root_headerbar_backdrop_color shade(@red_1, 1.45);

@define-color remote_headerbar_bg_color       shade(@purple_1, 1.27);
@define-color remote_headerbar_backdrop_color shade(@purple_1, 1.35);

@keyframes bell {
  50% { background-color: shade(@orange_1, 1.1); }
}

kgx-tab .top-bar {
  background-image: none;
  background-color: @view_bg_color;
}

.terminal-window.root .main-box > revealer.top-bar {
  background-color: @root_headerbar_bg_color;
}

.terminal-window.root:backdrop .main-box > revealer.top-bar {
  background-color: @root_headerbar_backdrop_color;
}

.terminal-window.remote .main-box > revealer.top-bar {
  background-color: @remote_headerbar_bg_color;
}

.terminal-window.remote:backdrop .main-box > revealer.top-bar {
  background-color: @remote_headerbar_backdrop_color;
}

.terminal-window.bell .main-box > revealer.top-bar {
  animation: bell 0.5s ease-out;
}

.terminal-window vte-terminal {
  padding-left: 6px;
  padding-right: 6px;
}

/* Taken from nautilus */
.floating-bar {
  padding: 6px;
  background-color: @window_bg_color;
  color: @view_fg_color;
  box-shadow: 0 0 0 1px @borders;
  margin-top: 1px;
}

.floating-bar:dir(rtl) {
  border-top-right-radius: 6px;
  margin-right: 1px;
}

.floating-bar:dir(ltr) {
  border-top-left-radius: 6px;
  margin-left: 1px;
}

/* Sync to KgxTerminal! */
.empty-state {
  background: @view_bg_color;
  color: alpha(currentColor, .5);
}

.exit-info {
  padding: 6px;
  border-top: 2px solid #1e78e4;
  background: rgba(13, 54, 104, 0.96);
  color: #ffffff;
}

.error .exit-info {
  border-top: 2px solid #ed333b;
  background: rgba(104, 13, 13, 0.96);
}

window:not(.tiled):not(.tiled-top):not(.tiled-bottom):not(.tiled-left):not(.tiled-right):not(.fullscreen):not(.maximized):not(.solid-csd) {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.process-list row .header {
  min-height: 0;
}

.process-list row .title {
  font-family: monospace;
}

themeswitcher {
  padding: 6px;
}

themeswitcher .check {
  background: @accent_bg_color;
  color: @accent_fg_color;
  padding: 2px;
  border-radius: 17px;
  margin: 3px;
}

/* Adapted from https://gitlab.gnome.org/GNOME/gnome-text-editor/-/blob/bf8c0c249f06a0be69e65aed3b786ba02a9f999e/src/TextEditor.css#L51 */

themeswitcher checkbutton {
  outline-offset: 1px;
  transition: none;
}

themeswitcher checkbutton radio {
  -gtk-icon-source: none;
  background: none;
  padding: 12px;
  min-height: 24px;
  min-width: 24px;
  border: none;
  outline-color: currentColor;
  transition: none;
  box-shadow: inset 0 0 0 1px @borders;
}

themeswitcher checkbutton radio:checked {
  box-shadow: inset 0 0 0 2px @accent_bg_color;
}

themeswitcher checkbutton.system radio {
  background: linear-gradient(-45deg, #1e1e1e 49.99%, white 50.01%);
}

themeswitcher checkbutton.light radio {
  color: alpha(black, .8);
  background-color: white;
}

themeswitcher checkbutton.dark radio {
  color: white;
  background-color: #1e1e1e;
}

.font-picker {
  margin: 6px;
}

.font-picker .font-item {
  margin: 6px;
}

/* Remove default adwaita style */
kgx-tab:drop(active):focus,
kgx-tab:drop(active) {
  box-shadow: none;
}

/* Drag overlay */
.drop-highlight {
  border-radius: 8px;
  background-color: alpha(@blue_2, 0.35);
  margin: 24px;
}
