body {
    /*font-family: Source Sans Pro, Arial, sans-serif;*/
    /*font-family: Source Sans Pro, Arial, sans-serif;*/
    font-family: Arial, sans-serif;
    font-size: 14px;
    background-color: whitesmoke;
    margin: 0; 
    padding: 0;
    box-sizing: border-box;
}
p {
    line-height: 1.2em;
    margin: 0;
    padding: 0;
}
/* ----- Flex, for reusability and more readable html ----- */
.display-flex { display: flex; }
.display-flex-column { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-one { flex-grow: 1; }
.flex-center { justify-content: center }

/* ----- General ----- */
.position-relative { position: relative; }
.indent-paragraphs p { text-indent: 20px; }
.indent-paragraphs p:first-child { text-indent: 0; }
p.no-indent { text-indent: 0; }

.software-version {
    position: absolute;
    top: 8px;
    right: 30px;
    z-index: 1000;
    color: gray;
    font-size: 12px;
}
/* ----- Dashboard Layout - Titlebar ----- */
.dashboard-titlebar {
    color: white;
    background: darkcyan;
    /* border-bottom: 1px solid gray; */
}
.dashboard-title {
    /* flex-grow: 1;  */
    padding: 4px 40px 5px 20px;
    font-size: 22px;
    /* font-weight: bold; */
    line-height: 1.5;
    text-align: center;
}
.diagram-link {
    white-space: nowrap;
    padding: 12px 20px 0px 5px;   
}
#runButton, #generalResetButton, #scenarioAndEventResetButton {
    height: 20px;
    margin: 11px 15px 0px 0px;
    white-space: nowrap;
}
.randomness-checkbox-wrapper {
    padding: 12px 0px 0px 0px;
}
.randomness-checkbox-label {
    white-space: nowrap;
    padding: 12px 20px 0px 5px;
}
#dashboard-sim-runtime {
    white-space: nowrap;
    padding: 12px 0px 0px 5px;
    min-width: 140px;
}
/* ----- Tabs with sets of graphs ----- */
.db-tabs-buttons-row {
    margin: 5px 0 -6px 12px;
}
.db-tabs-buttons-row button {
    border: 1px solid #bccbe9;
    border-radius: 8px 8px 0 0;
    padding: 2px 5px 8px 5px;
    background-color: #bccbe9;
    color: #232c3d;
    font-size: 14px;
    cursor: pointer;
    transition: 0.25s;
}
.db-tabs-buttons-row button:hover {
    box-shadow: inset 0 0 7px rgb(61, 61, 255); /* Started with blue */
}
.db-tabs-content {
    position: relative;
    box-shadow: 0 6px 12px rgba(33,33,33,.2);
    border-radius: 10px;

}
.db-tabs-content > div {
    position: absolute;
    top: 0;
    left: 0;
}
.db-tabs-item-graphs, .db-tabs-item-sliders {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    background-color: white;
    border: 1px solid lightblue;
    border-radius: 10px;
}
/* The following fails if left padding is > 0. border-box should prevent that but doesn't.
    There are countless complaints about this on the net.
*/
.db-tabs-item-sliders { 
    padding: 2px 0 0 0;
    overflow-y: auto;
}
/* ----- News sources option buttons ----- */
#newsSourcesContainer {
    display: flex;
    margin: 2px auto 0 auto;
    cursor: pointer;
}
#newsSourcesContainer input {
    margin: 0 3px 0 5px;
}
#newsSourcesContainer label {
    padding-right: 10px;
}
/* ----- Voter decision data table ----- */
.voter-decision-container {
    width: 100%;
    margin-top: -6px;
}
.voter-decision-container .tb-table {
    margin: 10px auto;
    border: 1px solid lightgray;
}
.voter-decision-container .table-title {
    text-align: center;
    font-weight: normal;
    border-bottom: 1px solid lightgray;
}
.voter-decision-text {
    margin: -5px 0 0 32px;
    width: 580px;
    font-size: 13px;
}
/* ----- Events ----- */ 
#event-rows-container {
    margin: 0 5px;
    padding-top: 2px;
    max-height: 229px;
    box-shadow: 0 0 11px rgba(33,33,33,.2);
    border: 1px solid lightblue;
    border-radius: 10px;
    overflow-y: scroll;
    width: 735px;
}
.event-row:last-child {
    border-bottom: none;
}
.event-row {
    padding-left: 3px;
    border-bottom: 1px solid gray;
}
.event-row-text {
    flex-grow: 1;
    /* width: 250px;  */
    padding: 1px 0 0 5px;
    position: relative;
}
.event-row-text p {
    font-size: 12px;
}
.event-row-toggle-on-off {
    position: absolute;
    right: 0px;
    bottom: 11px;
}
/* ----- Table ----- */
#tallDataList, #modelInformation {
    width: 323px;
    margin: 5px;
    padding: 5px;
    height: 543px;
    overflow: auto;
    background-color: aliceblue;
    border: 1px solid lightgray;
    border-radius: 10px;
    box-shadow: 0 0 11px rgba(33,33,33,.2);
}
#tallDataList p {
    font-size: 13px;
    line-height: 1.13em;
}
#modelInformation {
    width: 600px;
    height: 250px;
    margin-right: 5px;
    padding: 10px;
}
#politiciansAndSupportersTabContent { /* Brittle. */
    background-color: aliceblue;
}
.tb-table-wrapper {
    /* margin-right: 5px; */
    /* padding: 0px 0 20px 10px; */
    font-size: 13px;
    line-height: 1.13em;
    overflow-y: scroll;    
}
#politiciansTable {
    /* width: 515px; */
    height: 131px;
    overflow-y: auto;
}
#politiciansTable table {
    border: 1px solid lightgray;
}
#politiciansTable thead {
    position: initial;
}
#supportersTable {
    /* width: 515px; */
    height: 438px;
    margin: 0 auto;
    border: 1px solid lightgray;
}
#supportersTableLeftLabel {
    position: absolute;
    bottom: 112px;
    left: 12px;
}
.tb-table {
    border-collapse: collapse;
}
.tb-head {
    /* border: 1px solid lightgray; Causes visible overflow at top, 1px high. */
    background-color: white;
    font-size: 13.5px;

    /* For sticky header */
    position: sticky; 
    top: 0; 
    z-index: 1;
}
.tb-head-sortable {
    cursor: pointer;
}
.tb-head-sortable:hover {
    color: lightcoral;
}
.tb-column-border-right {
    border-right: 1px solid gray;
}
.tb-row:hover {
    color: white;
    background-color: darkgray !important;
}
.xxxtb-row:first-child { /* Should apply only to first child of tb-row. */
    padding-left: 8px;
}
.tb-row-selected, .tb-row:active {
    color: white;
    background-color: blue !important;
}
.tb-rows-selectable {
    cursor: pointer;
}
#supportersTable tbody {
    font-size: 12px;
    line-height: 1em;
}
/* ----- Charts using Abm Graph----- */
.chart-container {
    margin: 5px;
    border: 2px solid lightgray;
    border-radius: 10px;
    transition: all 0.5s ease;
    box-shadow: 0 0 11px rgba(33,33,33,.2); 
    position: relative;
}
.chart-container:hover {
    border: 2px solid black;
}
.chart-title, .chart-title-line2, .chart-subtitle {
    margin: 5px 0;
    text-align: center;
}
.chart-title, .chart-title-line2 {
    font-weight: bold;
    font-size: 18px;
}
.chart-title-line2 {
    margin: -7px 0;
}
#graphPoliticianSupporters .chart-title { /* Main graph. */
    font-size: 20px;
}
.chart-subtitle {
    font-size: 13px; 
}
.chart-info-icon, .description-toggle-icon {
    position: absolute;
    top:  3px;
    left: -2px; /* 4px for small graphs, -2px for main graph. Future feature for small graphs. */
    height: 20px;
    width:  20px;
    margin: 2px;
    transition: all 0.25s ease;
}
.chart-info-icon:hover, .description-toggle-icon:hover {
    height: 24px;
    width:  24px;
    margin:  0;
}
.chart-info-icon {
    left: 4px;
    opacity: .3;
}
.chart-description {
    position: absolute;
    /*top:  28px;*/
    left: -1px;
    /*width:  278px; */
    padding: 5px;
    border-radius: 10px;
    border: 2px solid gray;
    overflow: auto;
    z-index: 100;
    background-color: #ededed; /* A very light gray. */
}
#graphPoliticianSupporters .chart-legend {
    margin-top: -5px;
}
/* .chart-description p {
    padding: 5px;
} */
/* ----- Bar chart using Abm Bar Chart and range area that updates it ----- */
#supportersBarChart {
    position: absolute;
    top: 81px;
    left: 10px;
    z-index: 100;

    border: 1px solid lightgray;
    border-radius: 10px;
    background-color: white;
}
.range-track {
    position: absolute;
    bottom: 13px;
    left: 152px;
    right: 0;
    z-index: 100;

    height: 22px;
    margin-right: 30px;
    cursor: pointer;
    /* background-color: red;
    opacity: .5; */
}
.range-handle {
    position: absolute;
    top: 0;
    /* left: 50px;  */
    z-index: 101;
    
    cursor: pointer;
    width:  20px;
    height: 20px;
    background-image: url("images/TriangleSliderHandle.png");
}
.range-line {
    position: absolute;
    bottom: 22px;
    left: 50px; /* For testing.  */
    z-index: 101;

    visibility: hidden;
    width: 1px;
    height: 175px;
    background-color: gray;
}
.range-line-active {
    box-shadow: 0 0 12px 3px rgb(224 235 9 / 60%);
    background-color: gray;
}
/* ----- Range2 with two handles ----- */
.range2-container {
    position: relative;
    flex-grow: 1;
    height: 19px;
}
.xxxrange2-container {
    position: relative;
    /* margin-top: 5px; */
    width: 200px;
    height: 25px; /* 15 is enough if no numbered ticks. Use 25 if numbered. */
    /* padding: 10px 0; Left and right must be 0. */
}
.range2-track { /* This is a canvas. */
    width: 100%;
}
.range2-handle {
    position: absolute;
    top: 0px;
    width: 10px;
    height: 15px;
    border-radius: 5px;
    cursor: pointer;
   /*  background-color: rgb(70, 115, 130); A dark blue from lightblue. */
}
.range2-handle:focus-visible, .range2-handle:focus {
    border: 1px solid black;
    outline: none;
}
/* ----- Rows of sliders. Bkg color based on cadetblue ----- */
.db-row-of-sliders {
    margin-top: 5px;
    /* Looks better with nothing around the row of sliders. */
    /* border-top: 1px solid cadetblue; */
    /* border: 1px solid gray;
    border-radius: 10px;
    background-color: #ccdbdc;  */
}
/* ----- Slider text areas ----- */
/* description max-width in the original html. */
#countryDescription, #scenarioDescription {
    height: 250px;
    margin: 10px;
    margin-bottom: -1S0px;
    padding: 5px 3px 10px 8px;
    border: 1px solid gray;
    /* border-radius: 20px 20px 0 0; */
    overflow-y: scroll;
    box-shadow: 0 0 11px rgba(33,33,33,.2); 
    background-color: #cae8e9; /* Based on cadetblue, lighter than slider */
}
#countryDescription {
    overflow-y: scroll;
    font-size: 15px;
}
#scenarioDescription p {
    line-height: 1.1em;
    /*font-size: 14px;*/
}
.country-description-title, .country-description-subtitle, .scenario-description-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}
.country-description-subtitle {
    font-size: 20px;
    text-align: center;
    margin-right: 20px; /* To be more centered. */
    color: mediumblue;
}
.scenario-description-title {
    /* None, looks best same as country title. */
}
.scenario-item {
    padding-left: 5px;
}
/* ----- Slider 2 ----- */
.slider2-container {
    margin: 3px;
    font-size: 12px;
    border-radius: 10px;
    transition: all 0.5s ease;
    box-shadow: 0 0 11px rgba(33,33,33,.2); 

    border: 1px solid gray;
    background-color: beige; /* Default color */
}
.slider2-container:hover {
    border: 1px solid black;
    box-shadow: 0 0 11px rgba(0, 0, 0, 0.4); 
}
.slider2-title, .slider2-title-smaller, .slider2-title-tiny {
    flex-grow: 1;
    margin-bottom: 2px;
    text-align: center;
}
.slider2-title-smaller {
    font-size: 11px;
}
.slider2-title-tiny {
    font-size: 10px;
}
.slider2-title-numbered-ticks {
    margin: -1px 0 -3px 0;
    text-align: center;
}
.slider2-titles-row {
    display: flex;
}
.slider2-title-start {
    /* width: 30px; */
    padding-left: 5px;
    text-align: left;
    /* font-weight: bold;
    color: rgb(98 213 139); */
}
.slider2-title-end {
    /* width: 30px; */
    padding-right: 5px;
    text-align: right;
    /* font-weight: bold;
    color: rgb(233 111 167); */
}
.slider2-inner-container {
    display: flex;
    position: relative;
}
.slider2-min  {
    padding: 0px 0px 0px 3px;
    margin-top: -1px;
}
.slider2-max {
    padding: 0px 3px 0px 0px;
    margin-top: -1px;
}
.slider2-disabled-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;

    width: 100%;
    height: 100%;
    background-color: gray;
    opacity: .3;
}
.slider2-row-text {
    margin-top: 5px;
    text-align: center;
    width: 100%;
    color: gray;
}
/* ----- Sliders ----- */
.slider-container, .slider-container-with-text {
    position: relative;
    margin: 2px;
    font-size: 12px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    box-shadow: 0 0 11px rgba(33,33,33,.2); 

    border: 1px solid gray;
    background-color: beige; /* Default color */
}
.slider-dummy {
    font-style: italic;
}
.slider-container-with-text {
    margin: 10px;
    border: 1px solid gray;
    background-color: #a5c7c9; /* Based on cadetblue */
    clip-path: inset(0px -10px -10px -10px); /* Remove top shadow */
}
.slider-container:hover {
    border: 1px solid black;
    box-shadow: 0 0 11px rgba(0, 0, 0, 0.4); 
}
.slider-container-with-text:hover {
    border: 1px solid black;
    /* background-color: #7baeb1;  */
}
.slider-title{
    /* padding-top: 5px; */
    margin-bottom: -4px;
    text-align: center;
    /* font-size: 12px; */
}
.slider-inner-container {
    display: flex;
}
.slider {
    width: 100% !important;
    opacity: 0.7;
    /* border: 1px solid gray; */
    cursor: grab;
}
.slider-min  {
    padding: 5px 1px 5px 5px;
}
.slider-max {
    padding: 5px 5px 5px 1px;
}
.slider-input-and-tick-container {
    position: relative;
    display: flex;
    width: 100%;
}
.slider-tick, .slider-initial-tick {
    position: absolute;
    top: 14px;
    width: 1px;
    height: 6px;
    background-color: gray;
}
.slider-initial-tick {
    width: 3px;
}
.slider-ticks-numbered {
    margin-bottom: 10px;
}
.slider-ticks-numbered .slider-tick, .slider-ticks-numbered .slider-initial-tick {
    top: 10px;
    height: 3px;
}
.slider-tick-number {
    position: absolute;
    top: 11px;
}
/* ----- Slider groups ----- */
.slider-group-container {
    margin: 5px;
    padding: 5px;
    border: 1px solid lightgray;
    border-radius: 20px;
    background-color: #d8e4e4; /* A lighter cadetblue */
} 
.slider-group-title {
    margin-bottom: 2px;
    font-size: 14px;
    text-align: center;
}
/* This gives custom background colors to sliders in the group. */
#event-rows-container .slider-container {
    background-color: #cae8e9; /* Same as country description and scenario list. */
}
.general-constants-sliders .slider-container {
    background-color: #f0f0f0; /* A very light gray. Started from whitesmoke. */
}
/* ----- Style the native slider to look good and same on all browsers. -----
From: https://www.smashingmagazine.com/2021/12/create-custom-range-input-consistent-browsers/
*/
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}
/***** Track Styles *****/
/***** Chrome, Safari, Opera, and Edge Chromium *****/
input[type="range"]::-webkit-slider-runnable-track {
    background: cornflowerblue;
    height: 5px;
}
/******** Firefox ********/
input[type="range"]::-moz-range-track {
    background: cornflowerblue;
    height: 5px;
}
/***** Thumb Styles *****/
/***** Chrome, Safari, Opera, and Edge Chromium *****/
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; /* Override default look */
    appearance: none;
    margin-top: -5px; /* Centers thumb on the track */
    background-color: rgb(75, 111, 177); /* A darker cornflower blue. */
    height: 14px;
    width:  14px;    
    border-radius: 7px;
}
/***** Firefox *****/
input[type="range"]::-moz-range-thumb {
    border: none; /*Removes extra border that FF applies*/
    background-color: rgb(75, 111, 177);
    height: 14px;
    width:  14px;    
    border-radius: 7px;
}
/* For all but Firefox. This removes the ugly focus box on Chrome. */
input[type=range]:focus {
    outline: none;
}


