/* Eureka WebUI sobre ZK10 - formularios y controles.
   Hoja autónoma: no depende de archivos generados en build/css. */

/* ============================================================================
   07. Editores de formulario
   ============================================================================ */

/* ZK10 form editors: keep classic Eureka compact field height. */
.z-combobox,
.z-datebox,
.z-bandbox,
.z-timebox,
.z-spinner {
	align-items: stretch !important;
	box-sizing: border-box !important;
	display: inline-flex;
	height: 20px !important;
	line-height: 20px !important;
	min-height: 20px !important;
	vertical-align: middle !important;
}

.z-combobox-input,
.z-combobox-inp,
.z-datebox-input,
.z-datebox-inp,
.z-bandbox-input,
.z-bandbox-inp,
.z-timebox-input,
.z-timebox-inp,
.z-spinner-input,
.z-spinner-inp {
	box-sizing: border-box !important;
	font-family: "Segoe UI", Tahoma, Verdana, Arial, sans-serif !important;
	font-size: 12px !important;
	height: 20px !important;
	line-height: 18px !important;
	min-height: 20px !important;
	min-width: 0 !important;
	padding-bottom: 0 !important;
	padding-left: 6px !important;
	padding-right: 24px !important;
	padding-top: 0 !important;
}

.z-combobox-button,
.z-combobox-img,
.z-datebox-button,
.z-datebox-img,
.z-bandbox-button,
.z-bandbox-img,
.z-timebox-button,
.z-timebox-img,
.z-spinner-button,
.z-spinner-img {
	align-items: center !important;
	box-sizing: border-box !important;
	display: inline-flex;
	font-size: 13px !important;
	height: 20px !important;
	justify-content: center !important;
	line-height: 20px !important;
	min-height: 20px !important;
	min-width: 22px !important;
	padding: 0 !important;
	transform: translateY(2px) !important;
	vertical-align: top !important;
	width: 22px !important;
}

.z-combobox-button i,
.z-datebox-button i,
.z-bandbox-button i,
.z-timebox-button i,
.z-spinner-button i {
	font-size: 13px !important;
	line-height: 20px !important;
}

/* The controls in this file load after main.css; keep their trigger aligned
   with the input instead of reintroducing the legacy vertical offset. */
.z-combobox-button,
.z-combobox-img,
.z-datebox-button,
.z-datebox-img,
.z-bandbox-button,
.z-bandbox-img,
.z-timebox-button,
.z-timebox-img,
.z-spinner-button,
.z-spinner-img {
	margin: 0 !important;
	position: static !important;
	transform: none !important;
	vertical-align: middle !important;
}

/* Datebox: input and trigger are one control. */
.z-datebox-input,
.z-datebox-inp {
	border-radius: 4px 0 0 4px !important;
	flex: 1 1 auto !important;
}

/* A list editor is one control: keep its trigger in the same flex row as
   the input so the trigger is painted inside the field and remains clickable. */
.z-combobox-input,
.z-combobox-inp {
	border-radius: 4px 0 0 4px !important;
	border-right: 0 !important;
	flex: 1 1 auto !important;
}

.z-combobox-button,
.z-combobox-img {
	background-color: #ffffff !important;
	border-left: 0 !important;
	border-radius: 0 4px 4px 0 !important;
	flex: 0 0 22px !important;
	overflow: hidden !important;
}

/* The legacy theme applies tiled GIFs to normal and read-only inputs.  On
   current browsers they look like an inset shadow, so all standard form
   editors use a clean, solid surface instead. */
.z-textbox,
.z-intbox,
.z-longbox,
.z-doublebox,
.z-decimalbox,
.z-combobox-input,
.z-combobox-inp,
.z-datebox-input,
.z-datebox-inp,
.z-timebox-input,
.z-timebox-inp,
.z-bandbox-input,
.z-bandbox-inp,
.z-spinner-input,
.z-spinner-inp {
	background-image: none !important;
	box-shadow: none !important;
}

/* Keep the real arrow visible but non-interactive when ADempiere marks a list
   editor as read-only. */
.readonly-field .z-combobox-button,
.readonly-field .z-combobox-img,
.disabled-field .z-combobox-button,
.disabled-field .z-combobox-img {
	background-color: #eceae4 !important;
	opacity: 1 !important;
	pointer-events: none !important;
	visibility: visible !important;
}

