/*
 * cambalache.css
 *
 * Copyright (C) 2021-2024 Juan Pablo Ugarte
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * Author: Juan Pablo Ugarte <juanpablougarte@gmail.com>
 *
 */

CmbView {
  background-color: @theme_base_color;
}

popover.cmb-icon-chooser iconview:not(:selected) {
  background-color: unset;
}

button.hidden,
menubutton.hidden,
CmbPropertyLabel.hidden > box > image {
  opacity: 0;
  transition: opacity 200ms ease-in-out 0;
}

button.hidden:hover,
CmbPropertyLabel.hidden:hover > box > image  {
  opacity: 1;
}

button.cmb-close {
  padding: unset;
  margin: unset;
  border: unset;
  border-radius: 50%;
  min-width: 20px;
  min-height: 20px;
}

CmbPropertyLabel {
  min-width:unset;
  min-height: unset;
  padding: unset;
  margin: unset;
  border: unset;
  background: unset;
  box-shadow: unset;
  outline: unset;
}

CmbPropertyLabel > box > label {
  padding: 2px 4px;
}

CmbPropertyLabel:focus > box > label {
/*
  FIXME: use focus_border_color
  $focus_border_color: if($variant == 'light', transparentize($selected_bg_color, 0.5), transparentize($selected_bg_color, 0.3));
 */
  outline-color: color-mix(in srgb, var(--accent-bg-color) 60%, transparent);
  outline-offset: -2px;
  outline-width: 2px;
  outline-style: solid;
  border-radius: 6px;
}

CmbPropertyLabel.modified > box > label {
  font-style: italic;
}

CmbPropertyLabel.warning > box > label {
  text-decoration: underline wavy @warning_color;
}

listview.cmb-list-view {
 background-color: @theme_bg_color;
}

listview.cmb-list-view > row {
  padding: 2px 8px;
  min-height: 30px;
  box-shadow: none;
}

listview.cmb-list-view > row:drop(active):not(.drop-after):not(.drop-before) {
  outline: 2px solid color-mix(in srgb, @theme_bg_color 80%, black);
  outline-offset: -4px;
}

listview.cmb-list-view > row.drop-before:drop(active) {
  border: 0;
  border-radius: 0;
  border-top: 2px solid color-mix(in srgb, @theme_bg_color 80%, black);
  margin-top: -2px;
}

listview.cmb-list-view > row.drop-after:drop(active) {
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid color-mix(in srgb, @theme_bg_color 80%, black);
  margin-bottom: 0;
}

listview.cmb-list-view > row > treeexpander.cmb-path  > expander {
  -gtk-icon-source: -gtk-icontheme("folder-symbolic");
}

listview.cmb-list-view > row > treeexpander.cmb-path  > expander:checked {
  -gtk-icon-source: -gtk-icontheme("folder-open-symbolic");
}

listview.cmb-list-view > row > treeexpander.cmb-unsaved-path  > expander {
  -gtk-icon-source: -gtk-icontheme("view-list-symbolic");
}

button.compact {
  padding: 2px 4px;
  font-weight: normal;
}

box.cmb-file-changed-bar {
  padding: 1ex;
  background-color: var(--warning-bg-color);
}

CmbProjectSettings preferencesgroup row {
  padding: 1em;
}

CmbCSSEditor GtkSourceAssistant.background {
  padding: 6px 10px;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}


list.notifications {
  margin: 1em 2em;
  border-radius: 1em;
  border: 1px solid  var(--secondary-sidebar-border-color);
}

list.notifications > row {
  padding: 1em;
}

list.notifications > row:last-child {
  border-width: 0;
}

row.cmb-notification-list-row button.cmb-close {
  opacity: 0;
  transition: opacity 200ms ease-in-out 0;
}

row.cmb-notification-list-row:hover button.cmb-close {
  opacity: 1;
}

CmbTextView > overlay > button {
  opacity: 0.7;
  background: unset;
}

CmbTextView > overlay > button:hover {
  opacity: 1;
}
