
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: #49274C;
    font-family: 'Quattrocento Sans', serif;
    font-size: 15px;
    line-height: 22px;
}

/* layout */
#container {
    background: #ffffff;
    color: #1A001C;
    margin: 10px;
    padding: 0 20px;
    position: relative;
}

#header {
    margin: 0 auto;
    padding: 20px 0;
}

#header #logo,
#header #mission,
#header #social {
    float: left;
    height: 80px;
    margin-left: 40px;
    width: 510px;
}

#header #logo {
    margin-left: 0;
    position: relative;
    width: 400px;
}

#header #logo a {
    display: block;
}

#header #logo .year {
    background: #49274C;
    color: white;
    font-size: 12px;
    line-height: normal;
    padding: 2px 14px;
    position: absolute;
    left: 0;
    top: 61px;
}

#header #mission {
    font-size: 14px;
    line-height: 22px;
}

#header .fb-like {
    float: left;
    height: 74px;
    width: 436px;
}

#header .fb-like iframe {
    height: 74px !important;
}

#body {
    padding: 0 0 20px 0;
}

#footer {
    color: #ffffff;
    font-size: 13px;
    margin: 10px auto;
    padding: 0 20px;
}

#footer a {
    color: #ffffff;
    text-decoration: underline;
}

.content.left {
    float: left;
    width: calc(66.66666% - 15px);
}


.content.right {
    float: right;
    width: calc(33.33333% - 15px);
}

.clear {
    clear: both;
}

/* text */
a {
    color: #846684;
    text-decoration: none;
}

a:hover {
    color: #846684;
    text-decoration: underline;
}

h2 {
    border-top: 1px #cccccc solid;
    font-family: 'Lusitana', cursive;
    font-size: 24px;
    line-height: normal;
    margin: 20px 0;
    padding-top: 20px;
}

.textBig {
    font-size: 20px;
    line-height: normal;
}

.textHuge {
    font-size: 26px;
    line-height: normal;
}

.textAlert {
    background: #990000;
    color: #ffffff;
    margin-bottom: 20px;
    padding: 5px 10px;
}

.textOK {
    background: #009900;
    color: #ffffff;
    margin-bottom: 20px;
    padding: 5px 10px;
}

ul li em {
    color: #666666;
    font-size: 14px;
}

/* forms */
form {
    background: #fafafa;
    border: 1px #cccccc solid;
    display: inline-block;
    padding: 20px;
}

.first {
    margin: 0 !important;
}

.formRow {
    margin-top: 20px;
}

.formButton {
    margin-top: 30px;
}

.formLabel {
    font-family: 'Lusitana', cursive;
    font-size: 18px;
    line-height: normal;
}

.formField input,
.formField textarea,
.formField select {
    border: 1px #EAE8EA solid;
    font-family: 'Quattrocento Sans', serif;
    font-size: 14px;
    padding: 5px;
}

.formField input,
.formField textarea {
    width: 400px;
}

.formField textarea {
    height: 200px;
}

.formButton input,
button {
    background: #3D1F3F;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: block;
    font-size: 12px;
    padding: 5px;
    text-decoration: none;
}

.formButton input:hover,
button:hover {
    background: #666666;
}

/* images */
img.imageRight {
    border: 2px #404040 solid;
    float: right;
    margin: 0 0 40px 40px;
}

/* overlays */
.overlayContainer {
    background: #ffffff;
    border: 3px #EAE8EA solid;
    left: 50%;
    padding: 15px;
    text-align: left;
    top: 50%;
}

.overlay {
    display: none;
}

.overlay .title {
    color: #4c4c4c;
    margin-bottom: 20px;
    text-align: center;
}

.overlay .body {
    color: #2b2b2b;
    float: none;
    font-size: 14px;
    line-height: 18px;
    margin: 0;
    min-width: 100%;
    padding: 0;
    text-align: left;
}

.overlay button {
    margin-top: 10px;
}

.badge {
    background-color: #000;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    height: 24px;
    line-height: 24px;
    position: absolute;
    right: 5px;
    text-align: center;
    top: 5px;
    width: 24px;
}

.badge-block {
    display: block;
    float: right;
    height: 29px;
    width: 29px;
}

/* tables */
th,
td {
    font-size: 12px;
    line-height: 14px;
    padding: 5px;
    text-align: left;
    vertical-align: top;
}