/* Read-only text-like editors use the same flat disabled surface. */
.readonly-field .z-combobox-input,
.readonly-field .z-combobox-inp,
.readonly-field .z-datebox-input,
.readonly-field .z-datebox-inp,
.readonly-field .z-timebox-input,
.readonly-field .z-timebox-inp,
.readonly-field .z-bandbox-input,
.readonly-field .z-bandbox-inp,
.readonly-field .z-textbox,
.readonly-field .z-intbox,
.readonly-field .z-longbox,
.readonly-field .z-doublebox,
.readonly-field .z-decimalbox,
.z-textbox-readonly,
.z-combobox-input[readonly],
.z-combobox-inp-readonly,
.z-decimalbox-readonly,
.z-datebox-input[readonly],
.z-datebox-inp-readonly {
	background-color: #eceae4 !important;
	background-image: none !important;
	box-shadow: none !important;
}

/* A single-line string is displayed as plain text inside a bordered field.
   Do not use the grey read-only fill here: it is visually perceived as an
   inset shadow.  Lists retain the grey surface and their visible arrow. */
.readonly-field .z-textbox,
.readonly-field .z-intbox,
.readonly-field .z-longbox,
.readonly-field .z-doublebox,
.readonly-field .z-decimalbox,
.z-textbox-readonly,
.z-textbox[readonly],
.z-textbox:disabled,
.z-decimalbox-readonly {
	-webkit-appearance: none !important;
	appearance: none !important;
	background: #ffffff !important;
	border: 1px solid #bbbbbb !important;
	box-shadow: none !important;
	filter: none !important;
	text-shadow: none !important;
}


/* The menu search is one control: the outer widget owns the border and the
   trigger is positioned inside it.  This prevents the form-editor rules from
   rendering an input and a detached second block for the drop-down arrow. */
.eureka-menu-search-panel .z-combobox {
	background: #ffffff !important;
	border: 1px solid #bbbbbb !important;
	border-radius: 4px !important;
	box-sizing: border-box !important;
	display: inline-block !important;
	height: 32px !important;
	min-height: 32px !important;
	overflow: hidden !important;
	position: relative !important;
	width: 100% !important;
}

.eureka-menu-search-panel .z-combobox-input,
.eureka-menu-search-panel .z-combobox-inp {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-sizing: border-box !important;
	height: 32px !important;
	line-height: 30px !important;
	min-height: 32px !important;
	padding-right: 34px !important;
	width: 100% !important;
}

.eureka-menu-search-panel .z-combobox-button,
.eureka-menu-search-panel .z-combobox-img {
	align-items: center !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	bottom: 0 !important;
	display: flex !important;
	height: 32px !important;
	justify-content: center !important;
	min-height: 32px !important;
	min-width: 32px !important;
	position: absolute !important;
	right: 0 !important;
	top: 0 !important;
	width: 32px !important;
	z-index: 1 !important;
}

.eureka-menu-search-panel .z-combobox:focus-within {
	border-color: #0000ff !important;
}

.z-datebox-button,
.z-datebox-img {
	background-color: #087fca !important;
	background-image: url("../images/Calendar24.png") !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	background-size: 16px 16px !important;
	border-color: #087fca !important;
	border-left: 0 !important;
	border-radius: 0 4px 4px 0 !important;
	color: transparent !important;
	flex: 0 0 22px !important;
	overflow: hidden !important;
	text-indent: -9999px !important;
}

.z-datebox-button:hover,
.z-datebox-img:hover {
	background-color: #006fb4 !important;
	border-color: #006fb4 !important;
}

.z-datebox-button i,
.z-datebox-img i,
.z-datebox-button::before,
.z-datebox-img::before {
	content: none !important;
	display: none !important;
}

/* Lookup/calculator editors use a two-cell table. */
tr:has(> td.editor-button) > td:first-child {
	width: 100% !important;
}

tr:has(> td.editor-button) > td:first-child > input {
	border-radius: 4px 0 0 4px !important;
	border-right: 0 !important;
	box-sizing: border-box !important;
	height: 20px !important;
	margin: 0 !important;
	width: 100% !important;
}

tr > td.editor-button {
	height: 20px !important;
	min-width: 22px !important;
	padding: 0 !important;
	width: 22px !important;
}

tr > td.editor-button > button.editor-button {
	align-items: center !important;
	background-color: #087fca !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	background-size: 16px 16px !important;
	border: 1px solid #087fca !important;
	border-radius: 0 4px 4px 0 !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	display: inline-flex;
	height: 20px !important;
	justify-content: center !important;
	margin: 0 !important;
	min-height: 20px !important;
	min-width: 22px !important;
	padding: 0 !important;
	transform: none !important;
	vertical-align: top !important;
	width: 22px !important;
}

