/* =========================================================
   CLOUDALIGN - LINE ITEMS / QUOTATION ITEMS
   Complete CSS matching the generated design
   ========================================================= */

:root {
    --li-bg: #f4f8fc;
    --li-surface: #ffffff;
    --li-surface-soft: #f8fbfe;

    --li-text: #10243a;
    --li-text-soft: #5a7088;
    --li-muted: #8191a3;

    --li-primary: #1769d2;
    --li-primary-2: #1fb5d3;
    --li-primary-soft: #eaf3ff;

    --li-success: #17a968;
    --li-success-soft: #eaf8f1;

    --li-danger: #ef4444;
    --li-danger-soft: #fff0f0;

    --li-border: #dbe5ef;
    --li-border-soft: #e8eef5;

    --li-shadow: 0 10px 28px rgba(14, 42, 64, 0.06);
    --li-shadow-hover: 0 14px 32px rgba(14, 42, 64, 0.09);

    --li-radius-sm: 9px;
    --li-radius-md: 12px;
    --li-radius-lg: 16px;
}

/* =========================================================
   WRAPPER / CARD
   ========================================================= */

.line-items-section {
    width: 100%;
    color: var(--li-text);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.line-items-card {
    width: 100%;
    overflow: hidden;

    border: 1px solid var(--li-border);
    border-radius: var(--li-radius-lg);

    background: rgba(255, 255, 255, 0.98);

    box-shadow: var(--li-shadow);
}

.line-items-card *,
.line-items-card *::before,
.line-items-card *::after {
    box-sizing: border-box;
}

/* =========================================================
   HEADER
   ========================================================= */

.line-items-header {
    min-height: 86px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 18px 24px;

    border-bottom: 1px solid var(--li-border);

    background:
        linear-gradient(
            90deg,
            rgba(31, 181, 211, 0.035),
            transparent 60%
        );
}

.line-items-header-left {
    display: flex;
    align-items: center;

    gap: 14px;
}

.line-items-header-icon {
    width: 54px;
    height: 54px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            #edf5ff,
            #e6f0ff
        );

    border: 1px solid #d8e7fb;

    color: var(--li-primary);

    font-size: 22px;
    font-weight: 800;
}

.line-items-title {
    margin: 0;

    color: var(--li-text);

    font-size: 23px;
    line-height: 1.2;

    font-weight: 800;

    letter-spacing: -0.3px;
}

.line-items-subtitle {
    margin: 4px 0 0;

    color: var(--li-text-soft);

    font-size: 14px;
    line-height: 1.45;
}

