﻿/* Base container styles */
.monitor-container {
    padding: 14.4px;
    background: #fcfcfc;
    font-size: 10.08px;
    color: #4a4a4a;
    line-height: 1.6;
}

/* Header styles */
.monitor-header {
    margin-bottom: 14.4px;
}

    .monitor-header h1 {
        font-size: 15.84px;
        font-weight: 500;
        margin: 0;
        color: #2c3e50;
    }

.date-display {
    color: #7f8c8d;
    margin-top: 4.32px;
    font-size: 9.36px;
}

/* Legend styles */
.legend {
    display: flex;
    gap: 14.4px;
    margin-bottom: 14.4px;
    flex-wrap: wrap;
    padding: 8.64px;
    background: #ffffff;
    border-radius: 5.76px;
    box-shadow: 0 1.44px 2.88px rgba(0,0,0,0.03);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7.2px;
}

.legend-color {
    width: 14.4px;
    height: 14.4px;
    border-radius: 2.88px;
}

/* Table container styles */
.table-container {
    background: #ffffff;
    border-radius: 5.76px;
    box-shadow: 0 1.44px 5.76px rgba(0,0,0,0.05);
    overflow: hidden;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    position: relative;
}

/* Table base styles */
.monitor-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .monitor-table th {
        background: #f8fafc;
        padding: 11.52px 8.64px;
        text-align: left;
        border-bottom: 1px solid #edf2f7;
        border-right: 1px solid #edf2f7;
        font-weight: 500;
        position: sticky;
        top: 0;
        z-index: 30;
    }

    .monitor-table td {
        border-bottom: 1px solid #f1f5f9;
        border-right: 1px solid #edf2f7;
    }

        .monitor-table td:last-child,
        .monitor-table th:last-child {
            border-right: none;
        }

/* Header styles with sticky positioning */
.theme-header {
    min-width: 129.6px;
    padding-right: 0 !important;
    position: sticky !important;
    left: 0;
    top: 0;
    z-index: 100 !important;
    background: #f8fafc !important;
}

.summary-header {
    min-width: 86.4px;
    padding-left: 0 !important;
    position: sticky !important;
    left: 129.6px;
    top: 0;
    z-index: 100 !important;
    background: #f8fafc !important;
}

.party-header {
    min-width: 61.2px;
    padding: 8.64px 4.32px !important;
    position: sticky;
    top: 0;
    z-index: 90;
}

/* Corner overlay fix for sticky intersections */
.theme-header::after,
.summary-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    background: #f8fafc;
}

/* Party info styles */
.party-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.72px;
}

.party-icon {
    width: 17.28px;
    height: 17.28px;
    object-fit: contain;
}

.party-name {
    font-size: 7.92px;
    font-weight: bold;
    text-align: center;
    max-width: 57.6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.party-seats {
    font-size: 7.92px;
    color: #94a3b8;
}

/* Theme styles */
.theme-main {
    background: #ffffff;
}

    .theme-main:nth-child(odd) {
        background-color: #f8fafc;
    }

.theme-item {
    background-color: #ffffff;
    transition: all 0.3s ease-in-out;
}

    .theme-item:nth-child(odd) {
        background-color: #f8fafc;
    }

/* Theme toggle styles */
.theme-toggle {
    cursor: pointer;
    padding: 11.52px 8.64px;
    padding-right: 0;
    transition: background-color 0.2s;
    position: sticky;
    left: 0;
    z-index: 40;
    background: inherit;
}

    .theme-toggle:hover {
        background-color: #f1f5f9;
    }

.theme-toggle-content {
    display: flex;
    align-items: center;
    gap: 7.2px;
    padding-right: 8.64px;
}

.theme-icon {
    width: 17.28px;
    height: 17.28px;
    margin-right: 2.88px;
    flex-shrink: 0;
    color: #64748b;
}

.theme-name {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5.76px;
    font-weight: 500;
}

.toggle-icon {
    transition: transform 0.3s;
    color: #64748b;
    width: 11.52px;
    height: 11.52px;
    flex-shrink: 0;
}

.theme-toggle.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* Subtheme styles */
.subtheme-name {
    padding: 11.52px 8.64px;
    padding-right: 0;
    padding-left: 34.56px;
    position: sticky;
    left: 0;
    z-index: 40;
    background: inherit;
}

/* Rating styles */
.rating-summary {
    padding: 5.76px 4.32px;
    position: sticky;
    left: 129.6px;
    z-index: 40;
    background: inherit;
    min-width: 86.4px;
}

.summary-pills {
    display: flex;
    gap: 2.88px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.pill {
    padding: 1.6px 4.8px;
    font-size: 8.8px;
    color: white;
    min-width: 17.6px;
    text-align: center;
    border-radius: 2.4px;
    opacity: 0.9;
}

.rating-cell {
    width: 17.28px;
    height: 17.28px;
    margin: 0 auto;
    border-radius: 2.88px;
    transition: transform 0.2s;
    cursor: pointer;
}

    .rating-cell:hover {
        transform: scale(1.1);
    }

/* Rating colors */
.rating-green {
    background-color: #34a853;
}

.rating-olive {
    background-color: #7cb342;
}

.rating-yellow {
    background-color: #0cb5f7;
}

.rating-orange {
    background-color: #fa8c16;
}

.rating-red {
    background-color: #ea4335;
}

.rating-white {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
}

/* Sticky column and header management */
.monitor-table thead th:first-child,
.monitor-table thead th:nth-child(2),
.monitor-table tbody tr td:first-child,
.monitor-table tbody tr td:nth-child(2) {
    position: sticky;
    background: #f8fafc;
    z-index: 50;
}

.monitor-table thead th:first-child {
    left: 0;
}

.monitor-table thead th:nth-child(2) {
    left: 129.6px;
}

.monitor-table tbody tr td:first-child {
    left: 0;
}

.monitor-table tbody tr td:nth-child(2) {
    left: 129.6px;
}

/* Responsive Breakpoints */
@media screen and (max-width: 1400px) {
    .rating-summary {
        left: 115.2px;
        min-width: 79.2px;
    }

    .pill {
        padding: 1.44px 3.6px;
        min-width: 14.4px;
    }
}

@media screen and (max-width: 1200px) {
    .pill {
        padding: 1.44px 2.88px;
        font-size: 7.2px;
        min-width: 12.96px;
    }

    .summary-pills {
        gap: 2.16px;
    }

    .summary-header {
        min-width: 79.2px;
    }
}