tr > td.editor-button > button.editor-button:hover {
	background-color: #006fb4 !important;
	border-color: #006fb4 !important;
}

tr > td.editor-button > button.editor-button:disabled,
tr > td.editor-button > button.editor-button[disabled] {
	background-color: #cfd3d6 !important;
	border-color: #cfd3d6 !important;
}

tr > td.editor-button > button.editor-button:has(img[src$="Calculator10.png"]) {
	background-image: url("../images/Calculator24.png") !important;
}

tr > td.editor-button > button.editor-button:has(img[src$="BPartner10.png"]) {
	background-image: url("../images/BPartner24.png") !important;
}

tr > td.editor-button > button.editor-button:has(img[src$="Product10.png"]) {
	background-image: url("../images/Product24.png") !important;
}

tr > td.editor-button > button.editor-button:has(img[src$="Locator10.png"]) {
	background-image: url("../images/Locator24.png") !important;
}

tr > td.editor-button > button.editor-button:has(img[src$="Calculator10.png"]) > img,
tr > td.editor-button > button.editor-button:has(img[src$="BPartner10.png"]) > img,
tr > td.editor-button > button.editor-button:has(img[src$="Product10.png"]) > img,
tr > td.editor-button > button.editor-button:has(img[src$="Locator10.png"]) > img {
	opacity: 0 !important;
}

/* Keep calculator and lookup buttons on the same baseline as their input.
   The legacy editor markup is a table; without an explicit cell alignment
   the browser aligns the button to the text baseline, leaving it detached. */
table:has(> tbody > tr > td.editor-button) {
	border-collapse: collapse !important;
	border-spacing: 0 !important;
	line-height: 0 !important;
}

tr:has(> td.editor-button) > td {
	line-height: 0 !important;
	vertical-align: top !important;
}

tr:has(> td.editor-button) > td:first-child > input,
tr > td.editor-button > button.editor-button {
	display: block !important;
	vertical-align: top !important;
}

/* The selector is an inline ZK span.  Centre it within the ID column rather
   than relying on the text alignment of its parent cell. */
.z-listcell-content:has(> .z-listitem-checkable) {
	padding-left: 0 !important;
	padding-right: 0 !important;
	text-align: center !important;
}

.z-listcell-content > .z-listitem-checkable {
	display: inline-block !important;
	margin: 0 !important;
	vertical-align: middle !important;
}

/* ZK positions the selected radio icon relatively, which offsets the blue
   dot from the centre of its circular selector.  Anchor it to the selector
   instead, so its centre is always exactly at 50% / 50%. */
.z-listitem-checkable.z-listitem-radio > .z-listitem-icon.z-icon-radio {
	font-size: 0 !important;
	left: 50% !important;
	line-height: 0 !important;
	margin: 0 !important;
	position: absolute !important;
	top: 50% !important;
	transform: translate(-50%, -50%) !important;
}

.z-listitem-checkable.z-listitem-radio > .z-listitem-icon.z-icon-radio::before {
	content: none !important;
}

/* ============================================================================
   08. Checkbox
   ============================================================================ */

.z-checkbox,
.z-checkbox-content {
	color: #000 !important;
	font-family: "Segoe UI", Tahoma, Verdana, Arial, sans-serif !important;
	font-size: 12px !important;
	font-weight: normal !important;
	line-height: 16px !important;
}

.z-checkbox input[type="checkbox"] {
	height: 14px !important;
	margin: 0 4px 0 0 !important;
	vertical-align: middle !important;
	width: 14px !important;
}

.z-checkbox input[type="checkbox"]:focus,
.z-checkbox input[type="checkbox"]:active {
	box-shadow: none !important;
	outline: none !important;
}

input[type="checkbox"]::before,
input[type="checkbox"]::after,
input[type="checkbox"]:checked::before,
input[type="checkbox"]:checked::after,
.z-checkbox input[type="checkbox"]::before,
.z-checkbox input[type="checkbox"]::after,
.z-checkbox input[type="checkbox"]:checked::before,
.z-checkbox input[type="checkbox"]:checked::after {
	content: none !important;
	display: none !important;
}

.z-checkbox-content {
	display: inline-block !important;
	vertical-align: middle !important;
}

.z-checkbox input[type="checkbox"] + label,
.z-checkbox input[type="checkbox"]:checked + label,
.z-checkbox input[type="checkbox"]:focus + label {
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
}

/* ============================================================================
   09. Botones y toolbar
   ============================================================================ */

.z-toolbarbutton {
	padding: 2px;
}

