/*
 * Copyright (C) 2014 denkbares GmbH, Germany
 *
 * This is free software; you can redistribute it and/or modify it under the
 * terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option) any
 * later version.
 *
 * This software 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 Lesser General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this software; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
 * site: http://www.fsf.org.
 */

.ui-dialog {
	border: 1px solid var(--border-color-light) !important;
	padding: 0 0 0 0 !important;
	z-index: 1900 !important;
}

.ui-dialog .ui-dialog-titlebar {
	padding: .4em 1em;
	position: relative;
	background-image: none !important;
	background-color: var(--bg-color-table-th-highlighted) !important;
	color: var(--text-color-default-head) !important;
	border: none;
}

.ui-dialog-titlebar h3 {
	margin: 0 0 0 0;
	padding: 0 0 0 0;
}

/* the term name is excluded from dragging (see createCompositeEditDialog), give it some slack so selecting it is easy;
   the title gets the extra room, so the slack is not clipped by its overflow and the layout stays the same */
.ui-dialog .ui-dialog-title:has(> .objectinfo-header-name) {
	padding: 6px 0;
	margin: calc(.1em - 6px) 0 calc(.1em - 6px) -8px;
}

.ui-dialog-title .objectinfo-header-name {
	display: inline-block;
	padding: 6px 10px 6px 8px;
	margin: -6px 0;
	cursor: text;
	user-select: text;
}

.ui-dialog-title .objectinfo-header-class {
	margin-left: 0;
}

/*.ui-dialog-titlebar.ui-widget-header {*/
/*	border: 1px solid var(--border-color-table);*/
/*}*/

.minMaxCompositeView {
	float: right;
	position: relative;
	right: -5px;
	top: 5px;
	cursor: pointer;
	color: var(--text-color-primary);
}

#minimizeCompositeView {
	background-position: 0 0;
	width: 16px;
	height: 16px;
}

#maximizeCompositeView {
	background-position: 0 -66px;
	width: 16px;
	height: 16px;
}

.type_ObjectInfo h3 {
	margin: 0 0 0 0;
	padding: 0 0 0 0;
	font-weight: bold;
	font-size: 140%;
}

.type_ObjectInfo .lookUpForm {
	margin-top: 0.8em;
}

.sectionStart {
	font-size: 125%;
	border-bottom: 1px solid #aaa;
	font-weight: bold;
	margin-left: 0px !important;
}

.articleName {
	font-size: 110%;
	margin-bottom: 0.7em !important;
	margin-top: 0.85em;
	font-weight: bold;
}

.articleName a {
	color: var(--text-color-default-head) !important;
}

.articleName a:hover {
	color: blue !important;
}

.type_ObjectInfo .articleName {
	margin-left: 0.8em;
}

#compositeEdit .defaultMarkupFrame .markupText {
	padding: 0 0 0 0;
}

#compositeEdit .markupText > div {
	margin-left: 0.4em;
}

#compositeEdit .markupText > div > div {
	margin-left: 10px;
	margin-bottom: 10px;
}

#compositeEdit .defaultEditTool {
	margin: 0 0 0 0 !important;
	padding: 0 5px 0 5px !important;
}

#compositeEdit .defaultMarkupFrame {
	margin-bottom: 10px;
}

.type_ObjectInfo .previewItem {
	margin-left: 1em;
}

.type_ObjectInfo .objectinfo.preview.reference {
	margin-left: 1em;
}

#compositeEdit .objectinfo.preview {
	margin-bottom: 0 !important;
	padding-left: 3px;
	white-space: pre-wrap;
	border: 1px solid var(--border-color-table);
	border-right: 1px solid var(--border-color-none);
	border-left: 1px solid var(--border-color-none);
	border-bottom: 1px solid var(--border-color-none);
}

