/* ========================================================= */
/* BAW-D FINANCIAL TABLES AND CHARTS                         */
/* Master CSS Design System & Display Logic                  */
/* ========================================================= */

:root {
    /* Brand Color Palette */
    --bawd-teal-ink: #083F4B;   /* Deep Teal - Headers & Top Level Sums */
    --bawd-teal-mist: #E6F4F6;  /* Light Teal - Subsections & Retained Earnings */
    --bawd-soft-teal: #7ABFBE;  /* Mid Teal - Secondary Sums */
    --bawd-ui-line: #2998A7;    /* Cool Teal Gray - Borders */
    --bawd-light-gray: #DEDEDE; /* Muted Rows - COGS, Non-Revenue */
    --bawd-off-white: #F8FAFB;  /* Backgrounds & Alternate Rows */
    --bawd-text-dark: #1C1C1C;  /* Primary Text */
    --bawd-border-subtle: #0D6E82; /* Deep accents */
}

/* ========================================================= */
/* 1. GLOBAL FOUNDATION & RESET                              */
/* ========================================================= */

.view-bi-charts table, 
.liabilities-summary-table,
.startup-table-block table,
.hist-fin-table-block table,
.milestones-table-block table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 0;
    background-color: #FFFFFF;
    color: var(--bawd-text-dark);
}

/* Month Headers (th) AND Unified Description Header Cell */
.view-bi-charts th[class*="bawd-table-time-"],
.view-bi-charts th.bawd-table-description,
.view-bi-charts .cash-flow-table-block thead th,
.bawd-table-balance td.bawd-table-description,
.dbs-current-startup-assets-table td.bawd-table-description,
.startup-table-block th,
.hist-fin-table-block th,
.milestones-table-block th,
.pl-table-embed-fixed-expenses tfoot td.bawd-table-description,
.net-revenue-table-batblock tfoot td.bawd-table-description {
    background-color: var(--bawd-teal-ink);
    color: #FFFFFF !important; /* Forced white text */
    font-size: 10px;
    white-space: nowrap;
    text-align: center;
    padding: 8px 4px;
    border: 1px solid var(--bawd-ui-line);
}

/* Ensure thead cells specifically get the white text */
.startup-table-block thead th,
.hist-fin-table-block thead th,
.milestones-table-block thead th {
    color: #FFFFFF !important; 
}

.bawd-table-balance td.bawd-table-description,
.dbs-current-startup-assets-table td.bawd-table-description {
    text-align: left;
    padding-left: 10px;
}
.view-bi-charts th.bawd-table-description {
    text-align: left;
}

/* Data Cells (td) */
.view-bi-charts td[class*="bawd-table-time-"],
.liabilities-summary-table td:not(:first-child),
.startup-table-block td:not(:first-child),
.hist-fin-table-block td:not(:first-child),
.milestones-table-block td:not(:first-child) {
    display: table-cell;
    font-size: 8px;
    width: 5%;
    min-width: 40px;
    text-align: center;
    border: 1px solid var(--bawd-border-subtle);
    padding: 6px 4px;
    background-color: var(--bawd-off-white);
}

/* Description Column (Gray Spine) */
.view-bi-charts .bawd-table-description, 
.view-bi-charts .views-field-field-bi-table-item-description, 
.liabilities-summary-table td:first-child,
.bawd-summer-footer-table .pl-summary-table tfoot td.bawd-table-description,
.startup-table-block td:first-child,
.hist-fin-table-block td:first-child,
.milestones-table-block td:first-child {
    display: table-cell;
    width: 181px;
    box-sizing: border-box;
    text-align: left;
    font-size: 9px;
    font-weight: 600;
    padding: 8px 10px;
    background-color: var(--bawd-off-white);
    border: 1px solid var(--bawd-ui-line);
    color: var(--bawd-text-dark);
    line-height: 1.4;
}
.pl-table-embed-fixed-expenses tfoot td.bawd-table-description,
.net-revenue-table-batblock tfoot td.bawd-table-description {
    text-align: left;
}

/* ========================================================= */
/* 2. CBLOCK LAYOUT & NESTING OPTIMIZATION                   */
/* ========================================================= */

.bawd-cblock-type-table table,
.liabilities-summary-table,
.bawd-summary-footer-table table {
    width: 100%;
    table-layout: fixed;
}

