/* Offer / Order CSS */

/*
 * CIO-AI-Driven:
 * Extracted from Offer/Order transaction edit template.
 * Scope all rules to the transaction edit wrapper to avoid global side effects.
 */

.offer-order-transaction-edit tbody,
.offer-order-transaction-edit td,
.offer-order-transaction-edit tfoot,
.offer-order-transaction-edit th,
.offer-order-transaction-edit thead,
.offer-order-transaction-edit tr {
    border: 0;
}

.offer-order-transaction-edit th {
    text-align: center;
}

.offer-order-transaction-edit th > small {
    display: flex;
    flex-direction: column;
    font-weight: 300;
    font-size: 0.7em;
}

.offer-order-transaction-edit table {
    border-color: #fff;
    border-collapse: separate;
}

.offer-order-transaction-edit .input-number {
    max-width: 90px;
    text-align: right;
    padding: 2px !important;
}

.offer-order-transaction-edit .number-format {
    text-align: right;
}

.offer-order-transaction-edit .number-format input {
    width: 97px;
}

.offer-order-transaction-edit .row td {
    padding: 5px;
    border: none;
}

.offer-order-transaction-edit .th-id {
    width: 10%;
    text-align: left;
}

.offer-order-transaction-edit .th-title {
    width: 50%;
    text-align: left;
}

.offer-order-transaction-edit .th-name {
    width: 15%;
}

.offer-order-transaction-edit .th-date {
    width: 15%;
    text-align: right;
}

.offer-order-transaction-edit .td-id {
    text-align: left;
    vertical-align: top;
}

.offer-order-transaction-edit .td-title {
    text-align: left;
    vertical-align: top;
}

.offer-order-transaction-edit .td-name {
    vertical-align: top;
}

.offer-order-transaction-edit .td-date {
    text-align: center;
}

.offer-order-transaction-edit .td-delete {
    text-align: right;
    vertical-align: top;
}

.offer-order-transaction-edit .move {
    display: flex;
    font-size: 20px;
    color: #3cdfff;
}

.offer-order-transaction-edit .new-transaction > tbody::before {
    content: '';
    display: block;
    height: 15px;
}

.offer-order-transaction-edit .editable {
    background-color: #f3f3fb;
    border: none;
    border-radius: 25px;
}

.offer-order-transaction-edit .edit-image {
    max-height: 300px;
    max-width: 300px;
}

.offer-order-transaction-edit #positions-app-sidebar {
    position: fixed;
    z-index: 10000;
    background-color: #2c3b41;
    right: 0;
    top: 0;
    height: 100vh;
    width: 350px;
    color: var(--sidebar-menu-color);
}

.offer-order-transaction-edit div.content-wrapper article#form-title-action-bar,
.offer-order-transaction-edit article#form-title-action-bar .content-header {
    background-color: var(--form-header-background);
}

/* Anchor offsets (sticky header) */
.offer-order-transaction-edit #areaSupplierOrder {
    scroll-margin-top: 90px;
}

.offer-order-transaction-edit td.clickable {
    cursor: pointer;
}

.offer-order-transaction-edit table.prices-table {
    table-layout: auto;
}

.offer-order-transaction-edit table.prices-table tr th {
    padding: 0 5px;
    width: 100px;
    max-width: 100px;
    box-sizing: border-box;
}

.offer-order-transaction-edit table.prices-table tr td {
    max-width: 100px;
    box-sizing: border-box;
}

.offer-order-transaction-edit table.prices-table input {
    border: 1px solid #767676;
    box-shadow: none;
    box-sizing: border-box;
    padding: 5px;
    border-radius: 5px;
}

.offer-order-transaction-edit table.prices-table input:disabled {
    background-color: #ecf0f5;
    box-shadow: none;
}

.offer-order-transaction-edit table.prices-table.prices-table-full tr td {
    max-width: 150px;
}

.offer-order-transaction-edit table.prices-table.prices-table-full input[type="text"],
.offer-order-transaction-edit table.prices-table.prices-table-full input[type="number"] {
    max-width: 100%;
    width: 100%;
}

.offer-order-transaction-edit .product-title-format {
    width: 100%;
    font-weight: 700;
    margin-bottom: 5px;
    padding: 2px;
    border: 1px solid #767676;
    border-radius: 5px;
    box-shadow: none;
}

.offer-order-transaction-edit .product-description-format {
    width: 100%;
    height: 60px;
    max-height: 200px;
    padding: 2px;
    border: 1px solid #767676;
    border-radius: 5px;
    box-shadow: none;
}

/* ---------------------------- */
/* TranslationFields custom CSS */
/* ---------------------------- */

.form-group .form-control.is-invalid,
.form-group .form-select.is-invalid,
.form-group textarea.is-invalid {
    border-color: var(--form-input-border-color) !important;
}

/* CIO-AI-Driven: Keep translation field errors readable without stealing input width */
.ciosix-translations-global-edit-translation-group .d-flex > .invalid-feedback {
    flex: 0 1 260px;
    max-width: 260px;
    white-space: normal;
    overflow-wrap: anywhere;
    margin: 0;
    padding: 0 0 0 15px;
}

.ciosix-translations-global-edit-translation-group .d-flex > .form-control,
.ciosix-translations-global-edit-translation-group .d-flex > .form-select,
.ciosix-translations-global-edit-translation-group .d-flex > textarea {
    flex: 1 1 auto;
    min-width: 0;
}
