/*
    ErrorWizard-only tab styling.
    Every rule is scoped under `.ew-tabs`, which is applied only on the four
    ErrorWizard correction pages. Nothing here affects tabs elsewhere in the app.
*/

/* ── Compact card tabs ───────────────────────────────────────────── */
.ew-tabs .ant-tabs-nav {
    margin-bottom: 8px !important;
}

.ew-tabs .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab,
.ew-tabs .ant-tabs-tab {
    padding: 5px 14px !important;
    font-size: 13px !important;
    line-height: 20px !important;
    margin-left: 2px !important;
    border-radius: 6px 6px 0 0 !important;
    background: #f5f7fa !important;
    border-color: #e6e8ec !important;
    transition: background .15s ease, color .15s ease;
}

.ew-tabs .ant-tabs-tab:first-child {
    margin-left: 0 !important;
}

.ew-tabs .ant-tabs-tab:hover {
    background: #eef1f6 !important;
}

.ew-tabs .ant-tabs-tab-active,
.ew-tabs .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active {
    background: #fff !important;
    border-bottom-color: #fff !important;
}

.ew-tabs .ant-tabs-tab-active .ant-tabs-tab-btn {
    color: #1890ff !important;
    font-weight: 600 !important;
}

/* ── Pull the extra content (pager chevrons) up next to the tabs ──── */
/* By default the tab-list wrapper grows and shoves the right-side extra
   content to the far edge; stop it growing so the chevrons hug the tabs. */
.ew-tabs .ant-tabs-nav-wrap {
    flex: 0 1 auto !important;
}

/* ── Compact tab pager (Duplicate page) ──────────────────────────── */
/* Both chevrons grouped together and vertically centred with the tabs. */
.ew-tabs .ant-tabs-extra-content {
    display: inline-flex;
    align-items: center;
}

.ew-tabs .ew-tab-pager {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.ew-tabs .ew-tab-pager .ant-btn {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.ew-tabs .ew-tab-pager .ant-btn .anticon {
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
}

/* ── Compact the built-in overflow scroll arrows / "more" button ──── */
.ew-tabs .ant-tabs-nav-operations {
    margin-left: 2px !important;
}

.ew-tabs .ant-tabs-nav-operations .ant-tabs-nav-more,
.ew-tabs .ant-tabs-nav-operations .ant-tabs-nav-operations-hidden {
    padding: 0 6px !important;
}

/* Highlight only the metadata value cells that require correction. */
.metadata-correction-table .dt-table tbody td:nth-child(2) {
    background-color: #fff9c4 !important;
    cursor: pointer;
}

.metadata-correction-table .dt-table tbody tr:hover td:nth-child(2) {
    background-color: #fff3a3 !important;
}

.metadata-correction-table .metadata-correction-value {
    color: #cf1322;
}
