﻿/* ── TABS ── */
.load-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #E0D5E8;
    margin-bottom: 0;
}

.load-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    border-radius: 8px 8px 0 0;
}

    .load-tab:hover {
        color: #374151;
        background: #F9F5FF;
    }

    .load-tab.active.pending-tab {
        color: #1976D2;
        border-bottom-color: #1976D2;
        background: #eef5fb;
    }

    .load-tab.active.completed-tab {
        color: #057A55;
        border-bottom-color: #057A55;
        background: #E6F9F0;
    }

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
}

.pending-badge {
    background: #DBEAFE;
    color: #1D4ED8;
}

.completed-badge {
    background: #D1FAE5;
    color: #065F46;
}

.load-tab.active.all-tab {
    color: #374151;
    border-bottom-color: #6B7280;
    background: #F3F4F6;
}

.all-badge {
    background: #F3F4F6;
    color: #374151;
}

.load-tab.active.kyc-tab {
    color: #b45309;
    border-bottom-color: #b45309;
    background: #fffbeb;
}

.kyc-badge {
    background: #fef3c7;
    color: #b45309;
}

/* ── LARGE SCREEN: force correct table display + wrapping fixes ── */

.cam-table-card table {
    width: 100% !important;
    table-layout: auto !important;
}

.cam-table-card thead {
    display: table-header-group !important;
}

.cam-table-card tbody {
    display: table-row-group !important;
}

    .cam-table-card tbody tr {
        display: table-row !important;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .cam-table-card tbody td {
        display: table-cell !important;
        border: none !important;
        border-bottom: 1px solid #F3F4F6 !important;
        padding: 10px 12px !important;
        white-space: normal !important;
        word-break: break-word !important;
        vertical-align: top !important;
    }

        .cam-table-card tbody td::before {
            content: none !important;
            display: none !important;
        }

/* ── COLUMN MIN-WIDTHS ── */

.cam-table-card td:nth-child(1) {
    min-width: 110px;
}

.cam-table-card td:nth-child(2) {
    min-width: 90px;
}

.cam-table-card td:nth-child(3) {
    min-width: 160px;
}

.cam-table-card td:nth-child(4) {
    min-width: 160px;
}

.cam-table-card td:nth-child(5) {
    min-width: 90px;
}

.cam-table-card td:nth-child(6) {
    min-width: 60px;
}

.cam-table-card td:nth-child(7) {
    min-width: 100px;
}

/* ── BADGES ── */
.cam-table-card .rz-badge {
    white-space: normal !important;
    text-align: center !important;
    height: auto !important;
    line-height: 1.3 !important;
    padding: 3px 8px !important;
    font-size: 12px !important;
}

/* ── ACTION BUTTONS: wrap when tight ── */
.cam-table-card td:nth-child(7) .rz-stack {
    flex-wrap: wrap !important;
    gap: 4px !important;
}

/* ── ENVIRONMENT TYPE: wrap badge below label when tight ── */
.cam-table-card .rz-stack {
    flex-wrap: wrap !important;
}

/* ══════════════════════════════════════════════
   STEPPER — HORIZONTAL (default, below 1400px)
   ══════════════════════════════════════════════ */

.stepper-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.step-label {
    font-size: 10px;
    text-align: center;
    margin-top: 2px;
    color: #6B7280;
}

/* Horizontal connector line */
.step-line {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    flex-shrink: 0;
    /* push down to align with circle center (~11px = half circle height) */
    margin-bottom: 20px;
}

.line-done {
    background-color: #16a34a;
}

.line-grey {
    background-color: #D1D5DB;
}

/* Step circle colors */
.step-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-complete {
    background: #16a34a;
}

.step-active {
    background: #7c3aed;
}

.step-pending {
    background: #E5E7EB;
}

.step-label-complete {
    color: #16a34a;
    font-weight: 600;
}

.step-label-active {
    color: #7c3aed;
    font-weight: 600;
}

.step-label-pending {
    color: #9CA3AF;
}

/* ══════════════════════════════════════════════
   STEPPER — VERTICAL (1400px and above)
   ══════════════════════════════════════════════ */

@media (max-width: 1400px) {

    .stepper-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
    }

    /* Each step: circle + label side by side, with space for the line */
    .step {
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        position: relative !important;
        padding-bottom: 0 !important;
    }

    .step-label {
        font-size: 12px !important;
        margin-top: 0 !important;
        text-align: left !important;
    }

    /* Vertical connector line — indented to sit under circle center */
    .step-line {
        width: 2px !important;
        height: 14px !important;
        min-height: 14px !important;
        margin: 0 0 0 10px !important;
        border-radius: 2px !important;
        display: block !important;
        flex-shrink: 0 !important;
    }
    .line-done {
        background-color: #16a34a !important;
    }

    .line-grey {
        background-color: #D1D5DB !important;
    }
}

/* ── TABS: scroll on small screens ── */
@media (max-width: 768px) {
    .load-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .load-tab {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* ── MOBILE: card layout ── */
@media screen and (max-width: 768px) {

    .cam-table-card thead,
    .cam-table-card .rz-datatable-thead {
        display: none !important;
    }

    .cam-table-card tbody tr,
    .cam-table-card .rz-datatable-tbody tr {
        display: block !important;
        border: 1px solid #E5E7EB !important;
        border-radius: 12px !important;
        margin-bottom: 12px !important;
        padding: 10px 14px !important;
        background: #fff !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    }

    .cam-table-card tbody td,
    .cam-table-card .rz-datatable-tbody td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        padding: 7px 0 !important;
        border: none !important;
        border-bottom: 1px solid #F3F4F6 !important;
        gap: 12px !important;
        font-size: 13px !important;
    }

        .cam-table-card tbody td:last-child {
            border-bottom: none !important;
            padding-bottom: 0 !important;
        }

        .cam-table-card tbody td::before {
            display: block !important;
            font-weight: 600;
            color: #6B7280;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            flex-shrink: 0;
            min-width: 90px;
            padding-top: 2px;
        }

    .cam-table-card td:nth-child(1)::before {
        content: "Submitted" !important;
    }

    .cam-table-card td:nth-child(2)::before {
        content: "Signup Type" !important;
    }

    .cam-table-card td:nth-child(3)::before {
        content: "User" !important;
    }

    .cam-table-card td:nth-child(4)::before {
        content: "Progress" !important;
    }

    .cam-table-card td:nth-child(5)::before {
        content: "KYC Status" !important;
    }

    .cam-table-card td:nth-child(6)::before {
        content: "Documents" !important;
    }

    .cam-table-card td:nth-child(7)::before {
        content: "Action" !important;
    }

    /* Stepper on mobile: horizontal with wrap */
    .stepper-container {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        justify-content: flex-end !important;
    }

    .step-line {
        width: 14px !important;
        height: 2px !important;
        margin-bottom: 20px !important;
        margin-left: 0 !important;
    }

    .cam-table-card .rz-paginator {
        flex-wrap: wrap !important;
        justify-content: center !important;
        padding: 10px 6px !important;
    }
}
