/* FontManager.css
 *
 * Copyright (C) 2009-2025 Jerry Casiano
 *
 * 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 3 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, see <http://www.gnu.org/licenses/gpl-3.0.txt>.
*/

/* Used to represent display pixel order in settings */
.red {
    margin: 0px;
    padding: 0px;
    background-color: #ff0000;
}

.green {
    margin: 0px;
    padding: 0px;
    background-color: #008000;
}

.blue {
    margin: 0px;
    padding: 0px;
    background-color: #0000ff;
}

.gray {
    margin: 0px;
    padding: 0px;
    background-color: #808080;
}

.icon-shadow {
    -gtk-icon-shadow: 0 1px 12px rgba(0,0,0,0.05),
      0 -1px rgba(0,0,0,0.05),
      1px 0 rgba(0,0,0,0.1),
      0 1px rgba(0,0,0,0.3),
      -1px 0 rgba(0,0,0,0.1);
}

/* Some popovers feature squished text and checks for some reason */
dropdown popover contents box {
    padding-top: 6px;
    padding-bottom: 6px;
    padding-left: 6px;
    padding-right: 6px;
}

dropdown popover contents image {
    padding-left: 2em;
}

popover contents row:hover {
    border-radius: 0.25em;
}

treeexpander indent {
    margin-left: 6px;
    margin-right: 6px;
}

/* Accelerator visibility is inconsistent between otherwise identical popovers */
/* Disable accelerator visibility in menu popovers everywhere for consistency */
accelerator {
    color: transparent;
    margin: 0px;
    min-width: 0px;
    font-size: 0px;
}

/* This somewhat mimics the window style defined in Adwaita */
decoration, window, window.background, dialog.message {
    border-radius: .575em;
    background: #fff;
    outline: 1px solid rgba(0, 0, 0, 0.05);
    outline-offset: -1px;
    box-shadow: 0 1px 3px 2px transparent,
                0 2px 6px 4px rgba(0, 0, 0, 0.1),
                0 4px 12px 6px rgba(0, 0, 0, 0.075),
                0 6px 24px 12px rgba(0, 0, 0, 0.05),
                0 0 0 1px rgba(0, 0, 0, 0.25);
}

.aboutdialog:first-child,
.shortcuts:first-child {
    margin: 0px;
    background-color: lighter(@theme_bg_color);
}

.pill-button {
    padding: 0px 18px 0px 18px;
    border-radius: 1em;
}

.rounded {
    padding: 4px;
    border-radius: 1.25em;
}

editablelabel text {
    padding: 2px 6px 2px 6px;
    border-radius: .25em;
}

row .count {
    margin: 1px;
    padding: 0px 9px 0px 9px;
    border-style: groove;
    border-width: 1px;
    border-radius: 0.75em;
    color: alpha(@theme_fg_color, 0.9);
    border-color: alpha(darker(@insensitive_fg_color), 0.25);
    background-color: alpha(@insensitive_bg_color, 0.75);
}

row:selected .count {
    margin: 1px;
    padding: 0px 9px 0px 9px;
    border-style: groove;
    border-width: 1px;
    border-radius: 0.75em;
    color: @theme_selected_fg_color;
    border-color: transparent;
    background-color: shade(@theme_selected_bg_color, 0.75);
}

.InlineHelp {
    background: transparent;
}

.PangoGlyphMetrics {
    color: alpha(lighter(@theme_selected_bg_color), 0.333);
}

.CharacterMapCount {
    margin: 0px;
    padding: 2px 12px 2px 12px;
    border-style: groove;
    border-width: 1px;
    border-radius: 0.75em;
    color: alpha(@theme_fg_color, 0.9);
    border-color: alpha(darker(@insensitive_fg_color), 0.25);
    background-color: alpha(@insensitive_bg_color, 0.75);
}

.CharacterMapSeparator {
    color: alpha(@borders, 0.5);
}

.CharacterMapCell:selected {
    border-radius: 0.333em;
    background-color: alpha(@theme_selected_bg_color, 0.95);
    border-color: darker(@theme_selected_bg_color);
}

.CharacterMapGlyph:selected {
    color: lighter(@theme_selected_fg_color);
}

.BrowsePaneCharacterMap .CharacterMapSeparator {
    color: transparent;
}

.BrowsePaneCharacterMap .CharacterMapCell {
    background-color: transparent;
}


.BrowsePaneCharacterMap .CharacterMapGlyph {
    color: @theme_text_color;
}

.FontManagerPropertiesPage separator {
    padding: 0px;
    margin: 12px 6px 12px 0px;
    opacity: 0.5;
}

.FontManagerPropertiesPage grid button {
    border-style: solid;
    margin: 5px 3px 3px 3px;
    padding: 0px 9px 0px 9px;
    border-color: alpha(@borders, 0.5);
}

.FontManagerPropertiesPage grid button:hover {
    background-color: alpha(lighter(@theme_fg_color), 0.075);
}

