﻿/* Votigami Page Layout */
.votigami-page {
    background: #FFF;
    padding: 40px;
    padding-top: 105px; /* Align it properly */
    position: relative;
    z-index: 2;
}

/* Content Wrapper */
.content-wrapper {
    position: relative;
    width: 1800px;
    max-width: 100%;
    margin: 0 auto;
}

/* Page Title */
.page-title {
    color: var(--Gray-900, #181D27);
    font-family: 'Inter', sans-serif;
    font-size: 30px;
    font-weight: 600;
    line-height: 38px;
}

/* Votigami Table Styling */
.votigami-table {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 40px 0;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--Gray-200, #E9EAEB);
    background: var(--White, #FFF);
    box-shadow: 0px 1px 3px 0px rgba(10, 13, 18, 0.10), 0px 1px 2px 0px rgba(10, 13, 18, 0.06);
}

/* Table Header */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 16px;
    background: var(--Gray-50, #FAFAFA);
    border-bottom: 1px solid var(--Gray-200, #E9EAEB);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Title inside table header */
.table-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--Gray-900, #181D27);
    margin: 0;
}

/* Table Controls */
.table-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-bottom: 20px;
}

.switch-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Table Container */
.table-container {
    width: 100%;
    overflow-x: auto; /* Enable horizontal scrolling */
    max-width: 100vw;
}

/* Table Styling */
.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-family: 'Inter', sans-serif;
    background: var(--White, #FFF);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

    .table thead tr {
        background: var(--Gray-50, #FAFAFA);
    }

    /* Header Styling */
    .table thead th {
        border: 1px solid var(--Gray-200, #E9EAEB);
        text-align: center;
        font-size: 12px;
        font-weight: 500;
        font-family: 'Inter', sans-serif;
        line-height: 18px;
        padding: 6px 10px;
        white-space: nowrap;
        color: var(--Gray-600, #535862);
    }

/* # of Voters Header */
.voters-header {
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    line-height: 16px;
    white-space: nowrap;
}

/* Vote Combinations Header */
.combinations-header {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    line-height: 18px;
    white-space: nowrap;
}

/* Table Body / Row Borders */
.table tbody tr {
    border-bottom: 1px solid var(--Gray-200, #E9EAEB);
}

.table tbody td {
    text-align: center;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    padding: 7px;
    color: var(--Gray-600, #535862);
    white-space: nowrap;
}

/* Common Table Cell Classes */
.empty-cell,
.green-cell,
.black-cell,
.gradient-cell {
    border: 1px solid #ccc;
    text-align: center;
    cursor: pointer;
}

/* Empty Vote Cell */
.empty-cell {
    background-color: white;
}

    .empty-cell:hover {
        background-color: #f0f0f0;
    }

/* Previously Occurred Vote Styling */
.green-cell {
    background-color: #77DD77 !important;
}

    .green-cell:hover {
        background-color: #66cc66 !important;
    }

/* Black Cells */
.black-cell {
    background-color: black !important;
    border: 1px solid black !important;
    cursor: default;
}

/* Vote Count Display */
.vote-count {
    font-size: 8px !important;
    font-weight: bold;
    color: black !important;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: 0.4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #77DD77;
}

input:focus + .slider {
    box-shadow: 0 0 1px #77DD77;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.toggle-label {
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: var(--Gray-900, #181D27);
    font-size: 14px;
    line-height: 28px;
    white-space: nowrap;
}

/* Popup for Vote Details */
.vote-detail-popup {
    position: absolute;
    background-color: white;
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 12px 16px;
    z-index: 9999;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    white-space: nowrap;
    font-size: 14px;
    line-height: 1.4;
    min-width: 280px;
    max-width: 1000px;
}

    .vote-detail-popup.hidden {
        display: none;
    }

    .vote-detail-popup .close-btn {
        float: right;
        font-weight: bold;
        color: #888;
        cursor: pointer;
    }

#seasonSliderWrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

    #seasonSliderWrapper.hidden {
        display: none;
    }

#seasonSlider {
    width: 800px;
}

label[for="seasonSlider"] {
    font-size: 24px;
}

#modeSelect {
    padding: 4px 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--Gray-300, #D0D1D3);
    border-radius: 6px;
    background-color: #FFF;
    color: #181D27;
}

.default-cell {
    border: 1px solid #ccc;
    text-align: center;
    cursor: pointer;
    background-color: white;
}

.hero-banner {
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

    .hero-banner img {
        width: 100%;
        object-fit: cover;
        display: block;
    }

/* Table Footer Cell (X-Axis Description) */
.x-axis-description {
    position: relative; /* So children can be absolutely positioned */
    background: linear-gradient(to right, rgba(255, 0, 0, 0.3), rgba(0, 0, 255, 0.3));
    border-top: 1px solid var(--Gray-200, #E9EAEB);
    height: 40px; /* Adjust as needed for spacing */
}

    /* Two labels on the left & right */
    .x-axis-description .left-label,
    .x-axis-description .right-label {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        color: black;
        font-weight: 600;
        white-space: nowrap;
    }

    .x-axis-description .left-label {
        left: 12px;
    }

    .x-axis-description .right-label {
        right: 12px;
    }

/* Optional: Tweak footer text styling if needed */
.table tfoot td {
    font-size: 14px;
    color: var(--Gray-600, #535862);
}
