/* ── WorkflowList — MUI component overrides ──────────────────────────────
   Tab layout (wfl-tab-layout, wfl-tab-sidebar, wfl-tab-content) is now
   handled entirely by WorkflowTabLayout.jsx via MUI Box + useTheme().
   This file only contains MUI-specific overrides for table, menu, dialog,
   pagination, and report components.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Page wrapper ── */
.wfl-page-wrap {
    padding: 0;
}

/* ── Header action buttons row ── */
.wfl-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 4px;
}

/* ── Cancel out common.css's negative margins on .tableSection ── */
.worflowSummaryTbl.tableSection,
.workflowreportTbl.tableSection {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 8px !important;
}

/* ── Source column: style <span> value chips the same as old PHP <font> chips ── */

/* Main condition value chips (direct span children of sourcsDatafield) */
.worflowSummaryTbl .sourceDtlbK:not(.skipCase) .sourcsDatafield > span {
    padding: 1px 5px;
    font-size: 12px;
    background: #68686857;
    margin-bottom: 2px;
    margin-right: 4px;
    border-radius: 4px;
    display: inline-block;
}
[data-theme="light"] .worflowSummaryTbl .sourceDtlbK:not(.skipCase) .sourcsDatafield > span {
    background: #c4c4c457;
}

/* Skip condition value chips */
.worflowSummaryTbl .sourceDtlbK.skipCase .sourcsDatafield > span:not(.sourcefieldTag) {
    padding: 1px 5px;
    font-size: 12px;
    background: #68686857;
    margin-bottom: 2px;
    margin-right: 4px;
    border-radius: 4px;
    display: inline-block;
}
[data-theme="light"] .worflowSummaryTbl .sourceDtlbK.skipCase .sourcsDatafield > span:not(.sourcefieldTag) {
    background: #c4c4c457;
}

/* Skip condition operator label (span inside sourcefieldTag) */
.worflowSummaryTbl .sourceDtlbK.skipCase .sourcefieldTag > span {
    color: #d98962;
    margin-left: 5px;
    font-size: 13px;
}

/* ── MUI TableCell headings: match root app table header style ──
   top: 0 !important overrides common.css's top: 45px (set for the old app's fixed navbar) ── */
