@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');

@font-face {
    font-family: 'Cooper';
    src: url('../font/Cooper-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Cooper';
    src: url('../font/Cooper-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Basis Grotesque';
    src: url('../font/Basis Grotesque.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

html {
    font-size: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family:  'Basis Grotesque', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure full viewport height */
    margin: 0;

}

h1, h2, h3, h4, h5, nav {
    font-family: 'Basis Grotesque', sans-serif;
}

main {
    display: flex;
    justify-content: stretch;
    margin: auto 10px;
    background-color: hsl(0, 0%, 100%);
    padding: 50px;
}

.left-side {
    width: 20%;
    padding-right: 50px;
    flex-shrink: 0; /* Do not allow shrinking */
}

.right-side {
    flex-grow: 1; /* Allow it to take up remaining space */
    min-width: 0; /* Prevent width overflow issues */
}


@media screen and (max-width: 600px) {
    main {
        margin: 0;
        padding: 5px;
        box-shadow: none;
    }
}

h1, h2 {
    margin-top: 0;
}

details {
    margin-bottom: 10px;
    margin-left: 25px;
}

summary {
    user-select: none;
    cursor: pointer;
    font-weight: 400;
    font-size: 110%;
    margin-bottom: 10px;
    margin-left: -20px;
}

label {
    display: block;
    margin: 5px;
    font-size: 1em;
    color: #333;
}

#add1options {
    margin-left: 30px;
}

input[type="radio"] {
    margin-right: 10px;
}

#customBox {
    margin-top: 50px;
    flex: 1; 
    box-sizing: border-box; 
    max-width: 100%;
}

#tieBreakingList ul {
    margin: 5px 0;
}

#unusedTieBreakingMethods {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    font-size: 90%;
    padding: 5px;
    background-color: hsl(236, 38%, 98%);
    border: 1px solid hsl(236, 38%, 90%);
    border-radius: 5px;
}

table#winning-projects-table {
    font-family: 'Basis Grotesque', serif;
}

#unusedTieBreakingMethods span {
    padding: 6px; 
}

#unusedTieBreakingMethods a {
    background-color: #dde7f3;
    border: 1px solid #dde7f3;
    padding: 5px;
    border-radius: 5px;
    text-decoration: none;
    color: #000;
}

#unusedTieBreakingMethods a:hover {
    border: 1px solid #bbb;
}

@media screen and (max-width: 600px) {
    #unusedTieBreakingMethods {
        flex-direction: column;
    }
}

#fileInfo {
    display: none;
    border: 1px solid #ccc;
    padding: 10px;
    align-items: flex-start;
    gap: 10px;
}

@media screen and (max-width: 600px) {
    #drop-suggestion {
        display: none;
    }
}

#drop-overlay {
    pointer-events: none;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 31, 157, 0.3)
                radial-gradient(rgba(255, 255, 255, 0.6),
                                rgba(255, 255, 255, 0));
    z-index: 9999;
}

#drop-overlay-instruction {
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 5px;
    font-size: 200%;
}

#results-section > ul {
    padding-left: 20px;
}

/* Remove forced right alignment 
   td.right {
       text-align: right !important;
   }
*/

/* Winner row styling */
tr.winner-row {
    color: rgb(255, 255, 255);
    background-color: #000000;
}

/* Bar chart container */
.bar-container {
    background-color: hsla(0, 0%, 0%, 0.353);
    width: 80%;
    height: 24px;
}

/* The bar itself: left-aligned text */
.bar {
    position: relative;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.312);
    white-space: nowrap;
    text-align: left !important;
}

/* Label on top of the bar */
.bar-container span,
#dummy-label {
    font-size: 90%;
    color: white;
    position: absolute;
    padding-top: 2px;
    padding-left: 3px;
    padding-right: 1px;
}

.bar-container span.outside {
    color: rgb(255, 255, 255);
    position: absolute;
    left: 100%;
}

@media screen and (max-width: 600px) {
    tr {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }
}

/* Range slider etc. */
#customBox .slider-container input[type="range"] {
    -webkit-appearance: none; 
    appearance: none;
    width: 100%; 
    height: 25px;
    background: #ddd; 
    outline: none; 
    opacity: 0.7;
    -webkit-transition: .2s; 
    transition: opacity .2s;
    border-radius: 10px; 
}

#customBox .slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; 
    appearance: none;
    width: 35px; 
    height: 35px; 
    background: black; 
    cursor: pointer;
    border-radius: 50%; 
}

#customBox .slider-container input[type="range"]::-moz-range-thumb {
    width: 35px; 
    height: 35px; 
    background: #ff21ff; 
    cursor: pointer; 
    border-radius: 50%; 
}

#customBox .slider-container output {
    font-size: 2em;
    font-weight: bold;
}

/* Upload button styling */
#uploadBtn {
    background-color: white;
    border: none; 
    background: white;
    margin: 0;
}

#button-container {
    width: 100%;
    overflow: auto; 
    display: flex;
}


#button-container::after {
    content: "";
    clear: both;
    display: table;
}

#disclaimer {
    font-size: small;
    text-align: center;
    margin: auto auto 20px auto; /* Auto margins ensure it stays at the bottom */
    padding: 10px;
    width: 100%;
}


#groupIndiRatio {
    -webkit-appearance: none;
    height: 15px;
    border-radius: 8px;
    background: linear-gradient(to right, #ffa300 50%, #e91e63 50%);
    outline: none;
}

#groupIndiRatio::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #999;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
}

#groupIndiRatio::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #999;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
}

#totalBudget {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    border-radius: 8px;
    background-color: #ddd; /* default grey background */
    outline: none;
    cursor: pointer;
}

/* Slider thumb styling for visibility */
#totalBudget::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 4px;
    border: 2px solid #888;
    cursor: pointer;
}

#totalBudget::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 4px;
    border: 2px solid #888;
    cursor: pointer;
}

/* Budget Overview Chart */
#budget-overview {
    width: 100%;
    max-width: 1600px; /* Allow it to be wider */
    margin: 20px auto;
}

/* Ensure labels in the budget chart are readable */
.echarts-title {
    font-size: 24px !important; /* Larger title */
    font-weight: bold;
}

.echarts-axis-label {
    font-size: 16px !important; /* Increase axis label size */
}

.echarts-bar-label {
    font-size: 18px !important; /* Make bar labels larger */
    font-weight: bold;
    color: black; /* Improve contrast */
}

.echarts-tooltip-wrap {
    max-width: 300px !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

/* Style for the tooltip container */
.echarts-tooltip {
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 3px 5px rgba(0,0,0,0.2);
}

/* Style for project names in tooltip */
.echarts-tooltip-project-name {
    width: 100%;
    display: inline-block;
    word-wrap: break-word;
    white-space: normal;
    margin-bottom: 5px;
}