/* DxWindow v26.1: .dxbl-window-body > * { flex:0 0 auto } keeps the wrapper at natural height, and with overflow:auto subpixel rounding triggers a false scrollbar. overflow:hidden avoids it -- content is bounded by DxFormLayout, with DxWindow Scrollable as backup. */
.emma-window-form-wrapper {
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    width: 1180px;
}

/* Tighten this window's body frame -- scoped via :has to this wrapper so the ~20 other .emma-window-body windows keep the DevExpress default. */
.dxbl-window-body:has(.emma-window-form-wrapper) {
    padding: 8px 10px !important;
}

/* Fill the wrapper edge-to-edge (default .spaced-form-wrapper is 98% wide, leaving a right-side gap); body padding above is the frame. */
.emma-window-form-wrapper .spaced-form-wrapper {
    width: 100%;
    padding: 0;
}

.emma-footer-wrapper .emma-action-button {
    min-width: 100px !important;
}

/* Footer reconciliation summary: a thin gradient card centred between the left actions and Save, tinted by VAT status (success/warning/error). */
.ce-footer-summary-mid {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
    padding: 0 12px;
}

.ce-footer-summary {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20), 0 1px 3px rgba(0, 0, 0, 0.12);
}

.ce-footer-summary--success {
    background: linear-gradient(135deg, var(--bs-success) 0%, rgba(var(--bs-success-rgb), 0.72) 100%);
}

.ce-footer-summary--danger {
    background: linear-gradient(135deg, var(--bs-danger) 0%, rgba(var(--bs-danger-rgb), 0.72) 100%);
}

/* Warning is a light amber -> use dark text for contrast. */
.ce-footer-summary--warning {
    background: linear-gradient(135deg, var(--bs-warning) 0%, rgba(var(--bs-warning-rgb), 0.72) 100%);
    color: #212529;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 3px rgba(0, 0, 0, 0.12);
}

.ce-footer-summary--neutral {
    background: linear-gradient(135deg, var(--bs-secondary) 0%, rgba(var(--bs-secondary-rgb), 0.72) 100%);
}

/* Stack the VAT status strip and the "rates as of clearance date" note on separate lines. */
.ce-footer-summary-mid {
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Emphasised chip shown only for a historical VAT regime -- same shape as the status strip, distinct info tint. */
.ce-vat-asof {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: rgba(var(--bs-info-rgb), 0.15);
    color: var(--bs-info-text-emphasis);
    border: 1px solid rgba(var(--bs-info-rgb), 0.35);
}

.ce-vat-asof i {
    font-size: 0.85rem;
}
