/* Modern Minimalist Cross Table Styles - Dynamic Edition */

:root {
    --gc-yellow: #E6B807;
    --gc-dark: #222;
    --gc-gray: #f4f4f4;
    --gc-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Wrapper */
.gc-weekly-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08); /* Deep soft shadow */
    border-radius: 12px;
    background: #fff;
    margin-bottom: 2rem;
    border: 1px solid rgba(0,0,0,0.05);
    border-top: 6px solid var(--gc-yellow);
    font-family: var(--gc-font);
}

/* Base Table */
.gc-weekly-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    color: #444;
    white-space: nowrap;
}

/* Table Header */
.gc-weekly-table thead th {
    background-color: #fff;
    color: var(--gc-dark);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 16px 20px;
    border-bottom: 2px solid var(--gc-yellow);
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.gc-weekly-table thead th:first-child {
    text-align: left;
    left: 0;
    z-index: 20;
    border-right: 1px solid rgba(0,0,0,0.05);
}

/* Table Body Cells */
.gc-weekly-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f8f8f8;
    text-align: center;
    vertical-align: middle;
    transition: all 0.2s ease;
}

/* Sticky First Column Style */
.gc-weekly-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--gc-dark);
    position: sticky;
    left: 0;
    background-color: #fff;
    z-index: 5;
    border-right: 1px solid rgba(0,0,0,0.05);
}

/* Hover Effects - Dynamic */
.gc-weekly-table tbody tr:hover td {
    background-color: #fffdf5; /* Subtle yellow tint */
    color: #000;
    /* transform: scale(1.02); Removed to prevent layout shift */
}
/* Re-apply sticky bg on hover to prevent transparency issues */
.gc-weekly-table tbody tr:hover td:first-child {
    background-color: #fffdf5;
}

/* Diagonal / Empty Cells */
.gc-weekly-table td.gc-diagonal {
    background-color: #fcfcfc !important;
    color: #ccc;
    font-size: 10px;
}

/* Tabs Styling - Modern Buttons */
.gc-weekly-tabs {
    display: flex;
    gap: 8px; /* Tighter gap */
    margin-bottom: 20px;
    flex-wrap: wrap;
    font-family: var(--gc-font);
}

.gc-tab-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #666;
    padding: 6px 16px; /* Reduced padding as requested */
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    outline: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1; /* Ensure height fits text */
}

/* ... keep hover/active styles ... */

.gc-tab-btn:hover {
    border-color: var(--gc-yellow);
    color: var(--gc-yellow);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 184, 7, 0.15);
}

.gc-tab-btn.active {
    background: var(--gc-yellow);
    border-color: var(--gc-yellow);
    color: #fff;
    box-shadow: 0 4px 14px rgba(230, 184, 7, 0.3);
}

/* Tab Content Visibility Logic - CRITICAL */
.gc-tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.gc-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ... content styles ... */

/* Main Widget Title */
.gc-widget-main-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #222;
    border-bottom: 3px solid #E6B807;
    display: inline-block;
    padding-bottom: 5px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .gc-weekly-wrapper {
        border-radius: 6px; 
        box-shadow: none;
        margin-bottom: 1rem;
        border-top-width: 4px; /* Slightly thinner border on mobile */
    }
    
    /* Simulate Zoom Out for table */
    .gc-weekly-table {
        /* zoom: 0.85;  Removed non-standard property causing issues in some browsers */
        transform: scale(0.85); 
        transform-origin: top left;
        width: 117%; /* Compensate for scale (1 / 0.85 approx 1.17) to fill width */
    }
    
    .gc-tab-btn {
        padding: 4px 10px;
        font-size: 11px;
        border-radius: 4px; /* Less rounded on mobile to save space? Keep pill but tight. */
        flex: initial; /* Do not grow */
        width: auto;
    }
    
    .gc-weekly-tabs {
        gap: 6px;
        justify-content: flex-start; /* Align left */
    }
    
    .gc-weekly-table thead th,
    .gc-weekly-table td {
        padding: 4px 2px;
        font-size: 11px;
        line-height: 1.1;
    }
    
    .gc-weekly-table td:first-child,
    .gc-weekly-table thead th:first-child {
        max-width: 80px;
        font-size: 11px;
    }
    
    .gc-tab-title {
        font-size: 14px;
        margin-bottom: 10px;
        border-left-width: 3px;
        padding-left: 6px;
    }
    
    .gc-widget-main-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
}
