/* Transaction entry uses the application page scroll and keeps navigation visible. */
.approval-inbox-card {
    min-height: 0;
    padding: 12px;
}

#myApprovalsGrid[data-grid-content-height] {
    height: auto !important;
    min-height: 0;
}

.transaction-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--muted);
}

.transaction-breadcrumb a {
    color: var(--primary, #087a50);
    text-decoration: none;
}

.transaction-entry-page {
    width: 100%;
    min-width: 0;
}

.transaction-entry-page .transaction-form {
    position: relative;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: none;
}

.transaction-entry-page .transaction-form > header {
    height: auto;
    min-height: 0;
    padding: 24px;
    border-bottom: 1px solid var(--line);
}

.transaction-entry-page .transaction-form > header :is(h1, h2, h3) {
    margin: 6px 0 0;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
}

.transaction-entry-page .transaction-back-button {
    align-self: flex-start;
    margin: 16px 24px 0;
}

.transaction-entry-page .transaction-form > form {
    overflow: visible;
    border-radius: 0 0 18px 18px;
}

.transaction-entry-page .transaction-form-scroll {
    display: block;
    width: 100%;
    max-width: none;
    padding: 20px 24px;
    overflow: visible;
}

.transaction-entry-page .form-stage {
    margin: 0 0 16px;
    padding: 18px;
}

.transaction-entry-page .annual-employee-stage {
    display: block;
    overflow: visible;
}

.transaction-entry-page .stage-title {
    display: flex;
    margin-bottom: 16px;
}

.transaction-entry-page .stage-title p {
    display: block;
}

.transaction-entry-page label:not(.check) {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.transaction-entry-page :is(input, select, textarea) {
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    font: inherit;
    color: inherit;
    background: var(--card, #fff);
}

.transaction-entry-page :is(input, select) {
    min-height: 44px;
}

.transaction-entry-page .transaction-control :is(input, textarea) {
    border: 0;
    background: transparent;
}

.transaction-entry-page .transaction-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 16px;
}

.transaction-entry-page .transaction-actions {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 24px;
    border-top: 1px solid var(--line);
}

.transaction-picker-page {
    display: grid;
    gap: 24px;
    padding: 24px;
}

.transaction-picker-page > a {
    justify-self: start;
}

.transaction-picker-page .transaction-document-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 18px;
}

.transaction-picker-page .transaction-document-picker a {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 110px;
    padding: 24px;
    text-decoration: none;
    white-space: normal;
}

.transaction-picker-page .transaction-document-picker .bi {
    font-size: 1.8rem;
    color: var(--primary, #087a50);
}

@media (max-width: 760px) {
    .transaction-entry-page .transaction-form > header,
    .transaction-entry-page .transaction-form-scroll {
        padding: 16px;
    }

    .transaction-entry-page .transaction-back-button {
        margin-inline: 16px;
    }

    .transaction-entry-page .transaction-actions {
        padding: 16px;
    }

    .transaction-entry-page .transaction-actions button {
        flex: 1 1 140px;
    }

    .transaction-entry-page .form-stage {
        padding: 12px;
    }

    .transaction-picker-page {
        padding: 16px;
    }
}

/* The full page has room to show the employee identity and section guidance. */
.transaction-entry-page .annual-leave-form .annual-employee-context:not(.hidden) {
    display: block !important;
}

.transaction-entry-page .annual-leave-form .annual-employee-context.hidden {
    display: none !important;
}

.transaction-entry-page .annual-leave-form .annual-employee-stage .stage-title {
    display: flex;
}

.transaction-entry-page .annual-leave-form .annual-employee-stage .stage-title p,
.transaction-entry-page .annual-leave-form .annual-calculation-stage > .stage-title p,
.transaction-entry-page .annual-leave-form .employee-summary-title :is(h3, p) {
    display: block;
}

.transaction-entry-page .annual-leave-form .annual-employee-context .salary-context-facts {
    display: flex;
    font-size: 0.85rem;
}

.transaction-entry-page .annual-leave-form .stage-title p,
.transaction-entry-page .annual-leave-form .transaction-inputs label > span {
    font-size: 0.85rem;
}

.transaction-entry-page .annual-leave-form .annual-leave-fields {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 16px;
}

/* Compact page heading and inline employee selection across transaction forms. */
.transaction-entry-page .transaction-form > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
}

.transaction-entry-page .transaction-form > header > div {
    min-width: 0;
}

.transaction-entry-page .transaction-form > header :is(h2, h3) {
    margin: 0;
}

.transaction-entry-page .transaction-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    align-self: center;
    margin: 0;
}

.transaction-entry-page .transaction-form-scroll {
    padding: 14px 20px;
}

.transaction-entry-page .form-stage {
    padding: 12px;
    margin-bottom: 12px;
}

.transaction-entry-page .stage-title {
    margin-bottom: 12px;
}

.transaction-entry-page label.transaction-inline-employee {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.transaction-entry-page .transaction-inline-employee > .field-validation {
    grid-column: 2;
}

.transaction-entry-page .transaction-inline-employee .searchable-select {
    min-width: 0;
    width: 100%;
}

.transaction-entry-page .textarea-control {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.transaction-entry-page .textarea-control textarea {
    display: block;
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
    min-height: 86px;
    height: auto;
    padding: 10px 12px;
    margin: 0;
    border: 0;
    outline: 0;
    box-shadow: none;
    border-radius: inherit;
    resize: vertical;
}

.transaction-entry-page .textarea-control textarea:focus {
    outline: 0;
    box-shadow: none;
}

@media (max-width: 600px) {
    .transaction-entry-page .transaction-form > header {
        padding: 12px;
        gap: 10px;
    }

    .transaction-entry-page .transaction-back-button {
        font-size: 0.7rem;
        padding: 9px;
    }

    .transaction-entry-page .transaction-form-scroll {
        padding: 12px;
    }
}

@media (min-width: 1280px) {
    .transaction-entry-page .annual-leave-form .annual-leave-fields {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

#pageHost .ag-cell.transaction-reference {
    font-size: 11px;
    font-weight: 500;
    direction: ltr;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
