/*****************************************************************************
#                                                                            #
#    KVMD - The main PiKVM daemon.                                           #
#                                                                            #
#    Copyright (C) 2018-2024  Maxim Devaev <mdevaev@gmail.com>               #
#                                                                            #
#    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 <https://www.gnu.org/licenses/>.  #
#                                                                            #
*****************************************************************************/


div.window {
	outline: none;
	overflow: hidden;
	position: fixed;
	border: var(--border-window-default-2px);
	border-radius: 8px;
	box-sizing: border-box;
	box-shadow: var(--shadow-big);
	white-space: nowrap;
	color: var(--cs-window-default-fg);
	background-color: var(--cs-window-default-bg);
	padding: 30px 9px 9px 9px;
}
div.window[data-wm-window-always-on-top] {
	z-index: 2147483643;
}
div.window.window-elegant {
	padding-top: 23px;
	padding-left: 2px;
	padding-right: 2px;
}
div.window.window-resizable {
	resize: both;
}
div.window.window-active:not(.window-full-tab) {
	border: var(--border-window-active-2px) !important;
}
div.window.window-resizable.window-active:not(.window-full-tab)::after {
	content: "";
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0 0 15px 15px;
	border-color: transparent transparent var(--cs-corner-bg) transparent;
	right: 0;
	bottom: 0;
	position: absolute;
}
div.window.window-full-tab {
	border: 0px;
	border-radius: 0px;
	resize: none !important;
	top: 0px !important;
	left: 0px !important;
	width: 100% !important;
	height: 100% !important;
	padding: 0px !important;

	/* Ignore stream's resize_hook() */
	aspect-ratio: unset !important;
	max-width: unset !important;
	max-height: unset !important;
}

div.window div.window-header {
	overflow: hidden;
	top: 0;
	left: 0;
	position: absolute;
	width: 100%;
	padding: 0;
	height: 20px;
	font-size: 0.8em;
	color: var(--cs-window-header-default-fg);
	background-color: var(--cs-window-default-bg);
	border-bottom: var(--border-default-thin);
}
div.window:not(.window-full-tab) div.window-header {
	z-index: 1;
}

div.window div.window-header div.window-grab {
	overflow: hidden;
	top: 0;
	left: 0;
	position: absolute;
	width: 100%;
	height: 20px;
	cursor: move;
	padding: 3px 0 2px 20px;
}

div.window div.window-header-grabbed {
	color: var(--cs-window-header-grabbed-fg);
	background-color: var(--cs-window-header-grabbed-bg);
	border-bottom: var(--border-intensive-thin);
}

div.window div.window-header div.window-buttons {
	display: flex;
	position: absolute;
	top: -2px;
	right: 0;
	font-size: 0px;
	background-color: var(--cs-window-default-bg);
}

div.window div.window-header div.window-buttons button {
	line-height: 1px;
	border: none;
	border-radius: 0px;
	width: 44px;
	height: 24px;
	padding-left: 0;
	padding-right: 0;
	margin-left: 1px;
	color: var(--cs-window-closer-default-fg);
	display: inline-block;
}
div.window div.window-header div.window-buttons button img {
	height: 20px;
}
div.window[data-x-wm-window-centered] div.window-header div.window-buttons button[data-wm-window-set-original] {
	color: var(--cs-window-button-special-fg);
}
div.window[data-x-wm-window-maximized] div.window-header div.window-buttons button[data-wm-window-set-maximized] {
	color: var(--cs-window-button-special-fg);
}
