
.standard_fig_container {
    width: 60%;
}


.top_img {
    width: 35%;
    opacity: 80%;
}

.polls_table > table {
    /*max-height: 15em;
    overflow-y: scroll;
    overflow-x: scroll;*/
    border: 1px solid #ddd;
}

.polls_table table {
    /*width: 100%;*/
}

/* add a boarder under the header */
.polls_table thead tr {
    /*border-bottom: 1px solid #ddd;*/
}

/* add a bit more cell padding */
.polls_table td {
    /*padding: 0.2em;*/
}

.polls_table th {
    /*font-weight: bold;
    text-align: left;*/
    /*border-bottom: 1px solid #000;*/
}

.dataTables_wrapper .dataTables_scrollBody {
    margin-top: 0px; /* Adjust top padding */
    margin-bottom: 0px; /* Adjust bottom padding */
}

.dt-layout-row {
    margin: 1px !important;
}


.dt-paging-button {
    padding: 1px !important;
}

/* mobile */
@media (max-width: 760px) {
    .dt-paging-button {
        padding: 4px !important;
    }
}

.state_label {
    font-size: 1.3em;
    font-weight: bold;
}

.dt-paging-button.current {
    /* remove background */
    background: none !important;
}

.national_table {
    margin: auto;
    width: 60%;
}
@media (max-width: 760px) {
    .national_table {
        width: 100%;
    }
}



@media (max-width: 760px) {
    .standard_fig_container {
        width: 95%;
    }
}

#firstpub {
    color: #555;
    font-size: 0.9em;
}
@media (max-width: 760px) {
    #firstpub {
        font-size: 0.6em;
    }
}

.timezone {
    font-size: 0.8em;  /* Adjust the font size as needed */
}

.modtime {
    font-size: 1em;
    font-style: italic;
    /*color: #555;*/
    /*margin-top: 0.2em !important;*/
}

h1 {
    margin-top: 30px;
}


/* make the top_image float left on mobile */
@media (max-width: 760px) {
    .top_img {
        width: 40%;
        float: left;
        padding-top: 0.5em;
        padding-right: 10px;
    }
}

.smallem {
    font-size: 0.8em;
}

.movements_fig_container {
    max-height: 50vh;
    overflow-y: scroll;
}

@media (min-width: 760px) {
    .movements_fig_container {
        width: 90vw;
        max-width: 160%;
        max-height: 100vh;
        display: block;
        clear: both;
        position: relative; /* Add this line */
        left: 50%; /* Add this line */
        transform: translateX(-50%); /* Add this line */
        margin-left: auto; /* Adjust this line */
        margin-right: auto; /* Adjust this line */
    }
    .swing_table {
        width: 50%;
    }
    .variance_demo {
        width: 40%;
    }
}

.boxedpara {
    border: 1px solid #ddd;
    padding: 0.5em;
    margin: 0.5em;
    /* make slightly grey transparent */
    background-color: rgba(200, 200, 200, 0.5);
}

.top_line_map {
    width: 52%;
    margin-left: 3%;
}

@media (max-width: 760px) {
    .top_line_map {
        width: 100%;
        margin-left: -0em;
    }
    /*.boxedpara {
        width: 60%;
    }*/
}


/* Common styles */
.polls_table {
    margin-bottom: 20px;
    height: 100%; /* Make table container full height */
    max-height: 60vh;
}
.dataTables_wrapper {
    display: flex;
    flex-direction: column;
    height: 100%; /* Make DataTables wrapper full height */
}
.dataTables_scrollBody {
    flex-grow: 1; /* Allow scroll body to grow and fill space */
}

/* Desktop styles */
@media (min-width: 768px) {
    .state-polls-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* Ensure equal width columns */
        gap: 20px;
        width: 100%; /* Ensure the grid takes full width of its container */
    }
    .state-polls-tabs {
        height: 100%; /* Make grid cells full height */
        display: flex;
        flex-direction: column;
        min-width: 0; /* Allows content to shrink below its minimum content size */
    }
    .state-selector {
        display: none;
    }
}

@media (min-width: 1200px) {
    .state-polls-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)); /* Ensure equal width columns for larger screens */
    }
}

/* Mobile styles */
@media (max-width: 767px) {
    .polls_table {
        width: 95%;
        margin: auto;
    }
    .national_table {
        padding-bottom: 1em;
    }
    .state-polls-tabs { display: none; }
    .state-polls-tabs.active {
        display: flex;
        flex-direction: column;
    }
    .state-selector {
        display: flex;
        overflow-x: auto;
        margin-bottom: 10px;
        width: 95%;
        margin: auto;
    }
    .state-selector button {
        padding: 10px;
        border: none;
        background: #f0f0f0;
        cursor: pointer;
        flex: 1; /* Make buttons equal width */
        white-space: nowrap; /* Prevent text wrapping */
    }
    .state-selector button.active {
        background: rgba(0, 255, 208, 0.54);
        color: black;
    }
}

@media (min-width: 767px) {
    #available_polls_plot {
        width: 45%;
        padding-left: 2em;
    }
}

@media (max-width: 767px) {
    #available_polls_plot {
        width: 90%;
        max-height: 40vh;
        overflow-y: scroll;
        margin: 0em;
        padding-left: 0em;
        /* inset shadow */
        box-shadow: inset 0 0 2px #000000;
        margin: auto;
    }

    .polls_table {
        width: 90%;
        overflow: scroll;
    }
    .polls_table {
        font-size: smaller;
    }
    .polls_table td, .polls_table th {
        /*padding: 6px !important;
        color: red;*/
    }
    .movements_fig_container {
        margin: auto;
        box-shadow: inset 0 0 2px #000000;
    }
    .swing-state-tables-container {
        display: block;
    }

    .state-polls-tabs.active {
        display: flex;
        flex-direction: column;
    }

    .polls_table {
        max-height: none;
    }

}

.memecontainer {
    width: 15%;
    margin-left: 20%;
    margin-bottom: -2em;
    margin-top: 2em;
    /* drop shadow */
    box-shadow: 0 0 2px #000000;
}
@media (max-width: 767px) {
    .memecontainer {
        width: 50%;
        margin: auto;
        margin-bottom: -2em;
        margin-top: 1em;
        padding: 0em;
        /* drop shadow */
        box-shadow: 0 0 2px #000000;
    }
}

.calendar_container {
    max-width: 100%;
    overflow-x: scroll;
}
/* center on desktop */
@media (min-width: 768px) {
    .calendar_container {
        width: 60%;
    }
    .calendar_container > table {
        margin: auto;
    }
}

.vp_table {
    max-width: 88%;
    overflow-x: scroll;
    border: 1px solid #ddd;
    padding: 0.5em;
    margin: 1em;
}
.vp_table td {
    padding: 0.2em;
    margin: 1em;
    /* table border */
    border-right: 1px solid #000;
}