.bawd-cash-flow-table-line-items .views-field,
.liabilities-summary-table tr,
.startup-table-block tr,
.hist-fin-table-block tr,
.milestones-table-block tr {
    margin-bottom: -1px;
    padding: 0;
}

.cash-flow-table-block .views-field-nothing-1 .bawd-table-description {
    background-color: var(--bawd-teal-ink);
    color: #FFFFFF;
}

/* Inserted Views & Margins */
.adminimal .inserted-view.fc-view,
.adminimal .inserted-view.nrt-view,
.adminimal .cbsa-view, 
.adminimal .ch-loan-balance-view, 
.adminimal .tltl-view, 
.adminimal .op-costs-view, 
.adminimal .eicb-view .equity-bal-invest-cap-sblock,
.adminimal .summary-proforma-sheet-masblock h1,
.adminimal .summary-proforma-sheet-masblock .dbs-startup-assets-lt-table,
.adminimal .summary-proforma-sheet-masblock .dbs-lt-bs-liabilities-table {
    margin-top: -19px;
}
.adminimal .summary-proforma-sheet-masblock .grt-view { margin-bottom: -39px; }
.adminimal .summary-proforma-sheet-masblock .satu-view { margin-bottom: -24px; }
.adminimal .summary-proforma-sheet-masblock .total-assets-summary { margin-top: 14px; }


/* ========================================================= */
/* 3. CONDITIONAL HIDING (GROWTH RATES & NULL SETS)          */
/* ========================================================= */

.paragraph-type--bita-cost-line .field--name-field-tt-use-rev-growth-rate,
.paragraph-type--bita-personnel-table-row .field--name-field-tt-use-rev-growth-rate,
.paragraph-type--bita-revenue-line .field--name-field-tt-use-cost-growth-rate,
.paragraph-type--bita-bs-assets .field--name-field-tt-use-rev-growth-rate,
.paragraph-type--bita-bs-assets .field--name-field-tt-use-cost-growth-rate,
.paragraph-type--bita-bs-equity .field--name-field-tt-use-rev-growth-rate,
.paragraph-type--bita-bs-equity .field--name-field-tt-use-cost-growth-rate,
.paragraph-type--bita-bs-liabilities .field--name-field-tt-use-rev-growth-rate,
.paragraph-type--bita-bs-liabilities .field--name-field-tt-use-cost-growth-rate,
.paragraph-type--bita-p-l-adjustments .field--name-field-tt-use-rev-growth-rate,
.paragraph-type--bita-p-l-adjustments .field--name-field-tt-use-cost-growth-rate,
.darkness-stuff {
    display: none;
}

/* General View Header/Footer Hiding */
.csa-view tfoot, 
.cbsa-view thead, 
.cbsa-view tfoot, 
.ch-loan-balance-view tr#no-int-principal-balance-row, 
.ch-loan-balance-view tr#debt-principal-balance-row, 
.ch-loan-balance-view thead,
.tlie-view tr#debt-principal-paid-row, 
.tlie-view tr#no-int-principal-paid-row,
.tltl-view thead, 
.op-costs-view thead,
.eicb-view .bs-equity-adj-invested-capital-sblock tfoot,
.detailed-proforma-sheet-masblock .cogs-view thead,
.detailed-proforma-sheet-masblock .grt-view thead {
    display: none !important;
}

/* ========================================================= */
/* 4. SUMMARY PROFORMA EXCLUSIVE HIDING                      */
/* ========================================================= */

