/* General body styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #333;
}

/* Header styling */
header {
    background-color: rgba(4, 26, 70, 0.912);
    color: #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(4, 26, 70, 0.912);
    font-size: 22px;
    font-weight: bold;
}

/* Styling for the menu icon */
.menu-toggle {
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

header span {
    flex-grow: 1;
    text-align: center;
}

/* Container for main content */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    position: relative;
}

/* Map controls styling */
.map-controls {
    position: absolute;
    top: 30px;
    left: 65px;
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    display: inline-block; /* Ensure the container fits the width of the dropdown */
    width: auto;
}

.map-controls label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.map-controls select {
    max-width: 200px; /* Adjust as needed */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Optional: Styling for dropdowns when focused */
.map-controls select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Map styling */
#map {
    height: 85vh;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Legend styling */
#legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    width: 250px;
    max-height: 550px; /* Adjust as needed */
    overflow-y: auto; /* Enable vertical scrolling */
    z-index: 1000;
    transition: height 0.3s ease, padding 0.3s ease;
}

#legend h4  {
    margin: 0;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    cursor: pointer;
}
/* Legend Donor Name Styling */
#legend h4 #legend-donor-name {
    font-weight: bold;
    font-size: 14px;
    color: green; /* Change the color to green */
    margin-left: 5px;
}

/* Sidebar Logo Styling */
.sidebar-logo {
    text-align: center;
    padding: 15px;
    background-color: rgba(4, 26, 70, 0.912);; /* Match the sidebar background color */
}

.sidebar-logo img {
    max-width: 80%;
    height: auto;
}


#legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#legend li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.pin-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    margin-right: 5px;
}

/* Loading spinner styling */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.7);
    padding: 10px;
    border-radius: 5px;
    display: none;
}

/* Pulsating circle effect */
.pulsating-circle {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.1;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

/* Form group styling */
.form-group {
    margin-bottom: 10px;
}

.map-controls label {
    display: block;
}

/* Legend item styling */
.legend-item {
    display: flex;
    align-items: center;
}

.pin-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    margin-right: 5px;
}

/* Custom label styling */
.custom-label {
    background-color: white;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 12px;
    text-align: center;
}

.custom-label .label-text {
    background: white;
    padding: 3px;
    border-radius: 3px;
    font-size: 12px;
}

.collapsed {
    display: none;
}

/* Custom marker styling */
.custom-marker .marker-icon {
    background: url('path/to/marker-icon.png') no-repeat center center;
    background-size: contain;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid red;
}

/* Flashing circle effect */
.flashing-circle {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: red;
    box-shadow: 0 0 20px rgba(231, 6, 6, 0.7);
    animation: flash 0.2s infinite;
}

@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.flashing-circle-container {
    width: 30px;
    height: 30px;
    color: white;
}

/* Hotspot buttons styling */
.hotspot-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hotspot-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.hotspot-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Sidebar Styles */
.sidebar {
    height: 100%;
    width: 250px;
    position: fixed;
    top: 0;
    left: -250px;
    background-color: rgba(4, 26, 70, 0.912);
    overflow-x: hidden;
    transition: 0.3s;
    padding-top: 60px;
    z-index: 1000;
}

.sidebar a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
    color: #f1f1f1;
    display: block;
    transition: 0.3s;
}

.sidebar a:hover {
    color: #ddd;
}

.sidebar .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
    color: #f1f1f1;
}

.sidebar i {
    margin-right: 15px;
}

/* Page content */
.page-content {
    position: relative;
    z-index: 1;
    transition: margin-left .3s;
    padding: 16px;
}

.open-sidebar {
    margin-left: 250px;
}

/* Optional: Add a dark overlay when the sidebar is open */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(4, 26, 70, 0.912);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 999;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Dashboard Styles */
.dashboard {
    display: none;
}

.dashboard .card {
    display: inline-flex;
    flex-direction: column;
    width: 200px;
    height: 150px;
    margin-left: 80px;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
}

.card.donors {
    background-color: #3498db;
}

.card.projects {
    background-color: #2ecc71;
}

.card.partners {
    background-color: #e74c3c;
}

.card.hotspots {
    background-color: #62413e;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 10px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
}

.card-number {
    font-size: 28px;
    font-weight: bold;
    padding: 10px 0;
}

.card-icon {
    font-size: 30px;
    margin-right: 15px;
}

/* Charts Styles */
.charts-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.chart-containerpie,
.chart-container {
    flex: 1;
    min-width: 200px;
    max-width: 600px;
    margin-top: 20px;
}

.chart-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.card-header {
    background-color: #f7f7f7;
    padding: 10px;
    font-size: 1.2em;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

.card-body {
    padding: 20px;
    position: relative;
    height: 300px; /* Adjust the height for the canvas */
}

.card-body canvas {
    width: 100% !important;
    height: auto !important;
}

#partnersPieChart {
    width: 400px !important; /* Adjust width as needed */
    height: 200px !important; /* Adjust height as needed */
}

#chart-container {
    width: 150px; /* Match with canvas size */
    height: 150px; /* Match with canvas size */
    position: relative; /* Ensure it does not shrink or overflow */
}
/* Flashing circle animation for hotspots */
.flashing-circle {
    animation: flashing 1s infinite;
}

@keyframes flashing {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.legend-donor {
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}
/* Add these styles for the header dropdown */
.header-dropdown {
    display: inline-block;
    margin-left: 20px;
    vertical-align: middle;
}

.dropdown-label {
    margin-right: 10px;
    font-size: 16px;
}

#consortium-select {
    padding: 5px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-overflow: ellipsis; /* Display ellipsis (...) for overflow text */
}
/* Dropdown styling */
#consortium-select {
    width: 150px; /* Set a fixed width */
    max-width: 150px; /* Optional: max-width can also be used */
    padding: 8px; 
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;

    /* Prevent expansion on long text */
    white-space: nowrap; /* Prevent text from wrapping */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Show ellipsis (...) for long text */
}



