/* history-p1-layout-r2-20260914 */

/*
 * Keep the frequently used medication-selection area large.  Its upper edge
 * follows the bottom of the two history tables (327px + an 8px gap), and its
 * right edge follows the right edge of the compact history-drug pane.
 */
.history-work .treat-panel-2 {
    left: 522px;
    right: 10px;
    top: 335px;
    bottom: 10px;
    width: auto;
    min-width: 0;
}

/* The right work area ends above P1 instead of being covered by it. */
.history-work .history-remaining {
    top: 4px;
    bottom: auto;
    height: 323px;
}

/* Compact the less frequently used prescription-description blocks. */
.history-work .treat-panel-3 {
    width: 500px;
    height: 110px;
    padding: 20px 8px 3px;
}
.history-work .treat-panel-3-grid {
    grid-template-rows: 20px 20px 20px 1fr;
}
.history-work .treat-panel-3-grid input,
.history-work .treat-panel-3-grid select {
    height: 19px;
    padding-top: 0;
    padding-bottom: 0;
}
.history-work .treat-route-types {
    left: 288px;
    height: 20px;
    gap: 6px;
}
.history-work .treat-note {
    min-height: 22px;
}
.history-work .treat-direction {
    left: 288px;
    top: 24px;
    padding: 3px 5px;
    line-height: 15px;
}
.history-work .treat-panel-4 {
    top: 117px;
    width: 500px;
    height: 54px;
    padding: 20px 7px 5px;
}
.history-work .treat-panel-4 textarea {
    height: 28px;
}

/* Preserve the speech workflow in a compact block above P1. */
.history-work .speech-history-panel {
    top: 178px;
    bottom: 0;
    width: 500px;
    min-height: 0;
}
.history-work .speech-history-title {
    height: 27px;
    padding-top: 2px;
    padding-bottom: 2px;
}
.history-work .speech-copy-button {
    width: 128px;
    height: 22px;
}
.history-work .speech-editor-wrap {
    right: 139px;
    top: 31px;
    bottom: 5px;
}
.history-work .speech-controls {
    right: 5px;
    top: 31px;
    bottom: 5px;
    width: 128px;
    gap: 3px;
    padding-left: 5px;
}
.history-work .speech-control-button {
    min-height: 23px;
    height: 23px;
}
.history-work .speech-status {
    min-height: 21px;
    padding: 2px 4px;
    line-height: 15px;
}
.history-work .speech-help {
    font-size: 9px;
    line-height: 10px;
}

/* The far-right history list keeps its useful width but fits above P1. */
.history-work .treat-scroll-3 {
    left: 516px;
    right: 0;
    top: 0;
    bottom: 0;
    overflow-x: hidden;
    overflow-y: auto;
}
.history-work .treat-scroll-3-title {
    height: 22px;
    padding: 2px 6px;
    line-height: 17px;
}
.history-work .treat-history-table {
    width: 100%;
    min-width: 0;
}
.history-work .treat-history-table th {
    top: 22px;
    height: 20px;
    padding: 1px 2px;
    font-size: 11px;
    line-height: 15px;
}
.history-work .treat-history-table td {
    height: 35px;
    padding: 2px 3px;
    font-size: 11px;
    line-height: 15px;
    overflow-wrap: anywhere;
}
.history-work .treat-history-table col:nth-child(1) { width: 30%; }
.history-work .treat-history-table col:nth-child(2) { width: 42%; }
.history-work .treat-history-table col:nth-child(3),
.history-work .treat-history-table col:nth-child(4) { width: 14%; }
.history-work .treat-history-table button {
    width: 36px;
    height: 19px;
    padding: 0 2px;
    font-size: 10px;
}

/*
 * P1 is the button/search/list area at the lower left.  The selected-drug
 * ScrollPane to its right is reduced by about 15% in both directions and
 * anchored to the lower-right corner.  P1 expands to the new left edge.
 */
.history-work .treat-add {
    width: 180px;
}
.history-work .treat-search-side {
    width: 348px;
}
.history-work .treat-selected-wrap {
    left: 363px;
    right: 7px;
    top: 42px;
    bottom: 37px;
}

/* Both P1 tables use cells about 15% smaller. */
.history-work .treat-mini-wrap,
.history-work .treat-selected-wrap {
    overflow-x: hidden;
    overflow-y: auto;
}
.history-work .treat-mini-table th,
.history-work .treat-selected-table th {
    height: 20px;
    padding: 1px 2px;
    line-height: 15px;
}
.history-work .treat-mini-table td {
    height: 21px;
    padding: 1px 3px;
}
.history-work .treat-selected-table td {
    height: 26px;
    padding: 1px 2px;
}
.history-work .treat-selected-table input {
    height: 19px;
    padding: 0 2px;
}
.history-work .treat-selected-table .selected-drug-delete {
    width: 36px;
    height: 19px;
    padding: 0 2px;
}
