
/* The notebookbar scrolls sideways when it is wider than the window, and it scrolls
   without a visible scrollbar, so the whole row height stays with the icons. A
   narrow screen shows the bar again, through the media query below. */
.notebookbar-scroll-wrapper {
	height: 82px;
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-color: var(--scrollbar-color);
	scrollbar-width: none;
}

@media (max-width: 480px) {
	.notebookbar-scroll-wrapper {
		scrollbar-width: var(--scrollbar-width);
	}
}

/* stretch the fields */
.notebookbar.ui-listbox,
.notebookbar.ui-combobox,
.notebookbar.ui-spinfields,
.notebookbar.ui-radiobutton {
	width: 100%;
}

/* A dropdown is at least as wide as the entry it shows, and stretches further
   when there is more room. */
.notebookbar.ui-listbox-container {
	min-width: max-content;
}

/* The narrowest a dropdown gets, so a short entry still leaves room to click. */
.notebookbar.ui-listbox {
	min-width: 70px;
}

/* center text vertically */

.notebookbar.ui-radiobutton,
.notebookbar.ui-radiobutton input {
	height: var(--default-font-size);
	margin: auto 4px;
}

label.notebookbar,
span.notebookbar.static-label,
.notebookbar.ui-radiobutton label {
	line-height: var(--default-font-size);
	font-family: var(--cool-font);
	font-size: var(--default-font-size);
	margin: auto 4px;
}

/* tabs */

/* stretch the tabs so we can assign width dynamically for some widgets */
.notebookbar.root-container,
.notebookbar#NotebookBar,
.notebookbar#ContextContainer,
.notebookbar.ui-tabs-root,
.notebookbar.ui-tabs-content,
.notebookbar.ui-tabs-content > .notebookbar.ui-content,
.notebookbar.ui-tabpage {
	width: 100%;
	justify-items: start;
	max-width: initial;
}

.notebookbar-tabs-container {
	display: inline-flex;
	flex: 0.1 0.1 auto;
	margin-inline-start: 5px;
	min-width: 0;
}

.ui-tabs.notebookbar {
	display: inline-flex;
	z-index: 999;
	padding: 0px;
	height: 100%;
	overflow-x: auto;
	scrollbar-color: var(--scrollbar-color);
	scrollbar-width: none;
	max-width: 100%;
}

@media (max-width: 480px) {
	.ui-tabs.notebookbar {
		scrollbar-width: var(--scrollbar-width);
	}
}

.ui-tab.notebookbar {
	flex-shrink: 0;
}

.notebookbar#NotebookBar {
	height: 82px;
}

button.ui-tab.notebookbar {
	box-sizing: border-box;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 clamp(4px, 1vw, 1em);
	border: 1px solid transparent;
	background-color: transparent;
	flex-shrink: 0;
	/* calc([minimum size]
	   + ([maximum size] - [minimum size])
	   * ((100vw - [minimum viewport width]) / ([maximum viewport width] - [minimum viewport width]))); */
	font-size: calc(var(--tb-min-fs) + (var(--tb-max-fs-u) - var(--tb-min-fs-u)) * ((100vw - 640px) / (1000 - 640)));
	/* a minimum value, a preferred value or scaler, and a maximum allowed value. */
	font-size: clamp(var(--tb-min-fs), var(--tb-fs-s), var(--tb-max-fs));
	font-family: var(--cool-font);
	line-height: normal;
	color: var(--color-main-text);
}

#shareas {
	overflow: visible;
}

#shareas .unolabel {
	color: var(--color-main-text);
}

.ui-tab.notebookbar[style*='block'] {
	display: inline-flex !important;
}

.ui-tab.hidden.notebookbar {
	display: none !important;
}

.ui-tab.selected.notebookbar {
	border: 1px solid transparent !important;
	color: var(--color-text-darker) !important;
	box-shadow: inset 12px 0 var(--color-main-background), inset -12px 0 var(--color-main-background), inset 0 -2px rgb(var(--doc-type));
	transition: box-shadow var(--duration-instant) var(--ease-out);
}

.ui-tab.selected.notebookbar:hover {
	box-shadow: inset 0 0 var(--color-main-background), inset 0 0 var(--color-main-background), inset 0 -2px rgb(var(--doc-type));
	transition: box-shadow var(--duration-slow) var(--ease-standard);
}

/* Tint contextual tabs (Table Design, Sparkline, Picture, Chart, Shape,
   Math, MasterPage, ...) with the doc-type accent while they're visible
   but not the active tab. */
.ui-tab.notebookbar.contextual:not(.selected) {
	color: rgb(var(--doc-type));
}

.ui-tab.notebookbar:hover {
	cursor: pointer !important;
	color: var(--color-text-darker) !important;
	box-shadow: inset 12px 0 var(--color-main-background), inset -12px 0 var(--color-main-background), inset 0 -2px var(--color-border);
}

/* Document Logo */
.main-nav.hasnotebookbar #document-header {
	height: 100%;
	background: transparent;
	align-items: center;
	display: flex;
}