.FontManagerSubstituteList list button {
    border-color: alpha(@borders, 0.75);
}

.FontManagerCompare list row,
.FontManagerSubstituteList list row,
.FontManagerUserActionList list row,
.FontManagerUserSourceList list row {
    border-radius: 0.333em;
    margin: 4px;
}

.FontManagerComparePreview {
    border-radius: 0.333em;
}

.FontManagerCompare list row:selected,
.FontManagerSubstituteList list row:selected,
.FontManagerUserActionList list row:selected,
.FontManagerUserSourceList list row:selected {
    /* background-color: alpha(@theme_selected_bg_color, 0.9); */
    border-radius: 0.333em;
    margin: 4px;
}

.FontManagerGoogleFontsSampleList list row:selected {
    background-color: alpha(@theme_selected_bg_color, 0.9);
    border-radius: 0.333em;
}

.FontManagerGoogleFontsSampleList list row:hover {
    border-radius: 0.333em;
}

.FontManagerSubstituteList list row:selected,
.FontManagerUserActionList list row:selected,
.FontManagerUserSourceList list row:selected {
    box-shadow: 0px 1px 1px 0px inset alpha(@borders, 0.75);
}

.FontManagerSubstituteRow list {
    border-radius: 0.333em;
}

.FontManagerSubstituteList list row:selected button {
    background-color: @theme_bg_color;
    border-radius: 0.333em;
}

.FontManagerSubstituteRow > list > row:hover,
.FontManagerPreferenceList list row:hover,
.FontManagerLanguageFilterSettings list row:hover,
.FontManagerGoogleFontsOrthographies row:hover {
    background-color: transparent;
}

.FontManagerSubstituteList row:selected list {
    box-shadow: 0px 1px 1px 1px alpha(@borders, 0.5);
}

.FontManagerUserActionList list,
.FontManagerUserSourceList list,
.FontManagerSubstituteList list {
    padding: 0px;
}

.FontManagerDesktopPreferences list row {
    padding: 0px;
}

.FontManagerCategoryListView > row > treeexpander expander {
    -gtk-icon-source: -gtk-icontheme('folder-symbolic');
    margin: 0px 0px 0px 9px;
}

.FontManagerCategoryListView > row > treeexpander expander:checked {
    -gtk-icon-source: -gtk-icontheme('folder-open-symbolic');
    margin: 0px 0px 0px 9px;
}

.FontManagerBrowsePane expander,
.FontManagerCollectionListView > row > treeexpander expander {
    -gtk-icon-source: none;
    -gtk-icon-size: 0px;
    margin: 0px;
    min-height: 0px;
    min-width: 0px;
}

.FontManagerCategoryListView row,
.FontManagerCollectionListView row,
.FontManagerFontListView row,
.FontManagerGoogleFontsFontListView row {
    border-radius: 0.25em;
}

.FontManagerFontListView row {
    margin: .1px;
}

.FontManagerListDragCount {
    border-radius: 1.25em;
    border-color: alpha(@theme_selected_fg_color, 0.75);
    border-style: solid;
    border-width: 1px;
    color: lighter(@theme_selected_fg_color);
    background-color: alpha(@theme_selected_bg_color, 0.85);
    font-weight: bold;
    font-size: larger;
    padding: 4px;
    min-width: 20px;
    min-height: 20px;
}

.FontManagerListRowDrag {
    border-radius: .333em;
    border-color: alpha(@theme_selected_fg_color, 0.25);
    border-style: solid;
    border-width: 1px;
    color: @theme_selected_fg_color;
    background-color: alpha(@theme_selected_bg_color, 0.85);
    padding: 4px 24px 4px 24px;
    min-width: 24px;
    min-height: 20px;
}

.FontManagerGoogleFontsCategories checkbutton label,
.FontManagerGoogleFontsOrthographies checkbutton label {
    margin-left: 6px;
    margin-right: 6px;
}

gridview :not(selected) FontManagerFontPreviewTile {
    border-radius: .333em;
    border-color: alpha(@theme_border_color, 0.250);
    border-style: solid;
    border-width: .25px;
    box-shadow: 0 1px 2px 1px transparent,
                0 2px 4px 2px alpha(@borders, 0.85),
                0 0 0 1px alpha(@borders, 0.75);
}

gridview :selected {
    background-color: transparent;
}

gridview :selected FontManagerFontPreviewTile {
    color: @theme_selected_bg_color;
    border-color: @theme_selected_bg_color;
    box-shadow: 0 1px 2px 1px transparent,
                0 2px 4px 2px alpha(@theme_selected_bg_color, 0.25),
                0 0 0 1px alpha(@theme_selected_bg_color, 0.5);
}

gridview :hover FontManagerFontPreviewTile {
    box-shadow: 0 1px 2px 1px transparent,
                0 2px 4px 2px alpha(@theme_selected_bg_color, 0.25),
                0 0 0 1px alpha(@theme_selected_bg_color, 0.5);
}