#compositeEdit .objectinfo.preview:hover {
	border-right: 1px solid var(--border-color-table);
	border-left: 1px solid var(--border-color-table);
	border-bottom: 1px solid var(--border-color-table);
	background-color: var(--bg-color-default-Markup);
}

#compositeEdit .onlyObjectInfoPage {
	display: none;
}

.hidden {
	margin-bottom: 0px !important;
	margin-left: 0px !important;
}

#compositeEdit .hidden > div {
	margin-left: 10px;
	margin-bottom: 10px;
}

#compositeEdit .ueeditmarker {
	background-color: var(--highlight-color-light);
	position: absolute;
	width: 3px;
	left: -9px;
	top: 0px;
	z-index: 1000;
}

#compositeEdit .ueeditmarker:after {
	font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free";
	content: "\f040";
	display: block;
	position: relative;
	left: -15px;
}

.tool-menu-click input {
	background-color: var(--bg-color-edit);
	transition: width 100ms linear;
}

.ui-widget-overlay {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--color-grey) !important;
	opacity: 0.7 !important;
	z-index: 999 !important;
}

/*
.ui-dialog { z-index: 0 !important ;}
*/

.ui-dialog .ui-dialog-buttonpane {
	text-align: left;
	border-width: 1px 0 0 0;
	background-image: none;
	margin: 0 0 0 0;
	padding: .4em 1em !important;
	background-color: var(--bg-color-table-th-highlighted) !important;
	position: relative;
	border: none;
	/* bottom: 0px; */
	/* right: 0px; */
	/* left: 0px; */
}

.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
	float: left !important;
}

.ui-dialog button:disabled {
	background: white;
	color: gray;
	cursor: default;
	opacity: 0.2;
}

.ui-dialog .ui-button {
	margin-right: 5px !important;
	margin-top: 0px !important;
	margin-bottom: 0px !important;
	color: var(--text-color-primary) !important;
	background-color: var(--bg-color-secondary) !important;
	border: 1px solid var(--border-color-default) !important;
}

/*
 * jQuery UI 1.14 renders "Close" as a text node in addition to the icon. The generic dialog button rules above also
 * override the title-bar button's negative margin. Hide the generated contents and render one consistently centered
 * close symbol instead. Deliberately hidden close buttons remain hidden because this rule does not alter display.
 */
.ui-dialog.ui-widget .ui-dialog-titlebar-close {
	top: 50% !important;
	width: 24px;
	height: 24px;
	margin: 0 !important;
	padding: 0 !important;
	transform: translateY(-50%);
	overflow: hidden;
	font-size: 0 !important;
	text-indent: 0 !important;
}

.ui-dialog.ui-widget .ui-dialog-titlebar-close > .ui-icon,
.ui-dialog.ui-widget .ui-dialog-titlebar-close > .ui-button-icon-space {
	display: none;
}

.ui-dialog.ui-widget .ui-dialog-titlebar-close::before {
	content: "\00d7";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-color-primary, #333);
	font-family: Arial, sans-serif;
	font-size: 20px;
	font-weight: normal;
	line-height: 1;
}

.ui-dialog:has(> #compositeEdit) .ui-dialog-titlebar-close {
	display: none !important;
}

#compositeEdit .expandPanelButton {
	font-size: x-small;
	text-transform: uppercase;
	padding: 1px 4px;
	border-radius: 4px;
	border: 1px solid #666;
	margin: 0 13px;
	color: #666;
}

/** If preview items aren't grouped by <section-type, article-name> but just <section-type> we want to additionally
show a preview title (e.g. the name of its article). Since for historic reasons this is difficult to do
programmatically, we always create the title HTML. However, to avoid side-effects, this title is hidden by default.
Only if the second selector matches (to select all non-nested preview titles), the titles are shown.
 */
.previewTitle {
	display: none;
}

.objectInfoPanel .previewTitle:not(.objectInfoPanel .objectInfoPanel .previewTitle) {
	display: block;
}

.dehighlighted-text {
	opacity: .6;
}
