/* Color Variables */
:root {
    --background-color: #f9f9f9;
    --nav-background: #f1f1f1;
    --nav-link-color: #2176A7;
    --nav-link-active-color: white;
    --nav-link-active-bg: #124676;
    --header-background: #124676;
    --header-color: white;
    --container-background: white;
    --button-background: #8CAD3E;
    --button-hover-background: #45a049;
    --clear-filters-background: #f44336;
    --clear-filters-hover-background: #e53935;
    --table-header-background: #124676;
    --table-header-color: white;
    --table-cell-background: #f9f9f9;
    --footer-background: #124676;
    --footer-color: white;
    --notification-banner-background: #FFC632;
    --notification-banner-color: #ffffff;
    --notification-banner-link-color: #007BFF;
}

/* Reset and General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* Stacks header, main content, and footer vertically */
    min-height: 100vh; /* Ensures body is at least full viewport height */
}

/* Navigation Styles */
nav {
    text-align: center;
    background-color: var(--nav-background);
    padding: 10px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--nav-link-color);
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

nav a.active {
    color: var(--nav-link-active-color);
    background-color: var(--nav-link-active-bg);
    border-radius: 5px;
    padding: 5px 10px; /* Add padding for emphasis */
    text-decoration: none; /* Remove underlines */
}

/* Header Styles */
header {
    background-color: var(--header-background);
    color: var(--header-color);
    padding: 15px;
    text-align: center;
}

/* Container Styles */
.container {
    max-width: 800px; /* Maximum width for larger screens */
    width: 100%; /* Full width for smaller screens */
    margin: 10px auto; /* Center container horizontally */
    background: var(--container-background);
    padding: 20px; /* Inner spacing */
    border-radius: 5px; /* Rounded corners */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    flex: 1; /* Push footer to the bottom if content is short */
    text-align: center; /* Center text for uniform appearance */
}

/* Additional Containers */
.head-container,
.map-container,
.map-head-container {
    max-width: 800px;
    width: 100%;
    margin: 10px auto;
    background: var(--container-background);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Heading Styles */
h2 {
    color: #333;
}

/* Form Styles */
form {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap; /* Ensure responsiveness */
    gap: 10px; /* Add spacing between elements */
    align-items: center; /* Vertically align labels and inputs */
}

.form-group {
    display: flex;
    align-items: center;
    gap: 5px; /* Add spacing between label and input */
}

select,
input[type="number"],
input[type="text"],
input#year {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box; /* Ensures padding doesn’t affect dimensions */
    height: auto; /* Match other inputs */
    width: auto; /* Adaptive width */
}

input#year {
    width: 75px; /* Set specific width */
}

/* Button and Link Styles */
button,
a.button,
.clear-filters {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--button-background);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    line-height: 1.2;
    box-sizing: border-box;
}

button:hover,
a.button:hover {
    background-color: var(--button-hover-background);
}

.clear-filters {
    background-color: var(--clear-filters-background);
    text-decoration: none;
}

.clear-filters:hover {
    background-color: var(--clear-filters-hover-background);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border-radius: 10px; /* Rounded corners for tables */
    overflow: hidden; /* Ensures corners are rounded properly */
}

th,
td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: var(--table-header-background);
    color: var(--table-header-color);
}

td {
    background-color: var(--table-cell-background);
}

.greyed-out {
    background-color: #f0f0f0; /* Light grey background */
    color: #ccc; /* Grey text */
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    margin: 0 5px;
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: var(--nav-link-color);
}

.pagination a:hover {
    background-color: var(--nav-link-active-bg);
    color: white;
}

.pagination .current {
    margin: 0 5px;
    padding: 8px 12px;
    border: 1px solid var(--nav-link-active-bg);
    border-radius: 5px;
    background-color: var(--nav-link-active-bg);
    color: white;
}

/* Footer Styles */
.footer {
    text-align: center;
    background-color: var(--footer-background);
    color: var(--footer-color);
    padding: 10px;
    font-size: 14px;
    border-top: 1px solid #ddd;
}

/* Notification Banner */
.notification-banner {
    margin: 10px auto;
    width: 800px;
    background-color: var(--notification-banner-background);
    color: var(--notification-banner-color);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    text-align: center;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
}

.notification-banner p {
    margin: 0;
}

.notification-banner a {
    color: var(--notification-banner-link-color);
    text-decoration: underline;
    font-weight: bold;
}

/* Chart Styles */
canvas {
    display: block;
    margin: 0 auto; /* Center the graphs */
    max-width: 100%; /* Allow responsiveness */
    height: 400px; /* Consistent height for charts */
}