/* grid */
.notebookbar.ui-grid {
	border-spacing: 0px;
}

/* shortcuts bar */

.notebookbar-shortcuts-bar {
	display: inline-block;
	position: relative;
	z-index: 1000;
	box-sizing: border-box;
}

.notebookbar-shortcuts-bar > table {
	display: block;
	height: 31px;
}

.notebookbar-shortcuts-bar .unotoolbutton.notebookbar .unobutton {
	width: var(--btn-size-m);
	height: var(--btn-size-m);
	padding: var(--btn-padding);
	justify-content: center;
	align-items: center;
}

.notebookbar-shortcuts-bar .unotoolbutton.notebookbar .unobutton img {
	width: 16px;
	height: 16px;
	margin: 0;
}

.unoSave.savemodified .unobutton img,
.savemodified.unotoolbutton .unobutton img,
nav [id^='save'].saved img,
#toolbar-up [id^='save'].saved img {
	box-sizing: border-box;
	padding-left: var(--btn-img-size) !important;
}

html:not([data-theme='dark']) .unoSave.savemodified .unobutton img {
	background: url('images/lc_savemodified.svg') no-repeat center;
}

html:not([data-theme='dark']) .savemodified.unotoolbutton:not(.notebookbar) .unobutton img {
	background: url('images/compact_savemodified.svg') no-repeat center;
}

html[data-theme='dark'] .unoSave.savemodified .unobutton img {
	background: url('images/dark/lc_savemodified.svg') no-repeat center;
}

html[data-theme='dark'] .savemodified.unotoolbutton:not(.notebookbar) .unobutton img {
	background: url('images/dark/compact_savemodified.svg') no-repeat center;
}


.notebookbar-shortcuts-bar .notebookbar.unotoolbutton {
	margin: 0px !important;
}

.notebookbar-shortcuts-bar .cell.notebookbar {
	padding: 0 2px;
}

.hasnotebookbar .notebookbar-shortcuts-bar #Menubar,
.hasnotebookbar .notebookbar-shortcuts-bar #Menubar li,
.hasnotebookbar .notebookbar-shortcuts-bar #Menubar > li > a {
	background-color: transparent;
	margin: 0px !important;
}


.hasnotebookbar .notebookbar-shortcuts-bar #Menubar > li > a {
	cursor: pointer;
	border: none;
	padding: var(--spacing-s);
}

.hasnotebookbar #shortcuts-menubar-icon {
	position: absolute;
	top: 45%;
	left: 6px;
	height: 2px;
	width: 16px;
	transition: all var(--duration-normal);
}

#Open_Local_Editor img {
	opacity: .8;
}
[data-theme='dark'] #Open_Local_Editor img {
	filter: invert(1);
}

/* options section */
.notebookbar-options-section .cell.notebookbar {
	padding: 0;
}

/* root container */

.root-container.notebookbar {
	display: table-cell;
	vertical-align: middle;
	align-content: center;
}

#toolbar-wrapper.hasnotebookbar {
	background: var(--color-background-lighter);
	position: relative;
	z-index: 11;
}

.notebookbar.horizontal.ui-overflow-manager {
	padding-inline-start: 5px;
}

.hasnotebookbar > #toolbar-row {
	height: 82px;
}

.vertical.notebookbar {
	width: max-content;
	display: grid;
	grid-auto-flow: row;
	grid-gap: var(--spacing-s);
}

.notebookbar.ui-separator.vertical {
	width: 1px;
	background-color: var(--color-toolbar-border);
	height: var(--notebookbar-element-height);
	margin: 0 2px;
	box-sizing: border-box;
}

.horizontal.notebookbar {
	display: grid;
	grid-auto-flow: column;
	grid-gap: var(--spacing-s);
	align-items: center;
	justify-items: center;
	width: max-content;
	color: var(--color-main-text);
}

/* Curve isn't in a vertical notebookbar, so it's center-aligned by default instead of top-aligned.
	This rule ensures it aligns to the top. */
.horizontal.notebookbar #insert-illustrations.ui-overflow-group .ui-overflow-group-content,
.horizontal.notebookbar #insert-illustrations.ui-overflow-group .top-row-overflow-group {
	align-items: start;
}

/* unobuttons */

/* avoid bug with arrow in new line when window is small */
#table-Home-Section-Insert #table-LineB9 #InsertGraphic.notebookbar,
#table-Home-Section-Insert #table-GroupB20 #InsertTable.notebookbar {
	width: 50px;
}
#table-Home-Section-Insert #table-LineB9 #InsertGraphic.notebookbar {
	width: auto;
	margin-left: -2px;
}
#buttonbefore.notebookbar, #buttonafter.notebookbar, #buttonoptimal.notebookbar, #buttonparallel.notebookbar, #buttonnone.notebookbar, #buttonthrough.notebookbar, #bottom.notebookbar, #top.notebookbar, #standard.notebookbar, #Bold.notebookbar, #Italic.notebookbar, #Underline.notebookbar, #Strikeout.notebookbar {
	margin: 0px !important;
	padding: 0px !important;
}

