/* Tables Section Styles */

.tables-section {
    padding: 4rem 1rem;
    background-color: #fff;
    --color-orange: #E65100;
    --color-orange-light: #FFF3E0;
    --color-orange-border: #FFE0B2;
    --color-anthracite: #374151;
    --radius: 12px;
}

.tables-section.theme-dark {
    background-color: var(--chickin-anthracite);
    color: white;
}

.tables-section .section-header {
    margin: 0 auto 3rem auto;
    text-align: center;
    max-width: 800px;
}
.tables-section .section-title { font-size: 2.2rem; margin-bottom: 1rem; font-weight: 700; }
.tables-section .section-description { font-size: 1.125rem; opacity: 0.9; }

.table-frame {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.chickin-table {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 0;
    font-size: 1rem;
}

.chickin-table th, .chickin-table td {
    padding: 1.25rem 1rem;
    text-align: left;
}


/* =========================================
   STYLE: BRAND (Chickin Standard)
   - Orange header, rounded corners card look
   ========================================= */
.table-frame.style-brand {
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    background: white;
    overflow: hidden; /* For rounded corners */
    border: 1px solid rgba(0,0,0,0.05);
}

.style-brand .chickin-table th {
    background-color: var(--color-orange);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    border: none;
}

.style-brand .chickin-table td {
    border-bottom: 1px solid #f0f0f0;
    color: var(--color-anthracite);
}
.style-brand .chickin-table tr:last-child td { border-bottom: none; }
.style-brand .chickin-table tr:hover td { background-color: #fafafa; }


/* =========================================
   STYLE: COMPARISON
   - Ideal for "Chickin vs Competencia"
   - Can highlight a specific column
   ========================================= */
.table-frame.style-comparison .chickin-table {
    border-collapse: separate;
    border-spacing: 4px 0; /* Gaps between columns */
}

.style-comparison th {
    background-color: #f3f4f6;
    color: var(--color-anthracite);
    text-align: center;
    border-radius: 8px 8px 0 0;
    font-weight: 800;
}

.style-comparison td {
    background-color: #f9fafb;
    border-bottom: 2px solid white;
    text-align: center;
}
.style-comparison tr:last-child td { border-radius: 0 0 8px 8px; }

/* Highlighted Column (e.g. Chickin) */
.style-comparison .highlighted {
    background-color: var(--color-orange-light) !important;
    position: relative;
    border-color: white;
}
.style-comparison th.highlighted {
    background-color: var(--color-orange) !important;
    color: white;
    transform: scale(1.05);
    transform-origin: bottom;
    box-shadow: 0 -4px 10px rgba(230, 81, 0, 0.2);
    z-index: 2;
    border-radius: 8px 8px 0 0;
}
.style-comparison td.highlighted {
    border-left: 1px solid var(--color-orange-border);
    border-right: 1px solid var(--color-orange-border);
    font-weight: 700;
    color: var(--color-orange);
}
.style-comparison tr:last-child td.highlighted {
    border-bottom: 1px solid var(--color-orange-border);
    box-shadow: 0 4px 10px rgba(230, 81, 0, 0.1);
}


/* =========================================
   STYLE: FINANCIAL
   - Compact, lines only, right-aligned numbers
   ========================================= */
.table-frame.style-financial .chickin-table {
    font-family: 'Courier New', monospace; /* Or standard mono font stack */
    border-top: 2px solid var(--color-anthracite);
    border-bottom: 2px solid var(--color-anthracite);
}

.style-financial th {
    text-transform: uppercase;
    font-size: 0.8rem;
    border-bottom: 1px solid #ddd;
    padding: 0.75rem;
}
/* Assume first col is labels, rest are numbers */
.style-financial th:not(:first-child),
.style-financial td:not(:first-child) {
    text-align: right;
}
.style-financial td {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
}
.style-financial tr:nth-child(even) td { background-color: rgba(0,0,0,0.02); }


/* Dark Mode Overrides */
.theme-dark .style-brand .chickin-table th { background-color: var(--color-orange); }
.theme-dark .style-brand { background: #2d333b; border-color: #444; }
.theme-dark .style-brand .chickin-table td { color: #ddd; border-bottom-color: #444; }
.theme-dark .style-brand .chickin-table tr:hover td { background-color: #353b45; }

.section-footer-note { margin-top: 1rem; opacity: 0.7; font-size: 0.85rem; text-align: center; }

/* Responsive adjustments */
@media (max-width: 600px) {
    .style-comparison .chickin-table th { font-size: 0.8rem; padding: 0.5rem; }
    .style-comparison .chickin-table td { font-size: 0.9rem; padding: 0.75rem 0.5rem; }
}