/* Isolated Payments to Deposit / Make Deposit. Rollback: delete this file and revert index/app-shell links. */

/* Cap this window at the viewport. When criteria + list are taller, .im-ptd-scroll
   shows a screen scrollbar (OK/Cancel stay visible under the list). */
.im-ptd-modal-window.im-report-screen-modal,
.im-md-modal-window.im-report-screen-modal,
.im-mdl-modal-window.im-report-screen-modal {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.im-ptd-modal-window.im-report-screen-modal .modal-dialog,
.im-md-modal-window.im-report-screen-modal .modal-dialog,
.im-mdl-modal-window.im-report-screen-modal .modal-dialog {
    width: calc(100% - 16px);
    max-width: 1100px;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    margin: 8px auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.im-ptd-modal-window.im-report-screen-modal .modal-content,
.im-md-modal-window.im-report-screen-modal .modal-content,
.im-mdl-modal-window.im-report-screen-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    overflow: hidden;
}

.im-ptd-modal-window .modal-content > .im-report-screen,
.im-md-modal-window .modal-content > .im-report-screen,
.im-mdl-modal-window .modal-content > .im-report-screen {
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    overflow: hidden;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-body,
.im-md-modal-window .im-md-root .im-md-body,
.im-mdl-modal-window .im-mdl-root .im-mdl-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px 12px 16px;
    overflow: hidden;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-scroll,
.im-md-modal-window .im-md-root .im-ptd-scroll,
.im-mdl-modal-window .im-mdl-root .im-ptd-scroll {
    flex: 1 1 0%;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    /* Fallback if a parent flex height does not resolve: never taller than the screen
       minus the blue title bar and the OK/Cancel row. */
    max-height: calc(100vh - 9.5rem);
    max-height: calc(100dvh - 9.5rem);
}

.im-ptd-modal-window .im-report-header,
.im-md-modal-window .im-report-header,
.im-mdl-modal-window .im-report-header {
    flex-shrink: 0;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-toolbar,
.im-md-modal-window .im-md-root .im-ptd-toolbar,
.im-mdl-modal-window .im-mdl-root .im-ptd-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-toolbar .btn.button-width-change,
.im-md-modal-window .im-md-root .im-ptd-toolbar .btn.button-width-change,
.im-mdl-modal-window .im-mdl-root .im-ptd-toolbar .btn.button-width-change {
    width: auto;
    padding: 1px 15px !important;
    min-height: 44px;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-toolbar .btn.button-width-change i,
.im-md-modal-window .im-md-root .im-ptd-toolbar .btn.button-width-change i,
.im-mdl-modal-window .im-mdl-root .im-ptd-toolbar .btn.button-width-change i {
    margin-right: 4px;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-search-wrap,
.im-mdl-modal-window .im-mdl-root .im-ptd-search-wrap,
.im-md-modal-window .im-md-root .im-md-header-fields {
    width: 100%;
}

.im-md-modal-window .im-md-root .im-md-header-grid,
.im-mdl-modal-window .im-mdl-root .im-mdl-search-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}

.im-md-modal-window .im-md-root .im-md-header-grid .im-report-field {
    flex: none;
    max-width: none;
    min-width: 0;
}

.im-md-modal-window .im-md-root .im-md-deposit-to,
.im-md-modal-window .im-md-root .im-md-deposit-to select {
    min-width: 0;
    width: 100%;
}

.im-md-modal-window .im-md-root .im-md-balance-input {
    font-variant-numeric: tabular-nums;
    width: 100%;
}

.im-md-modal-window .im-md-root .im-md-date-field .im-report-date.input-group {
    width: 100%;
    min-width: 12.5em;
    max-width: none;
}

.im-md-modal-window .im-md-root .im-md-date-field .im-report-date .dateInput,
.im-md-modal-window .im-md-root .im-md-date-field .im-report-date .inputSelect {
    min-width: 8.75em;
    width: auto !important;
    flex: 1 1 8.75em;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-criteria-box {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-pair {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-narrow {
    max-width: 8em;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-money {
    max-width: 10em;
    font-variant-numeric: tabular-nums;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-row-dates .im-ptd-date .im-report-date.input-group {
    width: auto;
    min-width: 10.25em;
    max-width: 10.75em;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-row-dates .im-ptd-date .im-report-date .dateInput,
.im-ptd-modal-window .im-ptd-root .im-ptd-row-dates .im-ptd-date .im-report-date .inputSelect {
    min-width: 6.75em;
    max-width: 6.75em;
    width: 6.75em !important;
    flex: 0 0 6.75em;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-row-dates .im-ptd-pay {
    width: 100%;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-row-dates .im-ptd-pay select {
    width: 100%;
    max-width: 100%;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-total-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-total-sep {
    font-size: 16px;
    font-weight: 600;
    color: #001d6c;
    white-space: nowrap;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-search-btn,
.im-mdl-modal-window .im-mdl-root .im-ptd-search-btn {
    min-width: 150px;
    min-height: 44px;
    width: 100%;
    margin-left: 0;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-name-col {
    width: 28%;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-hint {
    margin: 12px 0 8px;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-table-wrap,
.im-md-modal-window .im-md-root .im-ptd-table-wrap,
.im-mdl-modal-window .im-mdl-root .im-ptd-table-wrap {
    width: 100%;
    max-height: none;
    overflow: visible;
    margin-top: 8px;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-table,
.im-md-modal-window .im-md-root .im-ptd-table,
.im-mdl-modal-window .im-mdl-root .im-ptd-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 14px;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-table th,
.im-ptd-modal-window .im-ptd-root .im-ptd-table td,
.im-md-modal-window .im-md-root .im-ptd-table th,
.im-md-modal-window .im-md-root .im-ptd-table td,
.im-mdl-modal-window .im-mdl-root .im-ptd-table th,
.im-mdl-modal-window .im-mdl-root .im-ptd-table td {
    padding: 3px 8px;
    line-height: 1.25;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-table th,
.im-md-modal-window .im-md-root .im-ptd-table th,
.im-mdl-modal-window .im-mdl-root .im-ptd-table th {
    position: static;
    color: #001d6c;
    font-weight: 600;
    background: #fff;
    padding-top: 5px;
    padding-bottom: 5px;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-check-col {
    width: 2em;
    text-align: center;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-check-col input {
    min-height: 16px;
    min-width: 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    vertical-align: middle;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-footer .btn,
.im-md-modal-window .im-md-root .im-ptd-footer .btn {
    min-height: 44px;
    min-width: 44px;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-num,
.im-md-modal-window .im-md-root .im-ptd-num,
.im-mdl-modal-window .im-mdl-root .im-ptd-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-method,
.im-md-modal-window .im-md-root .im-ptd-method {
    background: #ffe8cc;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-amount,
.im-md-modal-window .im-md-root .im-ptd-amount,
.im-mdl-modal-window .im-mdl-root .im-ptd-amount {
    background: #dbeafe;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-empty,
.im-md-modal-window .im-md-root .im-ptd-empty,
.im-mdl-modal-window .im-mdl-root .im-ptd-empty {
    text-align: center;
    color: #475569;
}

.im-ptd-modal-window .im-ptd-root .im-ptd-footer,
.im-md-modal-window .im-md-root .im-ptd-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
    flex-shrink: 0;
}

.im-md-modal-window .im-md-root .im-md-total-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-shrink: 0;
}

.im-md-modal-window .im-md-root .im-md-total-input {
    max-width: 10em;
}

.im-mdl-modal-window .im-mdl-root .im-mdl-row {
    cursor: pointer;
}

.im-mdl-modal-window .im-mdl-root .im-mdl-row:hover {
    background: #f1f5f9;
}

@media (min-width: 768px) {
    .im-ptd-modal-window .im-ptd-root .im-ptd-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-pair {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-pair .im-report-label {
        min-width: 6.5em;
        margin: 0;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-row-top {
        display: grid;
        grid-template-columns: minmax(6.5em, 0.7fr) minmax(8em, 1.25fr) minmax(8em, 1.25fr) minmax(6.5em, 0.7fr);
        align-items: end;
        gap: 10px 12px;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-row-top .im-ptd-pair {
        flex-direction: column;
        align-items: stretch;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-row-top .im-ptd-pair .im-report-label {
        min-width: 0;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-inv .im-ptd-narrow,
    .im-ptd-modal-window .im-ptd-root .im-ptd-cust .im-ptd-narrow {
        max-width: none;
        width: 100%;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-table tbody td,
    .im-md-modal-window .im-md-root .im-ptd-table tbody td,
    .im-mdl-modal-window .im-mdl-root .im-ptd-table tbody td {
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-row-dates {
        align-items: flex-end;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-row-dates .im-ptd-pair {
        flex-direction: column;
        align-items: stretch;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-row-dates .im-ptd-pair .im-report-label {
        min-width: 0;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-row-dates .im-ptd-date {
        flex: 0 0 auto;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-row-dates .im-ptd-pay {
        flex: 0 0 25em;
        width: 25em;
        max-width: 25em;
        min-width: 12em;
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-row-total {
        justify-content: space-between;
        align-items: center;
    }

    .im-md-modal-window .im-md-root .im-md-header-grid {
        grid-template-columns: minmax(18em, 1.6fr) minmax(11em, 1fr);
    }

    .im-md-modal-window .im-md-root .im-md-memo-field {
        grid-column: 1 / -1;
    }

    .im-mdl-modal-window .im-mdl-root .im-mdl-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .im-ptd-modal-window .im-ptd-root .im-ptd-search-btn,
    .im-mdl-modal-window .im-mdl-root .im-ptd-search-btn {
        width: auto;
        margin-left: auto;
    }
}

@media (min-width: 992px) {
    .im-ptd-modal-window.im-report-screen-modal .modal-dialog,
    .im-md-modal-window.im-report-screen-modal .modal-dialog,
    .im-mdl-modal-window.im-report-screen-modal .modal-dialog {
        max-width: 1180px;
    }

    .im-md-modal-window .im-md-root .im-md-header-grid {
        grid-template-columns: minmax(18em, 2.4fr) minmax(11em, 1fr) minmax(12.5em, 1.1fr) minmax(7em, 0.8fr);
    }

    .im-mdl-modal-window .im-mdl-root .im-mdl-search-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .im-md-modal-window .im-md-root .im-md-memo-field {
        grid-column: 1 / -1;
    }

    .im-md-modal-window .im-md-root .im-md-deposit-to {
        min-width: 18em;
    }
}