.unotoolbutton.notebookbar .unobutton {
	box-sizing: border-box;
	padding: var(--btn-padding);
	width: var(--btn-size);
	height: var(--btn-size);
	background-color: transparent;
	margin: 0;
	vertical-align: middle;
	border: none;
	line-height: 0em;
	color: var(--color-main-text);
	font-size: var(--default-font-size);
	display: flex;
	flex-direction: column;
	position: relative;
	justify-content: center;
	align-items: center;
}

.unotoolbutton.notebookbar .unobutton::after {
	--click-increment: -1px;
	position: absolute;
	content: '';
	top: var(--click-increment);
	right: var(--click-increment);
	bottom: var(--click-increment);
	left: var(--click-increment);
	pointer-events: none;
}

.unotoolbutton .unobutton > img,
.unotoolbutton .unobutton > .w2ui-icon {
	transition: scale var(--duration-instant) var(--ease-out);
}

.unotoolbutton:not(.disabled, [disabled]) .unobutton:not(:disabled):active > img,
.unotoolbutton:not(.disabled, [disabled]) .unobutton:not(:disabled):active > .w2ui-icon {
	scale: 0.92;
}

.unotoolbutton.notebookbar.inline:hover {
	background-color: var(--color-background-darker);
}

.jsdialog .ui-tabs-content {
	margin-top: 10px;
}

.jsdialog-window.modalpopup.ui-overflow-group-popup {
	overflow: visible;
}

.ui-overflow-group-popup .top-row-overflow-group > * {
	flex-shrink: 0;
}

.ui-overflow-group-popup .top-row-overflow-group > .ui-grid {
	width: auto;
}

.ui-tabs-content .unobutton > img,
.ui-overflow-group-popup .unotoolbutton.notebookbar .unobutton > img {
	width: var(--btn-img-size);
	height: var(--btn-img-size);
}

.unotoolbutton.notebookbar .unolabel {
	font-size: var(--header-font-size);
	font-family: var(--cool-font);
	color: var(--color-main-text);
	padding: 0px 5px !important;
	line-height: normal;
	grid-column: 2;
}

.notebookbar.ui-checkbox {
	display: flex;
	flex-direction: row;
}

label.notebookbar.ui-checkbox-label {
	font-family: var(--cool-font);
	font-size: var(--header-font-size);
	white-space: nowrap;
	padding-left: 0;
}

/* The labels in the bar get smaller with the window, so fewer groups fold. A popup opened from
   the bar has room and keeps the full size. */
.notebookbar-scroll-wrapper .unotoolbutton.notebookbar .unolabel,
.notebookbar-scroll-wrapper label.notebookbar.ui-checkbox-label {
	font-size: var(--notebookbar-label-font-size);
}

.notebookbar-scroll-wrapper .jsdialog-window .unotoolbutton.notebookbar .unolabel,
.notebookbar-scroll-wrapper .jsdialog-window label.notebookbar.ui-checkbox-label {
	font-size: var(--header-font-size);
}

/* Make sure that folded buttons are not extra-large due to long labels. The longest line a label
   gets narrows with the window, from wider than any label at 1600px to 5em at 1200px, so labels
   take a second line one after the other. */
.notebookbar-scroll-wrapper .unotoolbutton.notebookbar.has-label:not(.inline) .unolabel {
	display: inline-block;
	min-width: min-content;
	max-width: clamp(5em, calc(60vw - 660px), 300px);
	white-space: normal;
	-webkit-hyphens: auto;
	        hyphens: auto;
	line-height: 1.15;
	text-align: center;
}

.notebookbar #table-options #chk_empty_row {
	visibility: hidden;
}

#table-HomeTab .unospan-uptoolbar:not(.disabled) {
	border-top-left-radius: 12px;
	border-bottom-left-radius: 12px;
	background: linear-gradient(to left, #e6e6e600, #e6e6e652 30%);
}
#table-HomeTab .unospan-downtoolbar:not(.disabled) {
	background: linear-gradient(to right, #e6e6e600, #e6e6e652 30%);
	border-top-right-radius: 12px;
	border-bottom-right-radius: 12px;
}
#table-HomeTab .unospan-uptoolbar:not(.disabled):hover {
	box-shadow: -2px 0 2px 2px #e6e6e6b0;
}
#table-HomeTab .unospan-downtoolbar:not(.disabled):hover {
	box-shadow: 2px 0 2px 2px #e6e6e6b0;
}
#table-HomeTab .unospan-uptoolbar img, #table-HomeTab .unospan-downtoolbar img {
	width: 18px !important;
	height: 18px !important;
	padding: var(--spacing-s);
}

.ui-combobox.notebookbar[disabled],
.unotoolbutton.notebookbar.disabled:not(.unospan-shortcutstoolbox),
.unotoolbutton[disabled]:not(.unospan-shortcutstoolbox) {
	cursor: not-allowed;
}

