/* Package "transactions": extra styles for transaction screens and masks (ui/tx/).
   Base look and reusable classes live in sap.css (owned by core). New classes use the prefix .tx- */

/* ---------- shared ---------- */
.tx-wp, .tx-per, .tx-sab, .tx-mask { min-width: 0; }
.tx-f4wrap { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; flex-wrap: wrap; }
.tx-f4wrap .sap-btn { padding: 1px 6px; }
.tx-rest { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-rest--late { color: var(--sap-err); font-weight: 700; }
.tx-lightbox { display: inline-block; min-width: 14px; }
.sap-select.is-error, .sap-input.is-error { border-color: var(--sap-err); background-color: #ffe4e0; box-shadow: 0 0 0 1px var(--sap-err); }
.tx-label-error { color: var(--sap-err); font-weight: 700; }
.tx-item-error { outline: 2px solid var(--sap-err); outline-offset: 2px; background: #ffe4e0; }
.tx-grid-error { outline: 2px solid var(--sap-err); outline-offset: -1px; }
.tx-row-off td { color: var(--sap-muted); }
.sap-alv tr.tx-owned td { color: var(--sap-ok); }

/* ---------- masks (dynpro) ---------- */
.tx-mask { border: 1px solid var(--sap-frame-dk); background: var(--sap-win); padding: 6px 8px 8px; box-shadow: 2px 2px 0 rgba(0, 0, 0, .12); }
.tx-mask__head { background: var(--sap-panel); border: 1px solid var(--sap-frame); padding: 6px 10px; margin: 0 0 8px; }
.tx-mask__body { margin: 0 0 8px; }
.tx-mask__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.tx-mask__hint { margin: 4px 0 0; }
.tx-mask__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.tx-mask__error { margin: 0 0 8px; padding: 4px 8px; background: #ffe4e0; border: 1px solid var(--sap-err); color: var(--sap-err); font-weight: 700; }
.tx-mask__error[hidden] { display: none; }
.tx-mask__warn { margin: 6px 0; padding: 4px 8px; background: #fff6cf; border: 1px solid var(--sap-warn); }
.tx-mask__warn[hidden] { display: none; }
.tx-choice { min-width: 0; }
.tx-choice__text { margin: 2px 0 4px; color: var(--sap-muted); font-style: italic; }
.tx-radios { display: flex; flex-wrap: wrap; gap: 0 12px; }
.tx-radios--col { flex-direction: column; }
.tx-radios .sap-check { margin-right: 0; }
.tx-checklist { display: flex; flex-direction: column; gap: 0; margin-top: 6px; }
.tx-checklist .sap-check { margin-right: 0; }
.tx-bigbtn-wrap { padding: 12px 0 6px; }
.tx-bigbtn { font-size: 18px; min-height: 56px; padding: 6px 40px; }
.tx-bigbtn .sap-btn__icon { font-size: 20px; }

/* ---------- workplace ---------- */
.tx-wp__head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; padding: 6px 10px; background: var(--sap-panel); border: 1px solid var(--sap-frame); }
.tx-wp__icon { font-size: 28px; line-height: 1; }
.tx-wp__role { font-size: 16px; font-weight: 700; color: var(--sap-title-a); }
.tx-wp__watch { margin-left: auto; padding: 2px 8px; background: #fff6cf; border: 1px solid var(--sap-warn); font-weight: 700; }
.tx-wp__watch[hidden] { display: none; }
.tx-wp__top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.tx-wp__staffbtn { margin-top: 6px; }
.tx-wp__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); grid-template-areas: 'docs mask' 'act mask' 'dbg mask'; grid-template-rows: auto auto 1fr; gap: 0 10px; align-items: start; }
.tx-area-docs { grid-area: docs; }
.tx-area-act { grid-area: act; }
.tx-area-dbg { grid-area: dbg; }
.tx-wp__mask { grid-area: mask; min-width: 0; }
.tx-wp__mask > .sap-subtitle { margin-top: 0; }
.tx-wp__queue { margin: 0; }
.tx-doctitle { overflow-wrap: anywhere; }
.tx-act { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px dotted var(--sap-frame); }
.tx-act:last-child { border-bottom: 0; }
.tx-act__main { flex: 1 1 200px; min-width: 0; }
.tx-act__text { font-size: 11px; }
.tx-act__side { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tx-act__status { color: var(--sap-muted); }
.tx-act__status.is-active { color: var(--sap-ok); font-weight: 700; }

/* ---------- ZPER01 / ZINV01 / ZIR1 / ZHV / ZSAB ---------- */
.tx-per__buttons { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.tx-per__result { margin: 8px 0 0; padding: 4px 8px; border: 1px solid var(--sap-frame); background: #fff; font-weight: 700; }
.tx-per__result[hidden] { display: none; }
.tx-per__result.is-ok { border-color: var(--sap-ok); color: var(--sap-ok); background: #eaf7ec; }
.tx-per__result.is-err { border-color: var(--sap-err); color: var(--sap-err); background: #ffe4e0; }
.tx-reason { white-space: normal; }
.tx-sab__tname { margin-left: 6px; font-weight: 700; }
.tx-sab__hint { margin: 0 0 6px; padding: 4px 8px; background: #fff6cf; border: 1px solid var(--sap-warn); }
.tx-sab__name { font-weight: 700; }
.tx-hv__detail { margin: 8px 0; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
	.tx-wp__top { grid-template-columns: 1fr; }
	.tx-wp__body { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'docs' 'mask' 'act' 'dbg'; }
	.tx-wp__watch { margin-left: 0; }
	.tx-act__side { width: 100%; }
	.tx-mask { padding: 4px; }
	.tx-wp .sap-alv td, .tx-per .sap-alv td, .tx-sab .sap-alv td, .tx-mask .sap-alv td { height: 36px; }
	.tx-bigbtn { width: 100%; justify-content: center; }
	.tx-f4wrap .sap-btn { min-width: 36px; justify-content: center; }
}
