@import url("resource:///org/gnome/builder/theme/shared.css");


/*
 * Titlebar adjustments for workbench
 *
 * This is needed due to our placement of headerbar inside of a
 * stack. We were seeing black edges around the header bar, and
 * improper radius on the headerbar.
 */
workbench stack.titlebar {
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  box-shadow: none;
  padding: 0;
}
workbench stack.titlebar headerbar {
  border-radius: 6px 6px 0 0;
  margin: 0;
  border-bottom: none;
  box-shadow: 0 -1px 0 @borders inset;
}
workbench stack.titlebar headerbar:backdrop {
  box-shadow: 0 -1px 0 alpha(@borders, 0.6) inset;
}


/*
 * Greeter tweaks
 *
 * The following tweaks the greeter perspective by adding
 * separator lines to the list box.
 */
greeter list row {
  border-bottom: 1px solid alpha(@borders, 0.2);
}
greeter list row:last-child {
  border-bottom: none;
}
greeter frame border {
  border-color: alpha(@borders, 0.6);
}


/*
 * Global search results styling
 *
 * The following tweaks the sizing of listbox rows in the
 * global search results to have a bit more padding and
 * row separators after each line. Additionally, we tweak
 * the selection color to ensure it has priority.
 */
omnisearchdisplay omnisearchgroup omnisearchrow {
  background: transparent;
  padding: 9px 12px 9px 12px;
  border-bottom: 1px solid alpha(@borders, 0.2);
}
omnisearchdisplay omnisearchgroup omnisearchrow:last-child {
  border-bottom: none;
}
omnisearchdisplay omnisearchgroup omnisearchrow:selected {
  background-color: @theme_selected_bg_color;
  color: @theme_selected_fg_color;
}


/*
 * Preferences styling
 *
 * The following tweaks our preferences styling in the
 * preferences perspective, including groups, rows,
 * sidebar, etc.
 */
workbench preferences preferencesgroup list row {
  padding: 10px;
  border-bottom: 1px solid alpha(@borders, 0.2);
}
workbench preferences preferencesgroup list row:last-child {
  border-bottom: none;
}
workbench preferences preferencesgroup list entry {
  background: none;
  min-height: 0px;
}


/*
 * Perspectives switcher
 *
 * The following tweaks the left-most sidebar containing
 * the list of perspectives.
 */
perspectiveswitcher button {
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
  padding: 6px;
}



/*
 * Layout tab and tab bar tweaks
 *
 * The following makes the layout stack header look similar to a tab bar.
 */
layouttabbar > box > button {
  opacity: 0.5;
}
layouttabbar > box > button:hover {
  opacity: 0.75;
}
layouttabbar > box > button:active {
  opacity: 1;
}
layouttabbar button {
  border: none;
  box-shadow: none;
  background: transparent;
}
layouttab label {
  padding: 5px;
}
layouttab {
  background-color: @theme_bg_color;

  border-bottom: 3px;
  border-bottom-style: solid;

  border-right: 1px solid alpha(@borders, 0.75);
  border-left: 1px solid alpha(@borders, 0.75);

  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}
layouttab:backdrop {
  border-right-color: alpha(@borders, 0.75);
  border-left-color: alpha(@borders, 0.75);
  box-shadow: none;
}
layouttabbar:backdrop {
  box-shadow: none;
}
layouttab separator.vertical {
  margin-top: 7px;
  margin-bottom: 7px;
  opacity: 0.75;
}
layouttab separator.vertical:backdrop {
  opacity: 0.3;
}
layouttab button:disabled,
layouttab button {
  background: none;
  border: none;
  box-shadow: none;
  padding-left: 4px;
  padding-right: 4px;
}


/*
 * Close button styling for layouttab.
 */
layouttab > box > button:last-child image {
  color: @theme_fg_color;
  opacity: 0.3;
  margin: 2px;
  border: 1px solid transparent;
  border-radius: 3px;
}
layouttab > box > button:last-child:hover image {
  opacity: .75;
  transition-duration: 250ms;
  border: 1px solid @borders;
}
layouttab > box > button:last-child:active image {
  opacity: .8;
  background-image: linear-gradient(shade(@theme_bg_color, 0.9), @theme_bg_color);
}
layouttab > box > button:last-child:backdrop image {
  opacity: .1;
}


/*
 * The following tweaks the layout panel headers
 */
layoutpane {
  -IdeLayoutPane-handle-size: 1;
  -gtk-icon-source: none;
}
layoutpane stackswitcher button {
  min-width: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0 3px 0 3px;
  border-radius: 0;
}
layoutpane .pane-separator {
  background-color: @borders;
}


/*
 * For our pattern of popover with lists (and close buttons).
 */
popover list row {
  padding: 6px;
}
popover list row button {
  background: transparent;
  border: none;
  box-shadow: none;
  margin: 0;
  padding: 0;
  opacity: 0.25;
}
popover list row:selected button,
popover list row:selected button:hover {
  color: @theme_selected_fg_color;
}
popover list row button:hover {
  opacity: 1;
}


/*
 * Tweaks for the editortweak popover in the editor.
 */
editortweak button {
  padding: 0 6px 0 6px;
}
editortweak list row {
  padding: 0;
}


/*
 * Keep search bar and layouttab height in sync.
 */
layouttabbar > box {
  min-height: 39px;
}
eggsearchbar > revealer > box {
  min-height: 39px;
}
eggsearchbar entry {
  min-height: 24px;
}


/*
 * Pillbox is used to render "languages" in the greeter.
 */
pillbox {
  border-radius: 3px;
}


/*
 * Styling in the genesis (create project) perspective.
 */
genesisperspective stack > box:first-child list row {
  padding: 10px;
  border-bottom: 1px solid alpha(@borders, 0.2);
}
genesisperspective stack > box:first-child list row:last-child {
  border-bottom: none;
}