.mobile-wizard-widebutton.disabled,
.locking-disabled {
	opacity: var(--opacity-icon-disabled);
	cursor: not-allowed;
}

.locking-disabled:hover {
	opacity: 1;
}

.restricted-item {
	display: none !important;
}

.unotoolbutton.notebookbar.disabled img,
.mobile-wizard-widebutton.disabled img,
.unotoolbutton[disabled] img {
	filter: grayscale(100%) brightness(100%);
}

/* Fill Color (Writer > Picture) button swatch */
.unotoolbutton.notebookbar.disabled .selected-color,
.unotoolbutton[disabled] .selected-color {
	filter: grayscale(100%);
}

.ui-combobox.notebookbar[disabled] img {
	opacity: var(--opacity-icon-disabled-light);
}

.ui-combobox-button.notebookbar[disabled] .ui-listbox-arrow,
.unotoolbutton.notebookbar.disabled img,
.unotoolbutton.notebookbar.disabled .unoarrow,
.unotoolbutton.notebookbar.disabled .selected-color,
.unotoolbutton[disabled] img,
.unotoolbutton[disabled] .unoarrow,
.unotoolbutton[disabled] .selected-color {
	opacity: var(--opacity-icon-disabled);
}

.unotoolbutton.notebookbar.disabled .unolabel,
.unotoolbutton[disabled] .unolabel {
	opacity: var(--opacity-text-disabled);
}

.ui-combobox:not([disabled]) *,
.unotoolbutton:not(.disabled) * {
	cursor: pointer;
}

.ui-combobox[disabled] *,
.unotoolbutton[disabled] * {
	cursor: not-allowed !important;
}

/* do not focus on disabled items */
.unotoolbutton[disabled] .unobutton {
	pointer-events: none;
}

.unotoolbutton.notebookbar {
	text-align: center;
}

.unotoolbutton.notebookbar.has-label > *:not(.arrowbackground) { /*so they stay side by side*/
	display: table-cell;
	width: max-content;
	height: 100%;
}

.unotoolbutton.notebookbar.has-label {
	text-align: center;
}

.unotoolbutton.notebookbar.has-label:not(.inline) img {
	width: 24px !important;
	height: 24px !important;
	box-sizing: border-box;
	margin: auto !important;
	display: block;
}

.ui-pushbutton.notebookbar img {
	height: 24px;
}

.has-label.has-dropdown:not(.inline) .unolabel {
	display: inline-block;
	clear: both;
	color: var(--color-main-text);
}

/* big color split button */
.unotoolbutton.notebookbar.has-label.has-colorpicker .unobutton img {
	width: var(--btn-img-size) !important;
	height: var(--btn-img-size) !important;
	object-fit: contain;
	margin: 0 auto !important;
}

.unotoolbutton.notebookbar.has-label.has-colorpicker .selected-color {
	display: block;
	margin: 0 auto 4px;
}

/* adding focus to tab in notebookbar */
.ui-tab.selected.notebookbar.add-focus-to-tab {
	border: 2px solid black !important
}

/* unobuttons with inline labels */

.inline.notebookbar {
	width: max-content;
	white-space: nowrap;
	display: grid;
	grid-auto-flow: column;
	align-items: center;
}

.unotoolbutton.notebookbar.inline .unobutton {
	width: auto;
	flex-direction: row;
	line-height: normal;
	position: static !important;
}

#FormatPaintbrush span {
	display: none;
}

.notebookbar .ui-iconview-root {
	display: flex;
}

/* Writer */

/* File Tab */

/* Home tab */
[data-doctype='text'] #home-clipboard .unotoolbutton.unoCut,
[data-doctype='text'] #home-insert-content .unoInsertPagebreak {
	margin-inline-end: var(--btn-arrow-size);
}
.notebookbar.ui-combobox * {
	line-height: 22px;
}

/* root of iconview */
.jsdialog [id^='elements_'][id$='-iconview-list']:not(.sidebar),
.jsdialog #stylesview-iconview-list:not(.sidebar),
.jsdialog #masterpagenb-iconview-list:not(.sidebar),
.jsdialog #tablestyles_design-iconview-list:not(.sidebar),
.jsdialog #table-design-styles-iconview-list:not(.sidebar),
.jsdialog #transitions_icons-iconview-list:not(.sidebar),
.jsdialog #iconview_theme_colors-iconview-list:not(.sidebar) {
	height: auto !important;
	min-height: 64px !important;
	border: none !important;
	margin: 0 auto !important;

	/*
	 * NOTE: `jsdialog-container .ui-dialog-content` has a
	 *        `max-height` set to `calc( 90vh - 98px)`. this
	 *        max height is a little less than that so that
	 *        if there are buttons in the dropdown below the
	 *        iconview, they wouldn't go into the overflow.
	 */
	max-height: min(calc( 72vh - 98px), 400px) !important;
}

.ui-iconview-buttons-container {
	display: flex;
	flex-direction: column;
	justify-content: center;
	border: 1px solid var(--color-stylesview-border);
	border-top-right-radius: var(--border-radius);
	border-bottom-right-radius: var(--border-radius);
	height: var(--notebookbar-element-height);
	margin-inline-start: -1px;
	box-sizing: border-box;
}

