/*
SPDX-FileCopyrightText: 2021, 2022 Romain Vigier <contact AT romainvigier.fr>
SPDX-License-Identifier: GPL-3.0-or-later
*/

@define-color accent_color #813d9c;
@define-color accent_bg_color @accent_color;
@define-color accent_fg_color #fff;

window
{
	background: linear-gradient(180deg, @accent_bg_color 0px, @accent_bg_color 20px, @theme_bg_color 20px);
}

window.dialog,
window.flat
{
	background: @theme_bg_color;
}

headerbar:not(.flat)
{
	background-color: @accent_bg_color;
	color: @accent_fg_color;
}

headerbar:not(.flat) button:focus
{
	outline-color: alpha(@accent_fg_color, 0.5);
}

window.flat headerbar
{
	border-bottom: 1px solid @theme_bg_color;
	transition: border 0.4s;
}

window.flat.scrolled headerbar
{
	border-bottom: 1px solid @borders;
}

button.help
{
	transition: padding 0.1s, margin 0.1s, border-radius 0.1s;
}

button.help.small
{
	border-radius: 0;
	padding-left: 18px;
	padding-right: 18px;
}

button.help:not(.small)
{
	margin: 0 18px 18px;
}

listview.files
{
	background: none;
}

listview.files>row
{
	padding: 0 0 0 6px;
	border-bottom: 1px solid @borders;
	background: @card_bg_color;
	transition: all 0.2s ease-out;
}

listview.files>row:dir(rtl)
{
	padding-left: 0;
	padding-right: 6px;
}

listview.files>row:selected
{
	background: alpha(@card_fg_color, 0.1);
}

listview.files .file
{
	border: 0 solid transparent;
	border-left-width: 1px;
	border-radius: unset;
	background: unset;
	font-weight: unset;
	transition: all 0.2s ease-out;
}

listview.files .file:dir(rtl){
	border-width: 0 1px 0 0;
}

listview.files .file:hover
{
	background-image: image(alpha(@card_fg_color, 0.03));
}

listview.files .file:active
{
	background-image: image(alpha(@card_fg_color, 0.08));
}

listview.files>row:hover .file
{
	border-color: @borders;
}

listview.metadata
{
	background: none;
}

listview.metadata>row
{
	margin: 12px 24px;
}

listview.metadata>row:last-child
{
	margin-bottom: 24px;
}

row.metadata>box
{
	margin: 6px;
	border-spacing: 12px;
}

.badge
{
	border-radius: 11px;
	background-color: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-weight: bold;
	font-size: 12px;
}

.badge.flat
{
	background: none;
	color: @theme_fg_color;
}

.badge label
{
	margin: 0 6px;
}

.badge.metadata
{
	background-color: @accent_color;
}

.badge.warning
{
	background-color: @warning_color;
}

.badge.error
{
	background-color: @error_color;
}

.badge.success
{
	background-color: @success_color;
}

.badge label
{
	padding: 0 0.4em;
}

button.gitlab
{
	background-color: rgba(250, 112, 53, 1);
	color: #fff;
}

button.liberapay
{
	background-color: rgba(246, 201, 21, 0.8);
	color: #1a171b;
}

button.matrix
{
	background-color: rgba(129, 61, 156, 0.8);
	color: #fff;
}

button.weblate
{
	background-color: rgba(46, 204, 170, 0.8);
	color: #fff;
}

.app-icon
{
	-gtk-icon-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
