/* styles.css */
body, input, select, button, header, h2, h3, div, nav {
    font-family: 'Nunito Sans', sans-serif;
    color: #263259;
}

/* Main container styling */
.main-container {
    max-width: 600px; /* Set the maximum width you desire */
    margin: 0 auto; /* This will center the container */
    padding: 0 20px; /* Add some padding */
}

html {
    padding-bottom: 85px; /* Adjust to your design */
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: #fdfdfd;
}

header {
    color: #263259;
    font-size: 1.2em;
    font-weight: bold;
    padding: 20px 0;
}

header img.logo {
    float: right;
    margin-left: 10px;
}

header img.user-icon {
    float: left;
    margin-right: 10px;
}

select {
    width: 100%;
    font-size: 1.1em;
    margin-top: 5px;
    margin-bottom: 10px;
    border-radius: 8px;
    text-align-last: left;
    color: #fdfdfd;
    padding: 15px 15px 15px 50px;
    background: url(../protected/images/electric-meter.png) no-repeat left #263259;
    background-size: 35px;
    background-position-x: 10px;
}

input[type="date"] {
    width: 30%;
    padding: 5px;
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: #263259;
    color: #fdfdfd;
}

input[type="month"] {
    width: 40%;
    padding: 5px;
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: #263259;
    color: #fdfdfd;
}

::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Customizing the canvas container */
canvas#electricChart, canvas#baselineChart {
    background-color: #fdfdfd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Styling the section headers */
h3 {
    color: #263259;
    font-size: medium;
}

/* Additional global styling */
div {
    font-size: 0.95em;
}

/* Wrapper for the stat bar, representing the full 100% */
.stat-bar-wrapper {
    background-color: #cdd5e5; /* This color represents the "shadow" or unfilled portion */
    border-radius: 8px;
    height: 4px; /* Set a fixed height for your progress bar */
    margin-bottom: 10px;
    margin-left: 38px;
    padding: 0;
}

/* Filled portion of the stat bar */
.stat-bar {
    background-color: #263259; /* This color represents the filled portion */
    border-radius: 8px; /* Slightly less than the wrapper for a nice effect */
    height: 4px; /* Set a fixed height for your progress bar */
    width: 0; /* Initial width, will be set dynamically */
    transition: width 0.5s ease; /* Smooth transition for width changes */
    display: flex;
    padding: 0;

}

/* Div stat warning message. Hide with class d-none */
div.stat-warning {
    border: 1px solid;
    border-radius: 8px;
    padding: 7px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.8em;
    font-weight: bold;
    background: #fdfdfd;
    text-align: center;
    margin-bottom: 10px;
}

span.stat-value {
    font-size: 0.9em;
}

div.stat-description {
    font-size: 0.8em;
    color: #a5a5a5;
}

span.stat-pct {
    font-weight: bold;
    margin-right: 8px;
}

span.stat-values {
    float: right;
}

div.statistics-container{
    margin-bottom: 20px;
}

div.statistic {
    background-color: #e9edf2;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

div img.stat-icon {
    float: left;
    margin-right: 10px;
    padding: 5px;
    border-radius: 8px;
    background: #fdfdfd;
}

div.average-statistic {
    background-color: #fdfdfd;
    border-radius: 8px;
    padding: 10px;

}

/* Bottom navigation styling */
.bottom-nav {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background-color: #fdfdfd; /* Adjust to match your design */
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 80px; /* Adjust to your design */
    padding-bottom: 10px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333; /* Adjust to match your design */
    font-size: 0.75rem; /* Adjust to your design */
    opacity: 0.6;
}

.nav-icon {
    width: 22px; /* Adjust to your design */
    height: auto;
    margin-bottom: 4px; /* Adjust to your design */
}

/* Active navigation item */
.nav-item.active {
    opacity: 1;
}

.info-icon {
    display: inline-block;
    margin-left: 10px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px; /* Aligns the text vertically */
    text-align: center; /* Aligns the text horizontally */
    background-color: #263259;
    color: white;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
}

/* Optionally add a hover effect */
.info-icon:hover {
    background-color: #445577;
}

.tooltip-text {
    background-color: #e7ebf0;
    color: #263259;
    padding: 10px;
    border-radius: 5px;
    margin-top: 5px;
    margin-bottom: 20px;
    display: none; /* Initially hidden */
}


.ranking-list {
    list-style-type: none;
    padding: 0;
}

.ranking-list li {
    background-color: #f4f4f4;
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px; /* Add space between medal and text */
}

.ranking-list li.highlighted {
    background-color: #dfeaff; /* Highlight the current user's CUPS */
}

.medal {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.medal.gold {
    background-color: gold;
}

.medal.silver {
    background-color: silver;
}

.medal.bronze {
    background-color: #cd7f32;
}


.tooltip-menu {
    display: none;
    position: absolute;
    left: auto; /* Adjust as needed */
    top: 50px; /* Adjust based on header height */
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 100;
}

.tooltip-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tooltip-menu ul li {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.tooltip-menu ul li:last-child {
    border-bottom: none;
}

.tooltip-menu ul li a {
    text-decoration: none;
    color: #333;
    display: block;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f4f4f4;
    border-top: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    display: none; /* Hidden by default */
    z-index: 1000;
}

.cookie-banner p {
    margin: 0;
    padding: 0;
    display: inline-block;
}

.cookie-banner button {
    margin-left: 10px;
    padding: 5px 10px;
    border: none;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
}

.cookie-banner button:hover {
    background-color: #45a049;
}

.logo-container {
    margin-bottom: 20px; /* Space between the logo and the form */
}

.center-logo {
    max-width: 250px; /* Adjust based on your logo size */
    height: auto; /* Maintain aspect ratio */
}

.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 70vh; /* Full height of the viewport */
    padding: 20px;
}

.form-container {
    background-color: #ffffff; /* White background for the form */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    max-width: 400px; /* Maximum width of the form */
    width: 100%; /* Full width but respecting the max-width */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.form-container h2 {
    margin-top: 0; /* Remove the top margin from the heading */
    color: #333; /* Dark grey color for the text */
    text-align: center; /* Center-align the heading */
}

.form-container input[type="nif"],
.form-container input[type="cups"],
.form-container input[type="password"],
.form-container input[type="text"] {
    width: 100%; /* Full width inputs */
    padding: 10px;
    margin: 10px 0; /* Margin for top and bottom */
    border-radius: 5px; /* Rounded borders for the inputs */
    border: 1px solid #ddd; /* Light grey border */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.form-container button[type="submit"] {
    width: 100%; /* Full width button */
    padding: 10px;
    background-color: #007bff; /* Bootstrap blue */
    color: #ffffff; /* White text */
    border: none;
    border-radius: 5px; /* Rounded borders for the button */
    cursor: pointer; /* Cursor changes to a pointer on hover */
    margin-top: 10px; /* Top margin */
}

.form-container button[type="submit"]:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

.form-container p {
    text-align: center; /* Center-align the paragraph text */
}

.form-container a {
    color: #007bff; /* Bootstrap blue for links */
}

div.legal {
    font-size: 0.8em;
    color: #a5a5a5;
    text-align: center;
    margin-top: 60px;
}