.ui-iconview-buttons-container .unotoolbutton:hover {
	border: 1px solid transparent;
}

.ui-iconview-button button {
	width: calc(var(--btn-size-s) - var(--border-radius-s)) !important;
	height : calc(var(--btn-size-s) - var(--border-radius-s)) !important;
	border: 0;
}

.ui-iconview-button:hover {
	border: 1px solid transparent !important;
}

.ui-iconview-button-icon {
	width: var(--btn-img-size-s) !important;
	height: var(--btn-img-size-s) !important;
	box-sizing: border-box;
}

/* inner iconview - don't set height for dropdown ones */
.notebookbar#stylesview,
.notebookbar#masterpageall_icons,
.notebookbar#masterpagecurrent_icons,
.notebookbar#tablestyles_design,
.notebookbar#table-design-styles,
.notebookbar#transitions_icons,
.notebookbar#iconview_theme_colors,
.notebookbar#custom_animation_list,
.notebookbar#effect_list,
.notebookbar.ui-iconview[id^='elements_'] {
	height: var(--notebookbar-element-height);
	overflow: auto;
	display: grid;
	row-gap: 0;
	padding: 0px;

	border: 1px solid var(--color-stylesview-border);
	border-radius: var(--border-radius);
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
	border-collapse: separate; /*To use box-shadow in Internet Explorer 9 or later*/

	scrollbar-width: none;
	background-color: var(--color-stylesview-background);
	filter: brightness(var(--brightness-stylesview));
	box-sizing: border-box;
}

/*
 * with each iconview, there exist two kinds of IDs
 * one with the `-iconview` prefix and one without it.
 * see `JSDialog.notebookbarIconView` for details.
 */
.jsdialog #stylesview,
.notebookbar #stylesview {
	width: 36.8vw;
	/* Preview base64's width = 100px + container border's etc */
	grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
	/* Preview base64's height = 30px  + container border's etc */
	grid-template-rows: repeat(auto-fit, minmax(33px, 1fr));
}

#stylesview {
	min-width: 36.8vw !important;
	justify-content: center;
}

.jsdialog #stylesview {
	background-color: var(--color-stylesview-background);
	width: auto;
}

#masterpagenb-iconview-list-dropdown,
#stylesview-iconview-list-dropdown,
[id^='elements_'][id$='-iconview-list-dropdown'],
#iconview_theme_colors-iconview-list-dropdown {
	margin-top: 37px !important;
}

#transitions_icons-iconview-list-dropdown {
	margin-top: 42px !important;
}

.jsdialog#iconview_theme_colors:not(.sidebar) {
	gap: 8px !important;
	padding: 8px 0 !important;
}

#iconview_theme_colors:not(.sidebar) .ui-iconview-entry img {
	border: 1px solid transparent;
}

#stylesview:hover {
	filter: none;
}

#stylesview::-webkit-scrollbar {
	width: 0;
	height: 0;
}

.jsdialog #stylesview .ui-iconview-entry,
.notebookbar #stylesview .ui-iconview-entry {
	box-sizing: border-box;
	padding-top: 0px;
	align-self: start;
}

/* The engine draws every preview 100 by 30 CSS pixels, at the display
   density, so the image has its size before it loads. */
.jsdialog #stylesview .ui-iconview-entry img,
.notebookbar #stylesview .ui-iconview-entry img {
	width: 100px;
	height: 30px;
}

/* A placeholder shows the style name the way the preview will: in the same white
   100 by 30 box, 8 pixels from the left edge, centred vertically, at the 12 point
   size of the default paragraph style. */
.jsdialog #stylesview .ui-iconview-entry span:not(.ui-iconview-entry-title),
.notebookbar #stylesview .ui-iconview-entry span:not(.ui-iconview-entry-title) {
	display: inline-block;
	vertical-align: middle;
	box-sizing: border-box;
	width: 100px;
	height: 30px;
	padding-left: 8px;
	line-height: 30px;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	background-color: white;
	color: black;
	font-size: 16px;
}

.ui-iconview-window {
	display: flex;
	flex-direction: row;
}

.jsdialog #stylesview .icon-view-item-container,
.notebookbar #stylesview .icon-view-item-container {
	margin: unset;
}

.jsdialog #stylesview .ui-iconview-entry-title,
.notebookbar #stylesview .ui-iconview-entry-title {
	display: none;
}

/* background is always white for previews, use black text. Same trick as the
   Styles sidebar treeview in jssidebar.css (.StyleListPanel #treeview
   .ui-treeview-cell-text); keep the two in sync. */
[data-theme='dark'] .jsdialog #stylesview .ui-iconview-entry span:not(.ui-iconview-entry-title),
[data-theme='dark'] .notebookbar #stylesview .ui-iconview-entry span:not(.ui-iconview-entry-title) {
	color: var(--color-main-background);
}