th {
    color: #ffffff;
    font-weight: normal;
    vertical-align: bottom;
    background: #5d4660; /* Old browsers */
    background: -moz-linear-gradient(top, #5d4660 0%, #463347 49%, #49374b 50%, #3d2d3d 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5d4660), color-stop(49%, #463347), color-stop(50%, #49374b), color-stop(100%, #3d2d3d)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #5d4660 0%, #463347 49%, #49374b 50%, #3d2d3d 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #5d4660 0%, #463347 49%, #49374b 50%, #3d2d3d 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #5d4660 0%, #463347 49%, #49374b 50%, #3d2d3d 100%); /* IE10+ */
    background: linear-gradient(top, #5d4660 0%, #463347 49%, #49374b 50%, #3d2d3d 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5d4660', endColorstr='#3d2d3d', GradientType=0); /* IE6-9 */
}

th span {
    cursor: pointer;
}

th.integrity {
    background: darkgoldenrod;
}

th.for {
    background: darkgreen;
}

th.against {
    background: darkred;
}

tr.odd td {
    background: #fafafa;
}

table.home {
    margin-top: 20px;
}

table.home tr.constitution td {
    background-color: #FAE8D4;
}

table.home tr.democrat td {
    background-color: #EBF5FB;
}

table.home tr.green td {
    background-color: #EAF8E0;
}

table.home tr.independent td {
    background-color: #F7F7F7;
}

table.home tr.libertarian td {
    background-color: #FEFDF0;
}

table.home tr.republican td {
    background-color: #FAE5E3;
}

table.home tr.withdrew td {
    background-color: #cccccc !important;
}

td.candidate {
    width: 240px;
}

td.candidate .headshot {
    float: right;
    margin: 0 0 15px 15px;
}

td.candidate .headshot img {
    display: block;
    width: 100px;
}

td.candidate .name {
    border-bottom: 1px #ddd solid;
    margin-bottom: 2px;
    padding-bottom: 2px;
    width: fit-content;
}

td.candidate .withdrew {
    color: #666666;
    font-style: italic;
}

td.candidate .bio {
    color: #666;
    margin-top: 10px;
}

td.stance {
    font-size: 16px;
    line-height: 20px;
    position: relative;
    width: 140px;
}

td.stance .source {
    font-size: 13px;
    font-style: italic;
    line-height: 18px;
    margin-top: 10px;
}

td.stance a {
    display: block;
    font-size: 14px;
    line-height: 18px;
    margin-top: 2px;
    text-decoration: none;
}

td.stance a:hover {
    text-decoration: underline;
}

td.integrity,
td.for,
td.against {
    font-size: 16px;
    line-height: 20px;
    position: relative;
    width: 380px;
}

td.integrity .badge {
    background-color: darkgoldenrod;
}

td ul {
    margin: 0;
    padding: 0 0 0 20px;
}

th.blank,
td.blank {
    background: none;
}

.table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 80vh; /* Adjust this value to control table height */
    position: relative;
}

.table-scroll table {
    width: max-content;
}

/* Sticky table headers - all th elements in the table */
.table-scroll th {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Preserve header backgrounds for sticky positioning - override any existing background */
.table-scroll th:not(.blank):not(.integrity):not(.for):not(.against) {
    background: #5d4660 !important;
    background: -moz-linear-gradient(top, #5d4660 0%, #463347 49%, #49374b 50%, #3d2d3d 100%) !important;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5d4660), color-stop(49%, #463347), color-stop(50%, #49374b), color-stop(100%, #3d2d3d)) !important;
    background: -webkit-linear-gradient(top, #5d4660 0%, #463347 49%, #49374b 50%, #3d2d3d 100%) !important;
    background: -o-linear-gradient(top, #5d4660 0%, #463347 49%, #49374b 50%, #3d2d3d 100%) !important;
    background: -ms-linear-gradient(top, #5d4660 0%, #463347 49%, #49374b 50%, #3d2d3d 100%) !important;
    background: linear-gradient(to bottom, #5d4660 0%, #463347 49%, #49374b 50%, #3d2d3d 100%) !important;
}

.table-scroll th.integrity {
    background: darkgoldenrod !important;
}

.table-scroll th.for {
    background: darkgreen !important;
}

.table-scroll th.against {
    background: darkred !important;
}

/* Sticky first column (candidate column) - all rows except header */
.table-scroll td.candidate {
    position: sticky;
    left: 0;
    z-index: 5;
}

/* Sticky first header cell (blank header) - must be on both axes */
.table-scroll th.blank {
    position: sticky;
    left: 0;
    top: 0;
    z-index: 15; /* Highest z-index to stay on top of everything */
    background: white !important;
}

/* Ensure row background colors work with sticky positioning for first column */
.table-scroll tr.odd td.candidate {
    background: #fafafa !important;
}

.table-scroll table.home tr.constitution td.candidate {
    background-color: #FAE8D4 !important;
}

.table-scroll table.home tr.democrat td.candidate {
    background-color: #EBF5FB !important;
}

.table-scroll table.home tr.green td.candidate {
    background-color: #EAF8E0 !important;
}

.table-scroll table.home tr.independent td.candidate {
    background-color: #F7F7F7 !important;
}

.table-scroll table.home tr.libertarian td.candidate {
    background-color: #FEFDF0 !important;
}

.table-scroll table.home tr.republican td.candidate {
    background-color: #FAE5E3 !important;
}

.table-scroll table.home tr.withdrew td.candidate {
    background-color: #cccccc !important;
}