/* The focus border on Chrome looks terrible. Remove it. Doesn't work. */
/* input:focus{ border: none; } */
/* ----- Drop Shadows ----- */
.xxxbordershadow {
    height: 70px;
    width: 80%;
    line-height: 70px;
    text-align: center;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
    transition: all 200ms ease-out;
}  
.test {
    background-color: red;
    background-color: green;
    background-color: blue;
}
/* ----- Modal dialog ----- */
/* Based on: https://www.freecodecamp.org/news/how-to-build-a-modal-with-javascript/ */
#modalDialogContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.4rem;
    padding: 1.3rem;
    min-height: 175px;
    position: absolute;
    
    /* Center the dialog. */
    width: 500px;
    top: 30%;
    left: 50%;
    margin-left: -250px;

    z-index: 2001;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 15px;

    background-image: url("images/ModalDialogHeader.jpg");
    background-repeat: no-repeat;
    background-position: center top;
}
#modalDialogOverlay, #progressModalOverlay {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}
#modalDialogOverlay:focus, #progressModalOverlay:focus {
    outline: none;
}
.modal-dialog-title {
    margin-top: 110px;
    font-size: 18px;
    font-weight: bold;
}
.modal-dialog-text {
    font-size: 18px;
    color: gray;
    letter-spacing: .05em;
}
.modal-dialog-button {
    height: 36px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    background-color: black;
    border-radius: 20px;
    margin-top: 20px;
}
/* ----- Progress Indicator ----- */
#progressText {
    position: absolute;
    top: 11px;
    right: 17px;
    z-index: 2001;

    margin-left: 10px;
    font-size: 14px;
    font-weight: bold;
    /*letter-spacing: 1px;*/
    color: blue;
}
#progressBar {
    position: absolute;
    top: 26px;
    right: 17px;
    z-index: 2001;

    margin-left: 10px;
    width: 132px; /* Match text width. */
}
#progressModalOverlay {
    background: rgba(0, 0, 0, 0);
}
/* ----- Accordion, can be used anywhere ----- */
/* Based on: https://www.w3schools.com/howto/howto_js_accordion.asp */
.accordion-button {
    margin: 10px 10px;
    padding: 5px 15px;
    background-color: #9dcccd; /* A lighter cadetblue */
    color: white;
    cursor: pointer;
    width: 100%;
    border: none;
    border-radius: 10px 10px 0 0;
    outline: none;
    transition: 0.4s;

    font-size: 16px;
    text-align: left;
    letter-spacing: .04em;
}
.accordion-active, .accordion-button:hover {
    background-color: cadetblue;
}
.accordion-button:after {
    content: '+';
    color: white;
    font-weight: bold;
    float: right;
    margin-left: 5px;
}
.accordion-active:after {
    content: '-';
}
.accordion-content {
    margin: -10px 10px 10px 10px;
    border: 1px solid #9dcccd; /* A lighter cadetblue. Matches the button. */
    border-top: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}