/* Botones con texto utilizados por los Smart Browsers. */
.z-toolbar .action-button {
	align-items: center !important;
	box-sizing: border-box !important;
	display: inline-flex;
	height: 30px !important;
	justify-content: center !important;
	min-height: 30px !important;
	min-width: 48px !important;
	padding: 2px 10px !important;
	white-space: nowrap !important;
	width: auto !important;
}

.z-toolbar .action-button .z-button-content,
.z-toolbar .action-button .z-button-cnt {
	overflow: visible !important;
	white-space: nowrap !important;
}

/* Botón de búsqueda/Refresh de los Smart Browsers. */
button.action-button:has(img[src*="Refresh" i]) {
	align-items: center !important;
	box-sizing: border-box !important;
	display: inline-flex;
	height: 30px !important;
	justify-content: center !important;
	max-width: none !important;
	min-height: 30px !important;
	min-width: max-content !important;
	overflow: visible !important;
	padding: 2px 10px !important;
	white-space: nowrap !important;
	width: max-content !important;
}

button.action-button:has(img[src*="Refresh" i]) img {
	flex: 0 0 16px !important;
	height: 16px !important;
	margin-right: 6px !important;
	object-fit: contain !important;
	width: 16px !important;
}

button.action-button:has(img[src*="Refresh" i]) .z-button-content,
button.action-button:has(img[src*="Refresh" i]) .z-button-cnt {
	overflow: visible !important;
	text-overflow: clip !important;
	white-space: nowrap !important;
}

/* DocAction/Form buttons: the theme width belongs to the button, not to its icon. */
button.form-button img.z-button-image,
button.form-button > img.form-button.z-button-image,
img.form-button.z-button-image {
	display: inline-block !important;
	height: 16px !important;
	margin-right: 6px !important;
	max-height: 16px !important;
	max-width: 16px !important;
	min-height: 16px !important;
	min-width: 16px !important;
	object-fit: contain !important;
	vertical-align: middle !important;
	width: 16px !important;
}

/* ============================================================================

/* ============================================================================
   13. Field groups en ventanas Eureka
   ============================================================================ */

/* Field groups in AD windows: hide only the artificial spacer row from the ZK5 layout. */
.adtab-form-grid tr.adtab-fieldgroup-spacer {
	display: none !important;
}

.adtab-form-grid tr.adtab-fieldgroup td.z-group-inner {
	background: #ffffff !important;
	background-image: none !important;
	border-top: 1px solid #b8c1ca !important;
}

.adtab-form-grid tr.adtab-fieldgroup-toggle td,
.adtab-form-grid tr.adtab-fieldgroup-toggle td.z-row-inner {
	background: #ffffff !important;
	background-image: none !important;
	border-top: 1px solid #b8c1ca !important;
}

.adtab-form-grid tr.adtab-fieldgroup .z-group-content,
.adtab-form-grid tr.adtab-fieldgroup .z-group-cnt {
	color: #1f2f3d !important;
	cursor: pointer !important;
	font-weight: 700 !important;
}

.adtab-form-grid tr.adtab-fieldgroup-toggle .adtab-fieldgroup-title {
	align-items: center !important;
	color: #1f2f3d !important;
	cursor: pointer !important;
	display: flex !important;
	font-weight: 700 !important;
	gap: 7px !important;
	line-height: 18px !important;
}

.adtab-form-grid tr.adtab-fieldgroup-toggle .adtab-fieldgroup-caret {
	color: #0076c9 !important;
	display: inline-block !important;
	font-size: 20px !important;
	line-height: 10px !important;
	text-align: center !important;
	width: 10px !important;
}

.adtab-form-grid tr.adtab-fieldgroup-toggle .adtab-fieldgroup-text {
	font-weight: 700 !important;
}

.adtab-form-grid tr.adtab-fieldgroup .z-group-icon,
.adtab-form-grid tr.adtab-fieldgroup .z-group-img {
	background-image: url("../theme/default/images/zul/common/toggle.png") !important;
	background-repeat: no-repeat !important;
	display: inline-block !important;
	height: 8px !important;
	margin: 0 7px 0 2px !important;
	opacity: 1 !important;
	vertical-align: middle !important;
	width: 8px !important;
}

.adtab-form-grid tr.adtab-fieldgroup .z-group-img-open {
	background-position: 0 -8px !important;
}

.adtab-form-grid tr.adtab-fieldgroup .z-group-img-close {
	background-position: 0 0 !important;
}

/* ============================================================================

/* ============================================================================
   Entrega Manual - grid nativo clásico
   ============================================================================ */

.allocation-form-layout {
	height: 100% !important;
	min-height: 0 !important;
	width: 100% !important;
}

