/* Main Page Title
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.main-title {
    text-align: left; 
    color: white;
    font-weight: bold;
    background-color: #212121; 
    padding: 1px 5px; 
    margin-top: -25px;
    margin-bottom: 0px;
    font-size: 22px;
    font-family: 'Lato', sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.main-title h2 {
    margin-bottom: 20px;
}

.main-title p {
    margin-top: 0px;
    margin-bottom: 10px;
}

/* Global Styles
–––––––––––––––––––––––––––––––––––––––––––––––––– */
body {
    background-color: #212121;
    color: white;
    font-family: 'Lato', sans-serif; 
    text-align: justify;
}

/* Page Title */
.title {
    text-align: left;
    color: white;
    font-weight: bold;
    font-size: 24px;
    font-family: 'Lato', sans-serif; 
}
.graph-container,
.table-container {
    width: 100%;
    height: 500px;
    margin-bottom: 20px;
}

/* Style for horizontal lines */
hr {
    border: 0; 
    height: 1px; 
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); 
    margin: 20px 0; 
}

/* Instructions */
.instructions {
    color: #efefef;
    font-weight: bold;
    font-size: 14px;
    margin-top: -5px;
}

/* Tabs
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.custom-tabs {
    background-color: #1E2130;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
    height: fit-content;
    cursor: pointer;
    font-family: 'Lato', sans-serif; 
}

#Topic-Frequency-tab.custom-tab,
#Sentiment-Analysis-tab.custom-tab,
#Topic-Data-tab.custom-tab {
    background-color: #36454F;
    letter-spacing: 1px;
    color: white;
    font-family: 'Lato', sans-serif; 
    border: 0;
    border-bottom: #1E2130 solid 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    height: 18px;
}

#Topic-Frequency-tab.custom-tab--selected,
#Sentiment-Analysis-tab.custom-tab--selected,
#Topic-Data-tab.custom-tab--selected {
    border-bottom: #91dfd2 solid 4px !important;
}

#Topic-Frequency-tab.custom-tab {
    margin-right: 3px;
}

#Sentiment-Analysis-tab.custom-tab,
#Topic-Data-tab.custom-tab {
    margin-left: 3px;
}

/* Dropdowns */
.Select-control {
    background-color: white !important;
    color:black;
}  

.Select-value-label {
    color: black !important;
    background-color: white;
    font-weight: bold;
}

.Select-menu-outer {
    background-color: #91dfd2;
    color: black;
}  

/* Range Slider
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.rc-slider-track {
    background-color: #91dfd2;
}

.rc-slider-handle {
    border-color: #91dfd2;
}

.rc-slider-handle:hover {
    border-color: #6bc7b6;
}

.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging {
    border-color: #6bc7b6;
    box-shadow: 0 0 0 5px #6bc7b6;
}

/* Absolute Frequency/Normalized Frequency Tabs
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.frequency-tabs {
    margin-bottom: 0;
}

#frequency-tabs .tab,
#sentiment-frequency-tabs .tab {
    background-color: #36454F;
    letter-spacing: 1px;
    color: white;
    font-weight: 600;
    border: 0;
    border-bottom: #1E2130 solid 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    height: 18px;
    margin-right: 3px;
}

#frequency-tabs .tab--selected,
#sentiment-frequency-tabs .tab--selected {
    border-bottom: #91dfd2 solid 4px !important;
}

/* Background and Interpretation Pages
–––––––––––––––––––––––––––––––––––––––––––––––––– */

#Background-tab.custom-tab,
#Interpretation-tab.custom-tab {
    background-color: #36454F;
    letter-spacing: 1px;
    color: white;
    font-family: 'Lato', sans-serif; 
    border: 0;
    border-bottom: #1E2130 solid 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    height: 18px;
}

#Background-tab.custom-tab--selected,
#Interpretation-tab.custom-tab--selected {
    border-bottom: #91dfd2 solid 4px !important;
}

#Background-tab.custom-tab {
    margin-right: 3px;
}

#Interpretation-tab.custom-tab {
    margin-left: 3px;
}

li a {
    color: #feb106;
    text-decoration: underline;
}

li a:hover {
    color: white;
    text-decoration: underline;
}

#sentiment-analysis-graph .gtitle {
    font-size: 24px !important;
    text-align: center !important;
}

.title-center {
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
    font-family: 'Lato', sans-serif;
    margin-bottom: 20px;
}

figcaption {
    color: lightgrey;
    font-size: small;
    text-align: left;
}

/* Topic Frequency Analysis
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#topic-frequency-graph {
    background-color: #212121;
}

/* Sentiment Shift Analysis
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#sentiment-analysis-graph {
    background-color: #212121;
}

/* Topic Data
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#topic-data-table .dash-table-container {
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    height: 600px;
    overflow-y: auto;
}

/* Topic Table Header */
#topic-data-table .dash-table-container .dash-header {
    background-color: #111111;
    color: white;
    font-weight: bold;
    text-align: left;
    font-family: 'Lato', sans-serif;
}

/* Topic Table Cell */
#topic-data-table .dash-table-container .dash-cell {
    background-color: #111111;
    color: white;
    border: 1px solid #588A87;
    text-align: left;
    padding: 5px;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
}

/* Topic Table Legend */
.topic-table-legend {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.topic-table-legend p {
    font-weight: bold;
    margin-right: 10px;
}

.topic-table-legend span {
    color: black;
    padding: 2px 5px;
    margin-right: 10px;
}

.topic-table-legend .positive {
    background-color: #B0DBA4;
}

.topic-table-legend .neutral {
    background-color: #FEE191;
}

.topic-table-legend .negative {
    background-color: #FF887E;
}

/* Topic Table Data Conditional Styles */
.topic-table-positive {
    background-color: #B0DBA4 !important;
    color: black !important;
    font-family: 'Lato, sans-serif';
}

.topic-table-negative {
    background-color: #FF887E !important;
    color: black !important;
    font-family: 'Lato, sans-serif';
}

.topic-table-neutral {
    background-color: #FEE191 !important;
    color: black !important;
    font-family: 'Lato, sans-serif';
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 600px) {
    /* Adjust main title */
    .main-title {
        width: 100%;
        font-size: 20px;
    }
    .main-title h2 {
        margin-bottom: 10px;
    }
    .main-title p {
        font-size: 12px;
    }

    /* Adjust graph and table sizes */
    #topic-frequency-graph,
    #sentiment-analysis-graph,
    #topic-data-table .dash-table-container {
        height: 400px;
    }

    /* Adjust dropdown and slider sizes */
    .Select-control,
    .rc-slider {
        font-size: 14px;
    }

    /* Adjust tab sizes */
    .custom-tabs,
    #frequency-tabs .tab,
    #sentiment-frequency-tabs .tab {
        font-size: 12px;
        height: auto;
        padding: 5px;
    }

    /* Adjust page titles and instructions */
    .title {
        margin-bottom: 10px;
        font-size: 16px;
        margin: 5px 0; 
        text-align: center;
    }

    .title + p {
        font-size: 12px;
        margin: 5px 0; 
        text-align: center;
        margin-top: 10px; 
    }

    /* Adjust visibility of elements that may overlap */
    .title + p,
    #page-content > .row {
        display: block; 
        padding: 0 15px; 
    }

    /* Adjust graph and table sizes */
    #topic-frequency-graph,
    #sentiment-analysis-graph,
    #topic-data-table .dash-table-container {
        height: 500px;
    }
    
    /* Adjust legend size */
    #topic-frequency-graph .legend .legenditem .legendtext {
        white-space: normal;
        line-height: 1.2;
    }
}