/* Custom Table — Revenue Data Widget
   ------------------------------------------------------------------ */

.ct-revenue-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ct-revenue-table {
    width: 100%;
    min-width: 780px;
    border-collapse: separate;
    border-spacing: 2px;
    background-color: #ffffff;
    table-layout: fixed;
    font-family: inherit;
}

.ct-revenue-table th,
.ct-revenue-table td {
    padding: 14px;
    text-align: center;
    vertical-align: middle;
    word-break: break-word;
    box-sizing: border-box;
    line-height: 1.4;
}

.ct-title-row th {
    background: #3F7FE8;
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    padding: 18px 20px;
    letter-spacing: 0.2px;
}

.ct-label-cell {
    background: #D4E2F3;
    color: #2B3A4A;
    font-size: 16px;
    font-weight: 500;
}

.ct-sublabel-cell {
    background: #DCE8F5;
    color: #2B3A4A;
    font-size: 16px;
    font-weight: 500;
}

.ct-col-head {
    background: #E4EEF8;
    color: #2B3A4A;
    font-size: 15px;
    font-weight: 400;
}

.ct-val {
    background: #DCE8F5;
    color: #2B3A4A;
    font-size: 16px;
    font-weight: 500;
}

.ct-summary-row td {
    background: #DCE8F5;
    color: #2B3A4A;
    font-size: 17px;
    font-weight: 500;
}

.ct-summary-label   { font-weight: 600; }
.ct-summary-total   { font-weight: 600; }
.ct-summary-formula { font-weight: 400; }


/* ------------------------------------------------------------------
   Responsive — stack each section as its own card on mobile
   ------------------------------------------------------------------ */
@media (max-width: 767px) {

    .ct-revenue-wrap {
        overflow-x: visible;
    }

    .ct-revenue-table,
    .ct-revenue-table thead,
    .ct-revenue-table tbody,
    .ct-revenue-table tr,
    .ct-revenue-table th,
    .ct-revenue-table td {
        display: block;
        width: auto !important;
    }

    .ct-revenue-table {
        min-width: 0;
        border-spacing: 0;
        table-layout: auto;
    }

    .ct-revenue-table colgroup {
        display: none;
    }

    /* Title bar */
    .ct-title-row th {
        font-size: 17px;
        padding: 14px 16px;
        line-height: 1.35;
        text-align: center;
    }

    /* Section card header (label + sublabel) */
    .ct-header-row .ct-label-cell {
        font-size: 17px;
        font-weight: 600;
        padding: 14px 16px 2px;
        margin-top: 14px;
    }

    /* First section sits right under the title, no gap */
    .ct-revenue-table tbody > tr:first-child .ct-label-cell {
        margin-top: 0;
    }

    .ct-header-row .ct-sublabel-cell {
        font-size: 13px;
        padding: 2px 16px 12px;
        font-weight: 400;
        opacity: 0.72;
    }

    /* Column headers hidden on mobile — row label is shown via ::before instead */
    .ct-header-row .ct-col-head {
        display: none;
    }

    /* Value cells: inline "label  →  value" */
    .ct-value-row .ct-val {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 11px 18px;
        font-size: 15px;
        text-align: left;
        gap: 12px;
    }

    .ct-value-row .ct-val::before {
        content: attr(data-label);
        font-weight: 400;
        opacity: 0.72;
        flex: 1 1 auto;
    }

    /* Summary row — stacked as a distinct block */
    .ct-summary-row {
        margin-top: 16px;
    }

    .ct-summary-row .ct-summary-label {
        text-align: center;
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        padding: 12px 16px 6px;
        opacity: 0.72;
    }

    .ct-summary-row .ct-summary-formula {
        text-align: center;
        font-size: 14px;
        padding: 4px 16px 10px;
        opacity: 0.85;
    }

    .ct-summary-row .ct-summary-total {
        text-align: center;
        font-size: 22px;
        font-weight: 700;
        padding: 8px 16px 18px;
    }
}