.summary-proforma-sheet-masblock .funding-capitalization-summary,
.summary-proforma-sheet-masblock tr.bawd-table-gross-cashflow-balance-line,
.summary-proforma-sheet-masblock tr.bawd-net-periodic-sum,
.summary-proforma-sheet-masblock .op-costs-view,
.summary-proforma-sheet-masblock .ch-loan-balance-view,
.summary-proforma-sheet-masblock .dbs-ch-taxes-loans-int-table,
.summary-proforma-sheet-masblock .csa-view,
.summary-proforma-sheet-masblock .cbsa-view,
.summary-proforma-sheet-masblock .satu-view thead,
.summary-proforma-sheet-masblock .satu-view tbody,
.summary-proforma-sheet-masblock .plada-view thead, 
.summary-proforma-sheet-masblock .plada-view tbody,
.summary-proforma-sheet-masblock .tlie-view .loan-balance-summary,
.summary-proforma-sheet-masblock .tltl-view,
.summary-proforma-sheet-masblock .eicb-view tbody,
.summary-proforma-sheet-masblock .bawd-table-periodic-retained-earnings,
.summary-proforma-sheet-masblock .edrs-view,
.summary-proforma-sheet-masblock .satu-view tr,
.summary-proforma-sheet-masblock .plada-view tr,
.summary-proforma-sheet-masblock tr.bawd-table-tax-burden,
.summary-proforma-sheet-masblock tr.bawd-table-net-periodic-tli,
.summary-proforma-sheet-masblock .bsalt-view tbody, 
.summary-proforma-sheet-masblock .bsalt-view tfoot,
.summary-proforma-sheet-masblock .fc-view thead,
.summary-proforma-sheet-masblock .grt-view tfoot,
.summary-proforma-sheet-masblock .dbs-startup-assets-lt-table,
.bs-longterm-liabilities-sblock thead,
.gross-margin-table-batblock tfoot,
.net-revenue-table-chart .view-content,
.profit-loss-chart-block .view-content,
.profit-loss-chart-block .profit-loss-expenses-summary,
.cash-flow-chart-block .view-content,
.cash-flow-chart-block .net-cash-flow-summary,
.growth-highlights-chart .view-content,
.growth-highlights-chart .growth-highlights-summary,
.expenses-block .view-content,
.expenses-block .expenses-summary-footer,
.cash-position-summary-chart .bawd-profit-loss-line-items,
.chart-break-even-analysis-block .view-content,
.chart-minimum-wage-analysis-block .view-content,
.cash-position-summary-chart .cash-position-summary-wrapper {
    display: none;
}

/* ========================================================= */
/* 5. ROW HIGHLIGHTING & COLORS                              */
/* ========================================================= */

.startup-longterm-assets-sblock tfoot, 
.startup-longterm-assets-sblock tfoot td.views-field-field-bi-table-item-description,
.bawd-block-table tfoot tr td.bawd-table-description,
tr.bawd-table-gross-cashflow-balance-line td.bawd-table-description {
    background: var(--bawd-teal-ink);
    color: #fff;
    font-weight: 800;
}

tr.bawd-summing-row,
.bawd-block-table tfoot,
tr.bawd-table-gross-cashflow-balance-line,
.dbs-current-startup-assets-table td,
.dbs-ch-taxes-loans-int-table tr.bawd-table-periodic-loans-interest {
    background: var(--bawd-teal-mist);
    border-top: 2px solid var(--bawd-border-subtle);
    border-bottom: 2px solid var(--bawd-border-subtle);
}
.dbs-cash-on-hand-table .bawd-table-gross-cashflow-balance-line {
    border-top: 1px;
    border-bottom: 1px;
}

/* Custom Background Identifiers */
.summary-proforma-sheet-masblock .bawd-proforma-line-sum-balance td[class*="bawd-table-time-"], 
.detailed-proforma-sheet-masblock .bawd-proforma-line-sum-balance td[class*="bawd-table-time-"] {
    background-color: var(--bawd-off-white);
}

tr.bawd-table-gross-cashflow-balance-line.bawd-proforma-line-sum td[class*="bawd-table-time-"],
tr.bawd-net-periodic-sum.bawd-proforma-line-sum td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .dbs-current-startup-assets-table tr.bawd-proforma-line-sum-balance td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .satu-view tfoot td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .bsalt-view tfoot td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .dbs-pl-adjustments-table tfoot td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock tr#debt-principal-balance-row td ,
.detailed-proforma-sheet-masblock tr#no-int-principal-balance-row td,
.detailed-proforma-sheet-masblock tr#interest-paid-debt-row td,
.detailed-proforma-sheet-masblock .detailed-proforma-sheet-masblock .edrs-view tfoot td[class*="bawd-table-time-"],
tr.bawd-table-balance.bawd-proforma-subsection-sum-balance td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .edrs-view tfoot td[class*="bawd-table-time-"], 
.detailed-proforma-sheet-masblock .tltl-view tfoot td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .dbs-current-bs-liabilities-table tfoot td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock tr.bawd-periodic-retained-earnings td[class*="bawd-table-time-"] {
    background-color: var(--bawd-teal-mist) !important;
}