.worflowSummaryTbl table thead tr th.MuiTableCell-root {
    background: var(--mui-palette-common-tableHeaderBg, #eef4fc);
    color: var(--mui-palette-common-tableHeaderColor, #212529);
    font-weight: 500;
    font-size: 14px;
    border-bottom: 1px solid var(--mui-palette-common-separatorBorder, #eee);
    padding: 8px 8px;
    font-family: inherit;
    top: 0 !important;
}

/* ── MUI TableCell body ── */
.worflowSummaryTbl table tbody tr td.MuiTableCell-root {
    border-bottom: solid 8px var(--mui-palette-common-contentPageBg, #F8FAFD);
    border-top: none;
    padding: 15px 8px;
    background: var(--mui-palette-common-cardBg, #fff);
    color: var(--mui-palette-text-primary);
    font-size: 14px;
    font-family: inherit;
    vertical-align: middle;
}

.worflowSummaryTbl table tbody tr:hover td.MuiTableCell-root {
    background: var(--mui-palette-common-contentPageBg, #F8FAFD);
}

.worflowSummaryTbl table tbody tr:last-child td.MuiTableCell-root {
    border-bottom: none;
}

/* ── MUI Menu paper (tbleDropMenu) ── */
.tbleDropMenu.MuiPaper-root {
    font-size: 13px !important;
    border-radius: 10px !important;
    box-shadow: 0px 0px 15px -3px #00000057 !important;
    background: var(--mui-palette-common-cardBg, #fff) !important;
    min-width: 160px;
}

.tbleDropMenu .MuiList-root {
    padding: 4px 0;
}

.tbleDropMenu .MuiMenuItem-root {
    font-size: 13px;
    font-family: inherit;
    padding: 6px 16px;
    color: var(--mui-palette-text-primary);
    min-height: unset;
}

.tbleDropMenu .MuiMenuItem-root:hover {
    background: var(--mui-palette-common-contentPageBg, #F0F9FF);
}

/* ── MUI Pagination ── */
.wfl-mui-pagination .MuiPagination-ul {
    flex-wrap: wrap;
    gap: 2px;
}

.wfl-mui-pagination .MuiPaginationItem-root {
    background: var(--mui-palette-common-grayBg, #eee);
    border: none;
    border-radius: 20px !important;
    color: var(--mui-palette-text-primary);
    font-size: 12px;
    font-family: inherit;
    min-width: 30px;
    height: 30px;
    margin: 0 2px;
}

.wfl-mui-pagination .MuiPaginationItem-root:hover {
    background: var(--mui-palette-common-customBg2, #eae5f9);
}

.wfl-mui-pagination .MuiPaginationItem-root.Mui-selected {
    background: var(--mui-palette-common-themeColor, #6260A4);
    color: #fff;
}

.wfl-mui-pagination .MuiPaginationItem-root.Mui-disabled {
    opacity: 0.5;
}

/* ── MUI Dialog: Search modal paper ── */
.wfl-dialog-paper {
    border-radius: 10px !important;
    background: var(--mui-palette-common-cardBg, #fff) !important;
    box-shadow: 0px 0px 11px #0000000f !important;
}

.wfl-dialog-title.MuiDialogTitle-root {
    background: var(--mui-palette-common-filterBarBg, #eef4fc);
    border-bottom: none;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    color: var(--mui-palette-common-titleColor, #222);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wfl-dialog-close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--mui-palette-common-blackMedium, rgba(0,0,0,.77));
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    opacity: 0.8;
}

.wfl-dialog-close:hover { opacity: 1; }

.wfl-dialog-body.MuiDialogContent-root {
    padding: 0 16px 8px;
}

.wfl-dialog-body .form-control {
    border-radius: 6px;
    border: none;
    background: var(--mui-palette-common-formElementBg, #f6f6f6);
    font-size: 14px;
    color: var(--mui-palette-text-secondary);
    width: 100%;
    padding: 6px 10px;
}

.wfl-dialog-body .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--mui-palette-common-themeColor, #5a7ce6)40;
}

.wfl-dialog-body .border-start {
    border-color: var(--mui-palette-common-separatorBorder, #eee) !important;
}

.wfl-dialog-body .col-form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--mui-palette-common-blackMedium, rgba(0,0,0,.77));
}

.wfl-dialog-footer.MuiDialogActions-root {
    padding: 10px 16px;
    border-top: solid 1px var(--mui-palette-common-separatorBorder, #eee);
    gap: 8px;
}

/* ── MUI Dialog: Confirm/delete modal ── */
.wfl-confirm-paper {
    border-radius: 10px !important;
    background: var(--mui-palette-common-cardBg, #fff) !important;
    box-shadow: 0px 0px 11px #0000000f !important;
}

.wfl-confirm-paper .MuiDialogContent-root {
    padding: 24px 20px 20px;
}

/* ── WorkflowReport table ── */
.workflowreportTbl table thead tr th.MuiTableCell-root {
    background: var(--mui-palette-common-tableHeaderBg, #eef4fc);
    color: var(--mui-palette-common-tableHeaderColor, #212529);
    font-weight: 500;
    font-size: 14px;
    border-bottom: 1px solid var(--mui-palette-common-separatorBorder, #eee);
    padding: 8px 8px;
    font-family: inherit;
    top: 0 !important;
}

.workflowreportTbl table tbody tr td.MuiTableCell-root {
    border-bottom: solid 8px var(--mui-palette-common-contentPageBg, #F8FAFD);
    border-top: none;
    padding: 12px 8px;
    background: var(--mui-palette-common-cardBg, #fff);
    color: var(--mui-palette-text-primary);
    font-size: 13px;
    font-family: inherit;
    vertical-align: middle;
}

.workflowreportTbl table tbody tr:hover td.MuiTableCell-root {
    background: var(--mui-palette-common-contentPageBg, #F8FAFD);
}

.workflowreportTbl table tbody tr:last-child td.MuiTableCell-root {
    border-bottom: none;
}

.workflowreportTbl .workflow_detail span {
    font-size: 13px;
    font-weight: 500;
    color: var(--mui-palette-text-primary);
    display: block;
}

.workflowreportTbl .workflowcreteTime {
    font-size: 12px;
    color: var(--mui-palette-text-secondary);
    margin-top: 2px;
}

.workflowreportTbl .workflowcreteTime font {
    display: inline-block;
    margin-right: 4px;
}

.workflowreportTbl .flow_detail font {
    font-size: 12px;
    color: var(--mui-palette-text-secondary);
    display: block;
}

.workflowreportTbl .flow_detail span {
    font-size: 13px;
    color: var(--mui-palette-text-primary);
    font-weight: 500;
    display: block;
}

.workflowreportTbl .currentNode .success { color: var(--mui-palette-success-main, #2e7d32); }
.workflowreportTbl .currentNode .failed  { color: var(--mui-palette-error-main, #d32f2f); }
.workflowreportTbl .currentNode .else    { color: var(--mui-palette-common-themeColor, #1565c0); }

.workflowreportTbl .currentNode font {
    font-size: 12px;
    color: var(--mui-palette-text-secondary);
}

.workflowreportTbl .particularDtl font {
    font-size: 12px;
    font-weight: 500;
    color: var(--mui-palette-text-primary);
}

.workflowreportTbl .particularDtl span {
    font-size: 12px;
    color: var(--mui-palette-text-secondary);
    display: block;
}

/* ── WorkflowReport pagination ── */
.wfl-report-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
}

/* ── WorkflowReport — individual detail modal table ── */
.workflowIndDtltbl table thead tr th.MuiTableCell-root {
    background: var(--mui-palette-common-tableHeaderBg, #eef4fc);
    color: var(--mui-palette-common-tableHeaderColor, #212529);
    font-weight: 500;
    font-size: 13px;
    border-bottom: 1px solid var(--mui-palette-common-separatorBorder, #eee);
    padding: 8px;
    font-family: inherit;
}

.workflowIndDtltbl table tbody tr td.MuiTableCell-root {
    padding: 10px 8px;
    background: var(--mui-palette-common-cardBg, #fff);
    color: var(--mui-palette-text-primary);
    font-size: 13px;
    font-family: inherit;
    vertical-align: middle;
    border-bottom: 1px solid var(--mui-palette-common-separatorBorder, #eee);
}

.workflowIndDtltbl .nodetype span {
    font-size: 11px;
    background: var(--mui-palette-common-chipBackground, #e1e1f9);
    padding: 2px 7px;
    border-radius: 4px;
    color: var(--mui-palette-text-primary);
    white-space: nowrap;
}

.workflowIndDtltbl .nodedtl font {
    font-size: 11px;
    color: var(--mui-palette-text-secondary);
    display: block;
}

.workflowIndDtltbl .nodedtl span {
    font-size: 13px;
    font-weight: 500;
    color: var(--mui-palette-text-primary);
}

.workflowIndDtltbl .dateField span {
    display: block;
    font-size: 12px;
    color: var(--mui-palette-text-secondary);
}

.workflowIndDtltbl .statusclmn .text_m_red {
    font-size: 11px;
    display: block;
    margin-top: 3px;
}

.workflowIndDtltbl .actionclmn font {
    font-size: 12px;
    color: var(--mui-palette-common-themeColor, #1565c0);
}

.workflowIndDtltbl .actionclmn span {
    font-size: 12px;
}