#optionsTabContent .accordion-content p:last-child {
    margin-bottom: 15px;
}
/* ----- Options Tab ----- */
#optionsTabContent {
    overflow-y: scroll;
}

#optionsTabContent h2 {
    margin: 30px 5px 10px 10px;
}
#optionsTabContent p {
    margin: 8px 10px;
    line-height: 1.2em;
    font-family: "times new roman", times, serif;
    font-size: 19px;
}
.randomOptionsTitle {
    margin: 9px 0 -6px 23px;
    font-size: 20px;
    font-weight: bold;
}
.randomOptionsWrapper {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 0 5px 5px;
}
.randomOptionsWrapper label {
    display: inline-block;
    padding: 0 0 2px 0;
}
#randomContainer_Groups, #randomContainer_Places {
    padding: 10px 7px 8px 10px;
    border: 1px solid lightgray;
    border-radius: 10px;
    background-color: aliceblue;
}
#randomContainer_Groups {
    display: flex;
    flex-direction: column;
    margin: 0 10px;
}
.random-groups-title, .random-places-title {
    margin-bottom: 2px;
}
.random-groups-explanation {
    margin-top: 10px;
}
p.list-indent {
    padding-left: 20px;
}
.horizontal-separator {
    margin: 30px 10px;
    width: 100%;
    border-bottom: #ADD8E6 2px solid; /* LightBlue */
}
/* ----- Help Tab ----- */
#helpTabContent {
    flex-wrap: nowrap;
}
.help-nav-container {
    padding-top: 5px;
    background-color: #f4f7fa; /* A lighter alice blue. */
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    /* font-size: 13px; */
}
.help-nav-section, .help-nav-subsection {
    margin: 2px 0;
    font-size: 12px;
    white-space: nowrap;
    padding: 1px 3px;
    cursor: pointer;
}
.help-nav-subsection {
    padding-left: 15px;
}
.help-nav-section:hover, .help-nav-subsection:hover  {
    text-decoration: underline;
}
.help-nav-selected {
    /* font-weight: bold; */
    background-color: lightblue;
}
/* .help-text-section1 {
    background-color: lightgray;
    margin: 30px 0;
} */
#helpText {
    overflow-y: auto;
    padding: 5px 3px 30px 6px;
    border-left: 1px solid gray;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}