[id^='stylesview'] .ui-iconview-entry.selected {
	border: 1px solid var(--color-border-darker);
	border-collapse: separate; /*To use box-shadow in Internet Explorer 9 or later*/
	background-color: transparent;
}

[id^='stylesview'] .ui-iconview-entry:not(.selected) {
	border: 1px solid transparent;
}

[id^='stylesview'] .ui-iconview-entry:not(.selected):hover {
	border: 1px solid var(--color-border-dark);
	box-shadow: 0 0 2px 0 var(--color-background-darker);
	cursor: pointer;
	background-color: transparent;
}

#format-style-list-dialog-button {
	display: flex;
	flex-direction: row;
	width: 100%;
	position: relative;
	justify-content: start;
	color: var(--color-main-text);
}

#stylesview-dropdown hr {
	margin: 14px;
	margin-top: 0px;
	margin-bottom: 4px;
}

/* this represents the button 'Open Styles Sidebar' */
/* in the writer 'stylesview' dropdown. */
#format-style-list-dialog {
	margin: 5px;
}

#format-style-list-dialog:hover {
	border: 1px solid transparent;
	margin: 5px;
}

/* The New Table Style and Clear Style entries at the bottom of the */
/* 'tablestyles_design' gallery dropdown read as menu rows: the icon sits */
/* left of a full-width label on one line. */
.jsdialog-container [modelid='new-table-style'].unotoolbutton,
.jsdialog-container [modelid='clear-table-style'].unotoolbutton {
	display: block;
	width: calc(100% - 10px);
	margin: 2px 5px;
}

.jsdialog-container [modelid='new-table-style'].unotoolbutton .unobutton,
.jsdialog-container [modelid='clear-table-style'].unotoolbutton .unobutton {
	flex-direction: row;
	justify-content: start;
	align-items: center;
	gap: 8px;
	width: 100%;
	height: auto;
	min-height: var(--btn-size);
	padding: 4px 8px;
	line-height: normal;
	white-space: nowrap;
	text-align: start;
}

.jsdialog-container [modelid='new-table-style'] .unobutton img,
.jsdialog-container [modelid='clear-table-style'] .unobutton img {
	flex: 0 0 auto;
}

[id^='tablestyles_design'] hr,
[id^='Tablestyles_design'] hr {
	margin: 4px 8px;
}

/* Insert Tab */

/* Layout Tab */

/* References Tab */

/* Format Tab */

/* Table Tab */

/* Review Tab */

/* View Tab */

#View-container #showstatusbar {
	width: 109px;
}

[data-doctype='spreadsheet'] #View-container #showstatusbar {
	display: grid;
	grid-template-columns: var(--btn-img-size) auto;
	align-items: center;
	width: auto;
	padding-inline-start: calc(1px + var(--btn-padding));
}

[data-doctype='spreadsheet'] #View-container #showstatusbar-input {
	justify-self: center;
	margin: 0;
}

[data-doctype='spreadsheet'] #View-container #showstatusbar-label {
	margin-inline: 0;
	padding-inline-start: 5px;
}

/* Help tab */

/* File tab */

/* Draw tab */

#Home-container #home-chart-table,
#Home-container #home-para-spacing {
	width: auto;
}

#Home-container .toolbox#home-chart-table {
	justify-self: stretch;
	justify-content: space-between;
}

#Home-container .toolbox#home-para-spacing {
	display: flex;
	justify-self: stretch;
}

#Home-container .toolbox#home-para-spacing > .unoParaRightToLeft {
	margin-inline-start: auto;
}


/* Calc */

/* Home tab */

#numbertype select {
	flex: 1 0;
}

.notebookbar.unoAlignBottom {
	width: calc((var(--btn-size) + var(--btn-padding)) * 2);
}

/* Review Tab */

/* Sheet Tab */

/* Data Tab */


/* Impress */

/* Home Tab */

/* Insert Tab */

#table-Insert #HeaderAndFooter.notebookbar {
	min-width: 160px;
}

/* Review Tab */

/* Design Tab */

.jsdialog #masterpageall_icons,
.jsdialog #masterpagecurrent_icons
#masterpageall_icons,
#masterpagecurrent_icons {
	width: 15vw !important;
	max-width: 265px;
	min-width: 90px;
	grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
	grid-template-rows: repeat(auto-fit, minmax(62px, 1fr));
	margin-left: 5px;
}

/* Transition Tab */

#transitions_icons:not(.sidebar),
#transitions_icons-iconview:not(.sidebar) {
	width: 35vw;
	grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
	grid-template-rows: repeat(auto-fit, minmax(60px, 1fr));
	margin-left: 10px;
}

.jsdialog #transitions_icons:not(.sidebar) {
	width: 33.6vw !important;
}

#transitions_icons.sidebar {
	height: inherit;
	width: 100%;
}

.jsdialog #transitions_icons,
.notebookbar #transitions_icons-iconview {
	margin-left: 10px;
}

#transitions-group {
	margin-bottom: 7px;
}

#Transition-container.notebookbar {
	justify-items: stretch;
}