.allocation-parameter-grid,
.allocation-footer-grid,
.allocation-parameter-grid .z-grid-body,
.allocation-footer-grid .z-grid-body {
	height: auto !important;
	overflow: visible !important;
	width: 100% !important;
}

.allocation-parameter-grid .z-grid-body table,
.allocation-footer-grid .z-grid-body table {
	table-layout: auto !important;
	width: 100% !important;
}

.allocation-parameter-grid .z-row-inner,
.allocation-parameter-grid .z-row-content,
.allocation-footer-grid .z-row-inner,
.allocation-footer-grid .z-row-content {
	box-sizing: border-box !important;
	height: auto !important;
	min-height: 28px !important;
	overflow: visible !important;
	padding: 0 !important;
	vertical-align: middle !important;
}

.allocation-criteria {
	align-items: center !important;
	box-sizing: border-box !important;
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 8px 18px !important;
	padding: 6px 8px !important;
	width: 100% !important;
}

.allocation-footer-criteria {
	padding-bottom: 4px !important;
	padding-top: 4px !important;
}

.allocation-criteria-field {
	align-items: center !important;
	box-sizing: border-box !important;
	column-gap: 6px !important;
	display: grid !important;
	flex: 1 1 280px !important;
	grid-template-columns: max-content minmax(120px, 1fr) !important;
	max-width: 400px !important;
	min-width: 220px !important;
}

.allocation-difference-field {
	grid-template-columns: max-content max-content minmax(120px, 1fr) !important;
}

.allocation-criteria-checkbox {
	align-items: center !important;
	box-sizing: border-box !important;
	display: flex !important;
	flex: 0 1 220px !important;
	min-height: 26px !important;
	min-width: 180px !important;
}

.allocation-confirm-field {
	align-items: center !important;
	display: flex !important;
	flex: 0 0 auto !important;
	margin-left: auto !important;
	min-height: 28px !important;
}

.allocation-criteria-label,
.allocation-currency-label {
	line-height: 22px !important;
	white-space: nowrap !important;
}

.allocation-criteria-editor {
	box-sizing: border-box !important;
	min-width: 0 !important;
}

.allocation-criteria-editor.z-textbox,
.allocation-criteria-editor.z-bandbox,
.allocation-criteria-editor.z-combobox,
.allocation-criteria-editor .z-textbox,
.allocation-criteria-editor .z-bandbox,
.allocation-criteria-editor .z-combobox,
.allocation-criteria-editor .z-bandbox-input,
.allocation-criteria-editor .z-combobox-input {
	box-sizing: border-box !important;
	max-width: 400px !important;
	width: 100% !important;
}

.allocation-main-center,
.allocation-main-center .z-center-body,
.allocation-info-panel {
	box-sizing: border-box !important;
	height: 100% !important;
	min-height: 240px !important;
	overflow: hidden !important;
	width: 100% !important;
}

.allocation-detail-panel,
.allocation-detail-panel > .z-borderlayout {
	box-sizing: border-box !important;
	height: 100% !important;
	min-height: 120px !important;
	width: 100% !important;
}

.allocation-detail-panel .z-listbox {
	height: 100% !important;
	width: 100% !important;
}

@media (max-width: 720px) {
	.allocation-criteria {
		gap: 6px !important;
	}

	.allocation-criteria-field,
	.allocation-criteria-checkbox {
		flex-basis: 100% !important;
		max-width: 400px !important;
		min-width: 0 !important;
	}

	.allocation-confirm-field {
		margin-left: 0 !important;
	}
}

.inoutgen-native-grid,
.inoutgen-native-grid .z-grid-body {
	height: 100% !important;
	overflow: visible !important;
	width: 100% !important;
}

.inoutgen-native-grid .z-grid-body table {
	table-layout: auto !important;
	width: auto !important;
	min-width: 100% !important;
}

.inoutgen-native-grid .z-row-inner,
.inoutgen-native-grid .z-row-content {
	box-sizing: border-box !important;
	height: 26px !important;
	line-height: 22px !important;
	min-height: 26px !important;
	overflow: visible !important;
	padding-bottom: 1px !important;
	padding-top: 1px !important;
	vertical-align: middle !important;
	white-space: nowrap !important;
}

.inoutgen-native-grid .z-label {
	line-height: 22px !important;
	white-space: nowrap !important;
}

.inoutgen-native-grid .z-textbox,
.inoutgen-native-grid .z-combobox,
.inoutgen-native-grid .z-bandbox {
	vertical-align: middle !important;
}


/* ============================================================================