#helpText:focus {
    outline: none;
}
.help-section-container p {
    font-family: "times new roman", times, serif;
    font-size: 19px;
    line-height: 1.4;
    margin-top: 15px;
}
#helpText h1 {
    margin-top: 40px;
}
#helpText h2 {
    margin-top: 40px;
}
p.list-number {
    padding-left: 20px;
    text-indent: -1.15em;
}
p.list-bullet { 
	padding-left: 20px;
	background: url(images/Bullet_Std.png) left top no-repeat;
}
p.list-continued {
    margin-top: 0px;
    padding-left: 20px;
    text-indent: 30px;
}
.image-center {
	display: block;
	margin: 0px auto 0px auto; 
}
.indent-box {
	border:  1px solid #999999;
	/*padding: 5px 20px 2px 20px;*/
	/*margin: 20px 30px 20px 30px;*/
	background-color: GhostWhite;
	margin:  20px 30px 20px 30px;
	padding: 10px 12px 12px 15px;	
    border-radius: 15px;
}
.indent-box-title {
	text-align: center;
	font-weight: bold;
}
.indent-box p:first-child {
    margin-top: 0px;
}
p.equation {
	font-family: Arial, sans-serif;
    font-size: 16px;
    padding-left: 10px;
    background-color: aliceblue;
}
.equation-special {
	font-weight: bold;
	font-size: 110%;
	color: blue;
}
.indent-box .equation {
	margin-top: 0;
}
.help-image-full-width {
	width: 100%;
}