.summary-proforma-sheet-masblock .bawd-proforma-subsection-balance-sum td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .bawd-proforma-subsection-balance-sum td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock tr.bawd-proforma-line-sum-balance td[class*="bawd-table-time-"] {
    background-color: var(--bawd-soft-teal);
}

.summary-proforma-sheet-masblock .bawd-proforma-topsection-balance-sum td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .bawd-proforma-topsection-balance-sum td[class*="bawd-table-time-"] {
    background-color: var(--bawd-teal-ink);
    color: var(--bawd-off-white);
}

.detailed-proforma-sheet-masblock .nrt-view tfoot td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .cogs-view tfoot td[class*="bawd-table-time-"],
.dbs-ch-taxes-loans-int-table .cogs-view tfoot td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .grt-view tfoot td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .total-funding-section tfoot td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .op-costs-view tfoot td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock .dbs-ch-taxes-loans-int-table tfoot td[class*="bawd-table-time-"],
.detailed-proforma-sheet-masblock tr.bawd-net-periodic-sum.bawd-proforma-line-sum td[class*="bawd-table-time-"] {
    background-color: var(--bawd-light-gray) !important;
}


/* ========================================================= */
/* 6. MOBILE RESPONSIVENESS (SCROLL/SWIPE)                   */
/* ========================================================= */

/*
.detailed-proforma-sheet-masblock,
.summary-proforma-sheet-masblock,
.startup-table-block,
.hist-fin-table-block,
.milestones-table-block {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
*/
/* REMOVED: .hist-fin-table-block table, .milestones-table-block table */
.bawd-all-charts-tables table,
.funding-capitalization-sblock table,
.loan-balance-sblock table,
.equity-bal-invest-cap-sblock table {
    width: 1200px;
    /* min-width: 100%; *** DON'T add this shit again */
}

/* Hide the warning box instantly on load to prevent the flash */
.view-bi-charts .messages--warning,
.view-bi-charts .messages {
    display: none;
}


/* ========================================================= */
/* 7. SPECIFIC 2-COLUMN TABLE OVERRIDES                      */
/* ========================================================= */

/* Override the 5% width restriction for the right-side columns */
.startup-table-block td:not(:first-child),
.hist-fin-table-block td:not(:first-child),
.milestones-table-block td:not(:first-child) {
    width: auto !important; 
    font-size: 10px; /* Slight bump for readability since it's not a dense timeline */
}

/* Startup Table */
.startup-table-block table {
    width: 500px !important;
    min-width: 500px !important;
}
.startup-table-block .srt-bawd-table-static-category,
.startup-table-block td:first-child {
    width: 250px !important;
    min-width: 250px !important;
}

/* Historical Financials Table */
.hist-fin-table-block table {
    width: 500px !important;
    min-width: 500px !important;
}
.hist-fin-table-block td:first-child {
    width: 250px !important;
    min-width: 250px !important;
}

/* Milestones Table */
.milestones-table-block table {
    width: 750px !important;
    min-width: 750px !important;
}
.milestones-table-block .mis-bawd-table-static-description,
.milestones-table-block td:first-child {
    width: 500px !important;
    min-width: 500px !important;
}

/* 1. Hide the detailed headers and body rows */
.profit-loss-table-block .view-content thead, 
.profit-loss-table-block .view-content tbody, 
.cash-flow-table-block .view-content thead, 
.cash-flow-table-block .view-content tbody {
    display: none !important;
}

/* 2. Remove the gaps so the remaining footers snap together flush */
.profit-loss-table-block .view-content table,
.cash-flow-table-block .view-content table {
    margin-bottom: 0 !important;
    border-collapse: collapse !important;
}

/* =========================================================
   BAW-D TABLES / CHARTS RESPONSIVE SCROLL WRAPPER
   Scope: .bawd-all-charts-tables
   Purpose:
   - < 1280px: allow scrolling on both X and Y axes
   - >= 1280px: turn scrolling behavior off
   ========================================================= */

