/*
 * w2ui 2.0 layout as the pages had it with w2ui 1.x. Only layout: fonts, colors and
 * images stay those of the site's own styles. Loaded after the page's style block in Head.php.
 */

/* Toolbar: 2.0 lays items out in a flex row without vertical alignment, so text
   items sit at the top while 30px buttons sit lower. */
.w2ui-toolbar .w2ui-scroll-wrapper { align-items: center; }

/* Text items (labels like "Menu", "Select customer"): 11px as in 1.x, where they were
   table cells with their own size instead of a nested 0.9em. */
.w2ui-toolbar .w2ui-scroll-wrapper .w2ui-tb-html {
	font-size: 11px;
	line-height: 30px;
	white-space: nowrap;
	padding: 0 4px;
}

/* Site icons are background images on a span (see styles.css .w2ui-icon.icon-…). */
.w2ui-toolbar .w2ui-scroll-wrapper .w2ui-tb-button .w2ui-tb-icon > span.w2ui-icon,
.w2ui-sidebar .w2ui-node-image > span.w2ui-icon,
.w2ui-menu .menu-icon > span.w2ui-icon {
	display: inline-block;
	width: 16px;
	height: 16px;
	margin: 0;
	vertical-align: middle;
	background-repeat: no-repeat;
	background-position: center;
}
.w2ui-toolbar .w2ui-scroll-wrapper .w2ui-tb-button .w2ui-tb-icon { margin-top: 5px; }
.w2ui-sidebar .w2ui-node-image { width: 22px; text-align: center; padding-top: 2px; }

/* Button captions keep one line and the same size whether or not there is an icon. */
.w2ui-toolbar .w2ui-scroll-wrapper .w2ui-tb-button .w2ui-tb-text { white-space: nowrap; line-height: 16px; }
.w2ui-toolbar .w2ui-scroll-wrapper .w2ui-tb-button:not(:has(.w2ui-tb-icon)) .w2ui-tb-text { margin-left: 0; }

/* Grid toolbar and search as compact as in 1.x (2.0: 52px toolbar, 30px search box). */
.w2ui-grid .w2ui-grid-toolbar { height: 38px; padding: 3px 3px 0 3px; }
.w2ui-grid .w2ui-grid-toolbar .w2ui-grid-search-input { top: 0; width: 200px; }
.w2ui-grid .w2ui-grid-toolbar .w2ui-grid-search-input .w2ui-search-all {
	height: 24px !important;
	width: 200px !important;
	font-size: 11px !important;
}
.w2ui-grid .w2ui-grid-toolbar .w2ui-grid-search-input .w2ui-search-down { top: 4px; }

/* The select column takes the 5px padding of data cells in 2.0, which makes its rows
   taller than the 24px data rows and shifts the two halves of the grid apart. */
.w2ui-grid .w2ui-grid-body table td.w2ui-grid-data.w2ui-col-select > div { padding: 0; line-height: 0; }
.w2ui-grid .w2ui-grid-body table td.w2ui-col-select div input[type=checkbox] { margin: 0; vertical-align: middle; }

/* A date field the page hides (visible = false comes as an inline width of 1px) stays
   hidden: 2.0's input padding would otherwise widen it enough to show part of it. */
.dateBlock input.dateinp[style*="width: 1px"],
.dateBlock input.dateinp[style*="width:1px"] {
	background: none !important;
	padding: 0 !important;
	border: 0 !important;
	min-width: 0 !important;
}

/* Button captions: 11px like the text items. In 2.0 the nested 0.8em/0.9em rules of
   Head.php shrink them to about 8px. */
.w2ui-toolbar .w2ui-scroll-wrapper .w2ui-tb-button .w2ui-tb-text { font-size: 11px; }

/* Side menu: fixed sizes, because the nested 0.9em of Head.php shrinks every level, and its
   own group rules name the 1.x class (.w2ui-sidebar-div) that 2.0 no longer has. Group titles
   keep their case: Armenian capitals in a small size are hard to read. */
.w2ui-sidebar .w2ui-sidebar-body .w2ui-node-text,
.w2ui-sidebar .w2ui-sidebar-body .w2ui-node-text * { font-size: 13px; }
.w2ui-sidebar .w2ui-sidebar-body .w2ui-node-group,
.w2ui-sidebar .w2ui-sidebar-body .w2ui-node-group * { font-size: 12px; }
.w2ui-sidebar .w2ui-sidebar-body .w2ui-node-group :nth-child(2) {
	text-transform: none;
	font-weight: 600;
	color: #333;
}