.notebookbar#transitions_icons.ui-iconview {
	max-height: 75px;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	flex-grow: 1;
	scroll-snap-type: y mandatory;
	scroll-behavior: smooth;
	width: 35vw !important;
}

.notebookbar #transitions_icons.ui-iconview > * {
	scroll-snap-align: start;
}

[data-theme='dark'] .notebookbar #transitions_icons.ui-iconview .ui-iconview-entry img {
	filter: invert(1);
}

/* Animation Tab */
#Animation.notebookbar .ui-grid,
#Animation.notebookbar #effect_list,
#Animation.notebookbar #custom_animation_list {
	min-height: initial;
	height: var(--notebookbar-element-height);
	margin: 0px 5px;
	justify-content: stretch;
}

#Animation.notebookbar #custom_animation_list {
	display: block;      /* force to allow full scroll range */
	min-width: 308px;    /* to avoid flicker and too much changes */
	overflow-y: scroll;  /* to avoid flicker always show scroll */
	width: max-content;  /* adjust to the generated size */
	scrollbar-width: initial;
}

#Animation.notebookbar #custom_animation_list div {
	padding: 0px;
	margin: 0px;
}

#Animation.notebookbar #custom_animation_list .ui-treeview-cell-text-content {
	display: grid;
}

#Animation.notebookbar .ui-grid button {
	width: 100%;
	justify-content: start;
	margin: 0px;
	height: 30px;
}

#Animation.notebookbar .ui-listbox {
	min-width: 100px;
}

/* Table Tab */

#tablestyles_design.notebookbar,
#tablestyles_design.jsdialog {
	grid-template-columns: repeat(7, 1fr);
	grid-gap: 10px;
	padding: 5px 10px;
}

/* The section titles of a style gallery only fit the expanded view: the strip in the
   notebookbar has no room for them and fills every row, the dropdown shows each title on a
   row of its own. */
#tablestyles_design.notebookbar .ui-iconview-separator,
#table-design-styles.notebookbar .ui-iconview-separator {
	display: none;
}

#masterpagenb-entries .static-label.ui-text,
#tablestyles_design .ui-iconview-separator.label,
#table-design-styles .ui-iconview-separator.label {
	grid-column: 1 / -1;
	padding-inline-start: 8px;
	font-size: var(--default-font-size);
	font-weight: 500;
}

/* Table Design Tab (Writer and Impress) */

/* Seven columns: the built-in catalog comes in rows of one style variant in its plain form
   and its six theme accents, so each grid row is one variant and each column one accent. */
#table-design-styles.notebookbar,
#table-design-styles.jsdialog {
	grid-template-columns: repeat(7, 1fr);
	grid-gap: 10px;
	padding: 5px 10px;
}

/* Draw Tab */

/* other */

.ui-drawing-area-container {
	position: relative;
}

.ui-drawing-area-loader {
	border: 5px solid var(--color-border-lighter);
	border-top: 5px solid var(--color-border);
	border-radius: 50%;
	width: 20px;
	height: 20px;
	animation: spin 2s linear infinite;
	margin-left: auto;
	margin-right: auto;
	position: relative;
	top: 25%;
}

.ui-drawing-area-loader-container {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
}

.ui-drawing-area-placeholder-container {
	position: absolute;
	overflow: hidden;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
}

.ui-drawing-area-placeholder {
	margin: 0;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 100%;
	text-align: center;
}

#style1 img ~ .ui-drawing-area-placeholder-container .ui-drawing-area-placeholder {
	font-family: Liberation Serif;
	font-size: var(--default-font-size);
}

#style2 img ~ .ui-drawing-area-placeholder-container .ui-drawing-area-placeholder {
	font-family: Liberation Serif;
	font-size: var(--default-font-size);
}

#style3 img ~ .ui-drawing-area-placeholder-container .ui-drawing-area-placeholder {
	font-family: Liberation Sans;
	font-size: calc(var(--default-font-size)*2);
	font-weight: bold;
}

#style4 img ~ .ui-drawing-area-placeholder-container .ui-drawing-area-placeholder {
	font-family: Liberation Sans;
	font-size: calc(var(--default-font-size)*1.5);
}

[class*='as-odt-submenu-icon'] {
	background: url('images/lc_downloadas-odt.svg') center;
}

[class*='as-ods-submenu-icon'] {
	background: url('images/lc_downloadas-ods.svg') center;
}

[class*='as-odp-submenu-icon'] {
	background: url('images/lc_downloadas-odp.svg') center;
}

[class*='as-odg-submenu-icon'] {
	background: url('images/lc_downloadas-odg.svg') center;
}

[class*='as-png-submenu-icon'] {
	background: url('images/lc_insertgraphic.svg') center;
}

[class*='as-bmp-submenu-icon'] {
	background: url('images/lc_insertgraphic.svg') center;
}

[class*='as-gif-submenu-icon'] {
	background: url('images/lc_insertgraphic.svg') center;
}

[class*='as-tiff-submenu-icon'] {
	background: url('images/lc_insertgraphic.svg') center;
}

