/* General styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background-color: #102542;
    color: #fff;
    padding: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content h1 {
    margin: 0;
}

.container {
    display: flex;
    flex-wrap: nowrap;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
    padding: 20px;
    background-color: #f8f8f8;
    border-right: 1px solid #ddd;
}

.content {
    flex: 1;
    padding: 20px;
}

footer {
    background-color: #102542;
    color: #fff;
    text-align: center;
    padding: 10px;
}

/* Form Styles */
#selection-form {
    width: 100%;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
}

.form-row select,
.form-row input[type="text"] {
    width: 100%;
}

/* Checkbox Styles */
.checkbox-container {
    margin-top: 15px; /* Add space above the checkboxes */
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
}

.checkbox-item label {
    margin: 0;
}

/* Ensure the checkboxes and labels are left-aligned */
.checkbox-container,
.checkbox-item,
.checkbox-item input[type="checkbox"],
.checkbox-item label {
    text-align: left;
}

/* Slider styles */
.slider-container {
    margin: 20px 0;
}

#graph-size-slider {
    width: 40%;
}

.button {
    display: inline-block;
    padding: 8px 16px;
    margin: 0; /* Remove margin-top */
    background-color: #102542;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
}

.button:hover {
    background-color: #0c1d31;
}

#print-button {
    padding: 8px 16px;
    background-color: #102542;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0; /* Ensure no margin */
}

#print-button:hover {
    background-color: #0c1d31;
}

/* Data refresh info */
.data-refresh-info {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align to the right */
}

.data-refresh-info p {
    margin: 0;
    margin-right: 10px;
}

/* Alert messages */
.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.alert.success {
    background-color: #dff0d8;
    color: #3c763d;
}

.alert.error {
    background-color: #f2dede;
    color: #a94442;
}

/* Graph container styles */
.graph-container {
    display: grid;
    gap: 20px;
    text-align: center;
    align-items: start;
    grid-template-columns: repeat(2, 1fr); /* Default to 2 columns */
}

/* Adjust columns based on class */
.columns-2 .graph-container {
    grid-template-columns: repeat(2, 1fr);
}

.columns-3 .graph-container {
    grid-template-columns: repeat(3, 1fr);
}

@media print {
    /* Adjust the graph container to have 2 columns by default */
    .graph-container {
        display: grid;
        gap: 20px;
        align-items: start;
        grid-template-columns: repeat(2, 1fr);
    }

    /* Ensure individual graph items don't break across pages */
    .graph-item {
        page-break-inside: avoid;
    }

    /* Optional: Adjust for 3 columns if needed */
    body.columns-3 .graph-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Hide elements that are not needed in print */
    .sidebar,
    header,
    footer,
    .action-buttons {
        display: none;
    }

    /* Optional: Adjust margins and paddings for printing */
    body {
        margin: 0;
        padding: 0;
    }

    .content {
        padding: 0;
    }
}
/* Styles for the action buttons container */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
}

/* Styles for the data refresh info */
.data-refresh-info {
    display: flex;
    align-items: center;
}

.data-refresh-info p {
    margin: 0;
    margin-right: 10px;
}
/* Header styles (unchanged) */
header {
    background-color: #102542;
    color: #fff;
    padding: 20px;
}

.header-content h1 {
    color: #fff;
}

/* Ensure header text is white */
header p {
    color: #fff;
}

/* Style links in the header */
header p a {
    color: #fff;
    text-decoration: underline;
}

header p a:hover {
    color: #ddd;
}

/* Styles for the action buttons container */
.action-buttons {
    display: flex;
    align-items: center; /* Vertically centers items */
    justify-content: space-between;
    margin-top: 20px;
}

/* Styles for the data refresh info */
.data-refresh-info {
    display: flex;
    align-items: center; /* Align items vertically */
}

.data-refresh-info p {
    margin: 0;
    margin-right: 10px; /* Space between text and button */
}

/* Button styles */
.button {
    display: inline-block;
    padding: 8px 16px;
    margin: 0; /* Remove margins */
    background-color: #102542;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
}

.button:hover {
    background-color: #0c1d31;
}

#print-button {
    padding: 8px 16px;
    background-color: #102542;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0; /* Ensure no margin */
}

#print-button:hover {
    background-color: #0c1d31;
}

/* Center the overall title */
.overall-title {
    text-align: center;
    margin-bottom: 20px;
}

/* Center the overall graph container */
.overall-graph-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px; /* Adjust as needed */
}

/* Ensure the graph itself doesn't affect alignment */
.overall-graph-container .graph {
    display: inline-block;
}
.graph-item {
    page-break-inside: avoid;
}