.line-items-header-actions {
    display: flex;
    align-items: center;

    gap: 12px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.li-btn {
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 0 15px;

    border: 1px solid var(--li-border);
    border-radius: 10px;

    background: #ffffff;
    color: var(--li-text);

    font-size: 13px;
    line-height: 1;
    font-weight: 700;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.li-btn:hover {
    transform: translateY(-1px);

    border-color: #bdd0e4;

    box-shadow:
        0 6px 16px rgba(14, 42, 64, 0.07);
}

.li-btn-primary {
    border-color: var(--li-primary);

    background: #ffffff;

    color: var(--li-primary);
}

.li-btn-primary:hover {
    background: var(--li-primary-soft);
}

.li-btn-save {
    min-width: 185px;

    border-color: var(--li-primary);

    background:
        linear-gradient(
            90deg,
            #1769d2,
            #1b78dc
        );

    color: #ffffff;

    box-shadow:
        0 8px 18px rgba(23, 105, 210, 0.18);
}

.li-btn-save:hover {
    background:
        linear-gradient(
            90deg,
            #125bbb,
            #1769d2
        );

    color: #ffffff;
}

.li-btn-cancel {
    min-width: 130px;

    background: #ffffff;

    color: #2b435c;
}

.li-btn-icon-only {
    width: 44px;
    min-width: 44px;

    padding: 0;

    font-size: 20px;
}

/* =========================================================
   TABLE WRAPPER
   ========================================================= */

.line-items-table-wrap {
    width: 100%;

    padding: 18px 20px 0;

    overflow-x: auto;

    scrollbar-width: thin;
    scrollbar-color: #c4cfdb transparent;
}

.line-items-table-wrap::-webkit-scrollbar {
    height: 8px;
}

.line-items-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.line-items-table-wrap::-webkit-scrollbar-thumb {
    border-radius: 999px;

    background: #c7d1dc;
}

/* =========================================================
   TABLE
   ========================================================= */

.line-items-table {
    width: 100%;

    min-width: 1220px;

    border-collapse: separate;
    border-spacing: 0;

    overflow: hidden;

    border: 1px solid var(--li-border);
    border-radius: 12px;

    background: #ffffff;
}

.line-items-table thead th {
    padding: 16px 14px;

    background: #f5f8fc;

    border-bottom: 1px solid var(--li-border);

    color: #2d4560;

    font-size: 11px;
    line-height: 1.2;

    font-weight: 800;

    text-align: left;
    text-transform: uppercase;

    letter-spacing: 0.35px;

    white-space: nowrap;
}

.line-items-table tbody tr {
    transition: background-color 0.18s ease;
}

.line-items-table tbody tr:hover {
    background: #fbfdff;
}

.line-items-table tbody td {
    padding: 15px 14px;

    border-right: 1px solid var(--li-border-soft);
    border-bottom: 1px solid var(--li-border);

    color: var(--li-text);

    font-size: 13px;
    line-height: 1.4;

    vertical-align: top;
}

.line-items-table tbody td:last-child,
.line-items-table thead th:last-child {
    border-right: 0;
}

.line-items-table tbody tr:last-child td {
    border-bottom: 0;
}

/* =========================================================
   COLUMN SIZING
   ========================================================= */

.li-col-number {
    width: 70px;
    text-align: center !important;
}

.li-col-description {
    width: 34%;
    min-width: 400px;
}

.li-col-money {
    width: 110px;
}

.li-col-margin {
    width: 120px;
}

.li-col-qty {
    width: 95px;
}

.li-col-vat {
    width: 110px;
}

.li-col-actions {
    width: 90px;
    text-align: center !important;
}

/* =========================================================
   ITEM NUMBER / DRAG HANDLE
   ========================================================= */

.line-item-number-wrap {
    min-height: 116px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 10px;
}

.line-item-number {
    color: var(--li-text);

    font-size: 14px;
    font-weight: 700;
}

.line-item-drag {
    color: #5f7892;

    font-size: 18px;

    letter-spacing: 1px;

    cursor: grab;
}

.line-item-drag:active {
    cursor: grabbing;
}

/* =========================================================
   DESCRIPTION CELL
   ========================================================= */

.line-item-description {
    display: flex;
    flex-direction: column;

    gap: 9px;
}

.line-item-name-input {
    width: 100%;
    min-height: 46px;

    padding: 0 12px;

    border: 1px solid #d6e1ec;
    border-radius: 9px;

    background: #ffffff;
    color: var(--li-text);

    font-size: 13px;
    font-weight: 600;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.line-item-name-input::placeholder {
    color: #93a0ae;
}

.line-item-name-input:focus {
    border-color: #6aa7e8;

    box-shadow:
        0 0 0 3px rgba(23, 105, 210, 0.09);
}

.line-item-short-description {
    color: var(--li-text-soft);

    font-size: 12px;
    line-height: 1.45;
}

.line-item-extra-actions {
    display: flex;
    align-items: center;

    gap: 10px;

    flex-wrap: wrap;
}

.line-item-extra-btn {
    min-height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 11px;

    border: 1px solid var(--li-border);
    border-radius: 8px;

    background: #ffffff;

    color: #35516d;

    font-size: 11px;
    font-weight: 700;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.line-item-extra-btn:hover {
    border-color: var(--li-primary);

    background: var(--li-primary-soft);

    color: var(--li-primary);
}

.line-item-extra-btn.image {
    color: #138b57;
}

.line-item-extra-btn.image:hover {
    border-color: #52b98a;

    background: #eefaf4;

    color: #08774a;
}

/* =========================================================
   INPUTS
   ========================================================= */

.li-input,
.li-select {
    width: 100%;
    min-height: 46px;

    padding: 0 11px;

    border: 1px solid #d9e3ed;
    border-radius: 9px;

    background: #ffffff;
    color: var(--li-text);

    font-size: 13px;
    font-weight: 700;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.li-input:focus,
.li-select:focus {
    border-color: #6aa7e8;

    box-shadow:
        0 0 0 3px rgba(23, 105, 210, 0.09);
}

.li-input-money {
    text-align: right;
}

.li-input-margin {
    text-align: center;
}

.li-input-qty {
    text-align: center;
}

.li-select {
    cursor: pointer;
}

/* =========================================================
   TOTAL CELL
   ========================================================= */

.line-item-total {
    min-height: 46px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    padding: 0 12px;

    border-radius: 9px;

    background: #eef4f9;

    color: #0c2137;

    font-size: 13px;
    font-weight: 800;

    text-align: right;
}

/* =========================================================
   DELETE ACTION
   ========================================================= */

.line-item-delete {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    margin: 4px auto 0;

    border: 0;
    border-radius: 9px;

    background: transparent;

    color: var(--li-danger);

    font-size: 18px;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.line-item-delete:hover {
    background: var(--li-danger-soft);

    transform: scale(1.04);
}

/* =========================================================
   ADD ANOTHER ITEM
   ========================================================= */

.line-items-add-row {
    padding: 10px 20px 0;
}

.line-items-add-another {
    width: 100%;
    min-height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    border: 1px dashed #cbd9e7;
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.72);

    color: var(--li-primary);

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.line-items-add-another:hover {
    border-color: var(--li-primary);

    background: var(--li-primary-soft);

    transform: translateY(-1px);
}

/* =========================================================
   FOOTER AREA
   ========================================================= */

.line-items-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    padding: 22px 20px 24px;
}

.line-items-summary {
    display: grid;

    grid-template-columns:
        minmax(210px, 1.1fr)
        minmax(170px, 1fr)
        minmax(170px, 1fr)
        minmax(190px, 1fr);

    min-width: 720px;

    border: 1px solid var(--li-border);
    border-radius: 11px;

    background: #ffffff;

    overflow: hidden;
}

.line-items-summary-cell {
    min-height: 92px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 14px 16px;

    border-right: 1px solid var(--li-border);

    background: #ffffff;
}

.line-items-summary-cell:last-child {
    border-right: 0;
}

.line-items-summary-cell.total {
    background:
        linear-gradient(
            145deg,
            #f0f6ff,
            #e8f2ff
        );
}

.line-items-summary-label {
    display: block;

    margin-bottom: 7px;

    color: var(--li-text-soft);

    font-size: 11px;
    font-weight: 700;
}

.line-items-summary-value {
    color: var(--li-text);

    font-size: 18px;
    line-height: 1.2;

    font-weight: 700;
}

.line-items-summary-cell.total .line-items-summary-value {
    color: var(--li-primary);

    font-size: 21px;
    font-weight: 800;
}

.line-items-default-vat {
    display: flex;
    align-items: center;

    gap: 12px;
}

.line-items-default-vat-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 11px;

    background: #edf4ff;

    color: var(--li-primary);

    font-size: 18px;
}

.line-items-default-vat-content {
    flex: 1;
    min-width: 0;
}

.line-items-default-vat-select {
    width: 100%;
    min-height: 40px;

    padding: 0 32px 0 10px;

    border: 1px solid var(--li-border);
    border-radius: 8px;

    background: #ffffff;

    color: var(--li-text);

    font-size: 13px;
    font-weight: 700;

    outline: none;
}

/* =========================================================
   FOOTER ACTIONS
   ========================================================= */

.line-items-footer-actions {
    display: flex;
    align-items: center;

    gap: 12px;

    flex-shrink: 0;
}

/* =========================================================
   IMAGE PREVIEW (OPTIONAL)
   ========================================================= */

.line-item-image-preview {
    display: none;

    position: relative;

    width: 74px;
    height: 74px;

    overflow: hidden;

    border: 1px solid var(--li-border);
    border-radius: 9px;

    background: #f7fafc;
}

.line-item-image-preview.show {
    display: block;
}

.line-item-image-preview img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

/* =========================================================
   LONG DESCRIPTION EXPANDED AREA
   ========================================================= */

.line-item-long-description {
    display: none;

    margin-top: 3px;
}

.line-item-long-description.show {
    display: block;
}

.line-item-long-description textarea {
    width: 100%;
    min-height: 88px;

    padding: 10px 12px;

    resize: vertical;

    border: 1px solid var(--li-border);
    border-radius: 9px;

    background: #fbfdff;

    color: var(--li-text);

    font-size: 12px;
    line-height: 1.5;

    outline: none;
}

.line-item-long-description textarea:focus {
    border-color: #6aa7e8;

    box-shadow:
        0 0 0 3px rgba(23, 105, 210, 0.08);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1250px) {
    .line-items-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .line-items-summary {
        width: 100%;
        min-width: 0;
    }

    .line-items-footer-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 900px) {
    .line-items-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .line-items-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .line-items-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .line-items-summary-cell:nth-child(2) {
        border-right: 0;
    }

    .line-items-summary-cell:nth-child(-n+2) {
        border-bottom: 1px solid var(--li-border);
    }
}

@media (max-width: 620px) {
    .line-items-header,
    .line-items-table-wrap,
    .line-items-add-row,
    .line-items-footer {
        padding-left: 12px;
        padding-right: 12px;
    }

    .line-items-title {
        font-size: 20px;
    }

    .line-items-header-actions {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .li-btn-primary {
        width: 100%;
    }

    .line-items-summary {
        grid-template-columns: 1fr;
    }

    .line-items-summary-cell {
        border-right: 0;
        border-bottom: 1px solid var(--li-border);
    }

    .line-items-summary-cell:last-child {
        border-bottom: 0;
    }

    .line-items-footer-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .li-btn-cancel,
    .li-btn-save {
        min-width: 0;
        width: 100%;
    }
}

/* =========================================================
   CLOUDALIGN MANAGEMENT SYSTEM ADAPTER
   Applies the line-item component to the existing Commercial
   document table used by Quotations, Invoices, Purchase Orders
   and Delivery Notes.
   ========================================================= */

.commercial-page .document-lines.line-items-section {
    display: block;
    gap: 0;
    margin-top: 34px;
}

.commercial-page .document-lines.line-items-section .line-items-card {
    overflow: hidden;
}

.commercial-page .document-lines.line-items-section .line-items-header {
    margin: 0;
    min-height: 62px;
    padding: 8px 20px;
    border-bottom: 1px solid var(--li-border);
}

.commercial-page .document-lines.line-items-section .line-items-header-icon {
    width: 44px;
    min-width: 44px;
    height: 44px;
}

.commercial-page .document-lines.line-items-section .line-items-header-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.commercial-page .document-lines.line-items-section #add-document-line {
    min-height: 36px;
    height: 36px;
    border-color: var(--li-primary);
    border-radius: 9px;
    background: #ffffff;
    color: var(--li-primary);
    font-size: 13px;
    font-weight: 700;
}

.commercial-page .document-lines.line-items-section #add-document-line:hover {
    background: var(--li-primary-soft);
    color: var(--li-primary);
}

.commercial-page .document-lines.line-items-section .line-items-table-wrap {
    overflow-x: hidden;
    border: 0;
    border-radius: 0;
    padding: 12px 20px 14px;
    background: transparent;
}

.commercial-page .document-lines.line-items-section .line-items-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.commercial-page .document-lines.line-items-section .line-items-table th {
    padding: 12px 10px;
    background: #f5f8fc;
    border-bottom: 1px solid var(--li-border);
    color: #2d4560;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    white-space: nowrap;
}

.commercial-page .document-lines.line-items-section .line-items-table td {
    padding: 8px 10px;
    border-right: 1px solid var(--li-border-soft);
    border-bottom: 1px solid var(--li-border);
    color: var(--li-text);
    font-size: 13px;
    line-height: 1.4;
    vertical-align: top;
}

.commercial-page .document-lines.line-items-section .line-items-table tbody tr:last-child td {
    border-bottom: 0;
}

.commercial-page .document-lines.line-items-section .line-items-table td.line-item-description {
    display: table-cell;
}

.commercial-page .document-lines.line-items-section .line-items-table th:first-child,
.commercial-page .document-lines.line-items-section .line-items-table td:first-child {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    text-align: center;
}

.commercial-page .document-lines.line-items-section .line-items-table th:first-child {
    white-space: normal;
}

.commercial-page .document-lines.line-items-section .line-items-table th:nth-child(2),
.commercial-page .document-lines.line-items-section .line-items-table td:nth-child(2) {
    width: auto;
    min-width: 0;
}

.commercial-page .document-lines.line-items-section .line-items-table th:nth-child(3),
.commercial-page .document-lines.line-items-section .line-items-table td:nth-child(3) {
    width: 64px;
}

.commercial-page .document-lines.line-items-section .line-items-table th:nth-child(4),
.commercial-page .document-lines.line-items-section .line-items-table td:nth-child(4) {
    width: 112px;
}

.commercial-page .document-lines.line-items-section .line-items-table th:nth-child(6),
.commercial-page .document-lines.line-items-section .line-items-table td:nth-child(6) {
    width: 118px;
}

.commercial-page .document-lines.line-items-section .line-items-table th:nth-child(7),
.commercial-page .document-lines.line-items-section .line-items-table td:nth-child(7) {
    width: 124px;
}

.commercial-page .document-lines.line-items-section .line-items-table th:nth-child(5),
.commercial-page .document-lines.line-items-section .line-items-table td:nth-child(5) {
    width: 80px;
}

.commercial-page .document-lines.line-items-section .line-items-table th:nth-child(8),
.commercial-page .document-lines.line-items-section .line-items-table td:nth-child(8) {
    width: 70px;
}

.commercial-page .document-lines.line-items-section .line-items-table th:nth-child(9),
.commercial-page .document-lines.line-items-section .line-items-table td:nth-child(9) {
    width: 86px;
    text-align: center;
}

.commercial-page .document-lines.line-items-section .line-items-table input,
.commercial-page .document-lines.line-items-section .line-items-table textarea,
.commercial-page .document-lines.line-items-section .line-items-table select {
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--li-text);
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
}

.commercial-page .document-lines.line-items-section .li-input,
.commercial-page .document-lines.line-items-section .li-select,
.commercial-page .document-lines.line-items-section .line-item-name-input {
    min-height: 34px;
    padding: 0;
}

.commercial-page .document-lines.line-items-section .li-input-money,
.commercial-page .document-lines.line-items-section .li-input-margin,
.commercial-page .document-lines.line-items-section .li-input-qty {
    text-align: right;
}

.commercial-page .document-lines.line-items-section .line-item-name-input {
    min-height: 34px;
    margin-bottom: 0;
    padding: 0;
}

.commercial-page .document-lines.line-items-section .line-item-description {
    gap: 5px;
}

.commercial-page .document-lines.line-items-section .line-item-description > * + * {
    margin-top: 6px;
}

.commercial-page .document-lines.line-items-section .line-image-controls {
    gap: 8px;
    margin-top: 0;
}

.commercial-page .document-lines.line-items-section .line-image-controls span {
    line-height: 1;
}

.commercial-page .document-lines.line-items-section .line-items-table input:focus,
.commercial-page .document-lines.line-items-section .line-items-table textarea:focus,
.commercial-page .document-lines.line-items-section .line-items-table select:focus {
    border-radius: 0;
    background: transparent;
    outline: 0;
}

.commercial-page .document-lines.line-items-section .line-vat-select {
    width: 100%;
    color: var(--li-text);
    font-weight: 700;
    text-align: right;
}

.commercial-page .document-lines.line-items-section .line-item-actions-cell {
    text-align: center;
    vertical-align: middle;
}

.commercial-page .document-lines.line-items-section .line-item-delete-row {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #ef3d3d;
    cursor: pointer;
}

.commercial-page .document-lines.line-items-section .line-item-delete-row:hover,
.commercial-page .document-lines.line-items-section .line-item-delete-row:focus-visible {
    background: #ffecec;
    outline: 0;
}

.commercial-page .document-lines.line-items-section .line-item-delete-row svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.commercial-page .document-lines.line-items-section .line-item-number {
    text-align: center;
}

.commercial-page .document-lines.line-items-section .line-item-extra-btn {
    width: fit-content;
    min-height: 24px;
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.commercial-page .document-lines.line-items-section .line-item-extra-btn input {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
}

.commercial-page .document-lines.line-items-section .image-icon-button {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
}

.commercial-page .document-lines.line-items-section .add-image-button {
    border: 0;
    background: var(--li-success);
    color: #ffffff;
}

.commercial-page .document-lines.line-items-section .remove-line-image {
    border: 0;
    background: transparent;
    color: var(--li-danger);
}

.commercial-page .document-lines.line-items-section .line-item-image-preview {
    margin-top: 8px;
}

.commercial-page .document-lines.line-items-section .line-image-preview {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
}

.commercial-page .document-lines.line-items-section .calculated-input {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.commercial-page .document-lines.line-items-section .line-item-total {
    min-height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.commercial-page .document-lines.line-items-section .line-item-total .calculated-input {
    width: 100%;
    min-height: 34px;
    padding: 0;
    text-align: right;
}

.commercial-page .document-lines.line-items-section .line-items-add-row {
    padding: 7px 20px;
    border-top: 1px solid var(--li-border);
    border-bottom: 1px dashed var(--li-border);
    background: #ffffff;
}

.commercial-page .document-lines.line-items-section .line-items-add-another {
    min-height: 22px;
    border: 0;
    background: transparent;
    color: var(--li-primary);
    font-size: 12px;
    font-weight: 800;
}

.commercial-page .document-lines.line-items-section .line-items-add-another::before {
    content: "+";
    display: inline-grid;
    width: 14px;
    height: 14px;
    margin-right: 5px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
}

.commercial-page .document-lines.line-items-section .line-items-footer {
    align-items: center;
    gap: 14px;
    padding: 12px 20px 10px;
    min-height: 64px;
    border-top: 0;
    background: #ffffff;
}

.commercial-page .document-lines.line-items-section .line-items-summary {
    width: min(820px, 100%);
    flex: 1 1 820px;
    min-width: 0;
    height: 48px;
    grid-auto-rows: minmax(0, auto);
    grid-template-columns: 1.25fr 1.1fr 1.1fr 1.3fr;
    grid-template-rows: auto;
    align-items: stretch;
    border: 0;
    border-radius: 8px;
}

.commercial-page .document-lines.line-items-section .line-items-summary-cell {
    min-height: 42px;
    height: 48px;
    max-height: 48px;
    padding: 6px 12px;
    justify-content: center;
    overflow: hidden;
}

.commercial-page .document-lines.line-items-section .line-items-summary-cell.line-items-default-vat {
    flex-direction: row;
}

.commercial-page .document-lines.line-items-section .line-items-summary-label {
    margin-bottom: 3px;
    font-size: 10px;
}

.commercial-page .document-lines.line-items-section .line-items-summary-value {
    font-size: 13px;
    white-space: nowrap;
}

.commercial-page .document-lines.line-items-section .line-items-summary-cell.total .line-items-summary-value {
    font-size: 15px;
}

.commercial-page .document-lines.line-items-section .line-items-default-vat-icon {
    width: 28px;
    height: 28px;
}

.commercial-page .document-lines.line-items-section .line-items-default-vat-content {
    display: grid;
    gap: 2px;
}

.commercial-page .document-lines.line-items-section .line-items-default-vat-select {
    min-height: 28px;
    height: 28px;
    padding-top: 0;
    padding-bottom: 0;
}

.commercial-page .document-lines.line-items-section .line-items-footer-actions {
    gap: 8px;
    margin-left: auto;
}

.commercial-page .document-lines.line-items-section .line-items-footer-actions .li-btn {
    min-height: 34px;
    height: 34px;
    max-height: 34px;
    flex: 0 0 180px;
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    padding: 0 18px;
}

.commercial-page .document-lines.line-items-section .line-items-footer-actions .li-btn-cancel,
.commercial-page .document-lines.line-items-section .line-items-footer-actions .li-btn-save {
    flex-basis: 180px;
    width: 180px;
    min-width: 180px;
    max-width: 180px;
}

.commercial-page .document-lines.line-items-section .line-items-footer-actions #cancel-document-form,
.commercial-page .document-lines.line-items-section .line-items-footer-actions button[type="submit"].li-btn-save {
    box-sizing: border-box;
    flex: 0 0 180px;
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    height: 34px;
    min-height: 34px;
    max-height: 34px;
    padding: 0 18px;
}

.commercial-page .document-lines.line-items-section.delivery-note-lines .line-items-summary {
    display: none;
}

.commercial-page .document-lines.line-items-section.delivery-note-lines .line-items-footer {
    justify-content: flex-end;
}

.commercial-page .document-lines.line-items-section.delivery-note-lines .priced-column {
    display: none;
}

@media (max-width: 1250px) {
    .commercial-page .document-lines.line-items-section .line-items-summary {
        width: 100%;
        flex: 0 1 auto;
    }
}

@media (max-width: 620px) {
    .commercial-page .document-lines.line-items-section .line-items-footer-actions .li-btn {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
}