[class*='as-svg-submenu-icon'] {
	background: url('images/lc_exportsvg.svg') center;
}

[class*='as-rtf-submenu-icon'] {
	background: url('images/lc_downloadas-rtf.svg') center;
}

[class*='as-doc-submenu-icon'] {
	background: url('images/lc_downloadas-doc.svg') center;
}

[class*='as-docx-submenu-icon'] {
	background: url('images/lc_downloadas-docx.svg') center;
}

[class*='pdf-submenu-icon'] {
	background: url('images/lc_exportpdf.svg') center;
}

[class*='epub-submenu-icon'] {
	background: url('images/lc_exportepub.svg') center;
}

[class*='as-xls-submenu-icon'] {
	background: url('images/lc_downloadas-xls.svg') center;
}

[class*='as-xlsx-submenu-icon'] {
	background: url('images/lc_downloadas-xlsx.svg') center;
}

[class*='as-csv-submenu-icon'] {
	background: url('images/lc_downloadas-csv.svg') center;
}

[class*='as-ppt-submenu-icon'] {
	background: url('images/lc_downloadas-ppt.svg') center;
}

[class*='as-pptx-submenu-icon'] {
	background: url('images/lc_downloadas-pptx.svg') center;
}

[class*='as-html-submenu-icon'] {
	background: url('images/lc_downloadas-html.svg') center;
}

[class*='as-md-submenu-icon'] {
	background: url('images/lc_downloadas-md.svg') center;
}

#context-toolbar {
	position: absolute;
	background: var(--color-background-lighter);
	padding: 5px;
	transform: translateY(-105%);
	z-index: 12;
	border-radius: var(--border-radius);
	border: solid var(--color-toolbar-border) 1px;
	display: grid;
	opacity: 1;
	transition: all var(--duration-normal) allow-discrete;
	box-shadow: 0 6px 18px var(--color-box-shadow-light);
}

/* Set on the overlay of the context menu while the pointer is over the
   context toolbar, so the overlay does not take the clicks meant for the
   toolbar. The menu inside the overlay still gets the pointer. */
.jsdialog-overlay.context-toolbar-passthrough {
	pointer-events: none;
}

.jsdialog-overlay.context-toolbar-passthrough > * {
	pointer-events: auto;
}

#context-toolbar.hidden {
	display: none;
	opacity: 0;
	transition: all var(--duration-normal) allow-discrete;
}

#context-toolbar .unobutton > img {
	width: var(--btn-img-size);
	height: var(--btn-img-size);
}

@media screen and (max-width: 900px) {
	[id^='SidebarDeck.PropertyDeck'] {
		display: none !important;
	}
}

/* Formula Tab (Writer) */

.notebookbar.ui-overflow-group-content[id^='elements_group'] {
	width: 100%;
	grid-template-columns: minmax(0, 1fr);
	justify-items: stretch;
}

.notebookbar.ui-iconview-window[id^='elements_group'] {
	flex: 1 1 auto;
}

.notebookbar.ui-iconview[id^='elements_'] {
	grid-auto-flow: column;
	grid-template-rows: repeat(2, minmax(0, 1fr));
	grid-auto-columns: max-content;
	grid-template-columns: none;
	justify-content: start;
	width: max-content;
	min-width: max(64px, 100%);
	max-width: 160px;
	overflow-x: auto;
	overflow-y: hidden;
	gap: 0;
	column-gap: var(--spacing-xs);
}

.notebookbar [id^='elements_'] .ui-iconview-entry {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	box-sizing: border-box;
	min-width: 26px;
	padding: 0 var(--spacing-xs);
	float: none;
}

.notebookbar [id^='elements_'] .ui-iconview-entry img,
.notebookbar [id^='elements_'] .ui-iconview-entry span {
	max-height: 100%;
}

[data-theme='dark'] .notebookbar [id^='elements_'] .ui-iconview-entry img {
	filter: invert(1);
}

.notebookbar [id^='elements_'] .ui-iconview-separator {
	grid-row: 1 / -1;
	align-self: stretch;
	flex: none;
	width: 1px;
	margin: var(--spacing-xs) var(--spacing-s);
	padding: 0;
	border: none;
	background-color: var(--color-border-dark);
}

.ui-separator[id^='elements_group'][id$='-break']:has(+ .ui-overflow-group.hidden) {
	display: none;
}

.notebookbar .ui-iconview-root-horizontal .ui-iconview-window {
	min-width: 0;
}

[id^='elements_'][id$='-iconview-list-dropdown'] .ui-iconview {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	width: max-content;
	max-width: min(40vw, 640px);
	overflow-x: hidden;
}

[id^='elements_'][id$='-iconview-list-dropdown'] .ui-iconview-entry {
	flex: 0 0 auto;
	min-width: 72px;
}

[id^='elements_'][id$='-iconview-list-dropdown'] .ui-iconview-separator {
	flex: 0 0 100%;
	width: auto;
	height: 1px;
	margin: var(--spacing-xs) 0;
}