/* Small / medium screens */
@media (max-width: 1279px) {

  .bawd-all-charts-tables {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    position: relative;
  }

  /* Keep inner tables from collapsing too hard */
  .bawd-all-charts-tables table {
    width: 1200px;
    table-layout: auto;
  }

  /* Charts already use inner wrappers in your system, but this keeps
     the whole display safely scrollable on smaller viewports too */
  .bawd-all-charts-tables .bawd-scrollable-chart-center,
  .bawd-all-charts-tables .bawd-scrollable-chart-inner {
    min-width: 900px;
    width: max-content;
    max-width: none;
  }

  /* Optional: prevent weird squeezing inside Views wrappers */
  .bawd-all-charts-tables .view-content,
  .bawd-all-charts-tables .views-element-container {
    min-width: max-content;
  }
}

/* Large desktop screens */
@media (min-width: 1280px) {

  .bawd-all-charts-tables {
    overflow: visible;
    width: 1200px;
  }

  .bawd-all-charts-tables table,
  .bawd-all-charts-tables .bawd-scrollable-chart-center,
  .bawd-all-charts-tables .bawd-scrollable-chart-inner,
  .bawd-all-charts-tables .view-content,
  .bawd-all-charts-tables .views-element-container {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
}
.adminimal .profit-loss-table-block .views-field-view,
.adminimal .profit-loss-table-block .views-field-view-4, 
.adminimal .profit-loss-table-block .views-field-view-5, 
.adminimal .profit-loss-table-block .views-field-view-3,
.adminimal .cash-flow-table-block .views-field-view,
.adminimal .cash-flow-table-block .views-field-view-4, 
.adminimal .cash-flow-table-block .views-field-view-5, 
.adminimal .cash-flow-table-block .views-field-view-3 {
    margin-bottom: -20px;
}
/* TABLE ADJUSTMENT FOR BAW-D THEME ONLY */
.dialog-off-canvas-main-canvas .profit-loss-table-block .pl-table-embed-cogs,
.dialog-off-canvas-main-canvas .profit-loss-table-block .pl-table-embed-pl-adjustments {
	margin-top: -21px !important;
}
.dialog-off-canvas-main-canvas .profit-loss-table-block .pl-table-embed-fixed-expenses {
	margin-top: 21px !important;
	margin-bottom: -21px !important;
}
.dialog-off-canvas-main-canvas .profit-loss-table-block .views-field-view,
.dialog-off-canvas-main-canvas .profit-loss-table-block .views-field-view-4, 
.dialog-off-canvas-main-canvas .profit-loss-table-block .views-field-view-5, 
.dialog-off-canvas-main-canvas .profit-loss-table-block .views-field-view-3,
.dialog-off-canvas-main-canvas .cash-flow-table-block .views-field-view,
.dialog-off-canvas-main-canvas .cash-flow-table-block .views-field-view-4, 
.dialog-off-canvas-main-canvas .cash-flow-table-block .views-field-view-5, 
.dialog-off-canvas-main-canvas .cash-flow-table-block .views-field-view-3 {
    margin-bottom: 20px;
}

.profit-loss-table-block .views-field-view-1,
.cash-flow-table-block .views-field-view-1 {
    margin-bottom: -1px;
}
.profit-loss-table-block .net-revenue-table-batblock .view-content thead,
.cash-flow-table-block .net-revenue-table-batblock .view-content thead {
    display: table-header-group !important;
}
.profit-loss-table-block .bawd-summer-footer-table thead,
.cash-flow-table-block .bawd-summer-footer-table thead {
    display: none;
}

.startup-table-block tfoot td.srt-bawd-table-static-category {
    background-color: #083F4B !important;
    color: #F8FAFB;
    font-size: 100%;
}
.dialog-off-canvas-main-canvas .view-bi-charts .bawd-table-description {
	width: 300px !important;
}


/***** ----- UPDATES AFTER 3/26/26 ----- *****/
.bawd-profit-loss-line-items.views-row {
	margin-bottom: 50px;
}
/* For the footers in Agg Tables */
.net-revenue-table-batblock tfoot td[class*="rev-bawd-table-time-"],
.startup-table-block tfoot td#view-field-bi-expenditure-table-column {
    background-color: #dedede;
    font-weight: 600;
}