@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap');
:root {
    --primary-color: #3F758B;
    --secondary-color: #E7AE56;
    --background-color: #f6fdff;
    --text-color: #34495e;
    --border-color: #bdc3c7;
    --sidebar-bg-color: #3F758B;
    --sidebar-text-color: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-family: 'Signika Negative', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
* {
    font-family: inherit;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
}

.main-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg-color);
    color: var(--sidebar-text-color);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}




select, input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    color: var(--text-color);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

th {
    background-color: var(--primary-color);
    color: white;
}


  
  .search-container {
    position: relative;
    display: flex;
    align-items: center;
  }
  


.filter-input {
    display: flex;
    gap: 0.5rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#aiAnalysisResult {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.view-icons {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
}

.view-icon {
    font-size: 1.5rem;
    color: var(--sidebar-text-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.view-icon:hover, .view-icon.active {
    color: var(--secondary-color);
}

.ai-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: var(--primary-color);
    color: white;
}
.ai-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background-color 0.3s, transform 0.3s;
}

.ai-button:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

.download-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.download-button:hover {
    background-color: #E7AE56;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--sidebar-text-color);
    font-size: 0.8rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.view-data-btn {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 3px;
}

.view-data-btn:hover {
    background-color: #45a049;
}        

/* Estilos para el tema oscuro */
body.dark-theme {
    --background-color: #2c3e50;
    --text-color: #4A352E;
    --border-color: #34495e;
    --sidebar-bg-color: #34495e;
    --primary-color: #3F758B;
    --secondary-color: #E7AE56;
}


.brand-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: bold;
    margin-left: 10px; /* Asegura separación entre el logo y el texto */
}

.documentation-button, .theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 20px; /* Ajusta el tamaño del icono */
    margin-left: 10px; /* Espaciado entre los botones */
    font-size: 0.8rem;
}

/* Media queries para diseño responsivo */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        max-height: 300px;
        overflow-y: auto;
    }
    .content {
        padding: 0.5rem;
    }

}
 
  .search-container {
    position: relative;
  }
  
  .filter-container {
    position: relative;
    z-index: 1002; /* Asegura que el contenedor esté por encima de otros elementos */
  }
  
  .autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    z-index: 1003; /* Asegura que esté por encima del contenedor y otros elementos */
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: none; /* Se mostrará cuando haya sugerencias */
  }
  
  .autocomplete-items {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .autocomplete-items li {
    padding: 10px;
    cursor: pointer;
    background-color: #fff;
    border-bottom: 1px solid #d4d4d4;
    color: #34495e;
  }
  
  .autocomplete-items li:hover {
    background-color: #e9e9e9;
  }
  
  /* Asegura que el contenido debajo no tape el autocompletado */
  .filter-section + .filter-section {
    margin-top: 10px; /* Ajusta este valor según sea necesario */
  }
  .filter-input {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 6px 6px;
    transition: all 0.3s ease;
    position: relative;
    height: 22px;
}

.filter-input:focus-within {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.filter-input input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    width: 100%;
    padding: 0 28px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.filter-input .search-icon {
    color: #757575;
    font-size: 16px;
}

.filter-input .clear-button {
    background: none;
    border: none;
    color: #757575;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    margin-left: 8px;
}

.filter-input .clear-button:hover {
    color: #333;
}










.leaflet-container canvas {
    width: auto !important;
    height: auto !important;
    max-height: none !important;
}


.chart-container {
    height: 100vh;
    width: 100%;
    overflow-y: auto;
    position: relative;
}

.dashboard-card {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.dashboard-card canvas {
    flex: 1;
    width: 100% !important;
    height: 100% !important;
}
.chart-container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}


.chart-container {
    width: 100%;
    height: calc(100vh - 20px); /* Resta un pequeño margen */
    padding: 10px;
    box-sizing: border-box;
}
#mainChart {
    height: calc(100vh - 40px); /* Ajusta este valor según sea necesario */
    width: 100%;
}
.view-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0px; /* Espacio entre los íconos */
    justify-content: space-around; /* Opcional: distribuye los íconos de manera uniforme */
}

.view-icon {
    flex: 1 0 20%; /* Ajusta el tamaño del ícono y fuerza el salto de línea después de un cierto número de íconos */
    text-align: center;
}

.map-container {
    height: 500px;
    width: 100%;
    min-height: 500px; /* ajusta según tus necesidades */
    position: relative;
}
.heatmap-container {
    width: 100%;
    height: 100vh; /* Esto hace que ocupe el 100% de la altura de la ventana */
    position: relative;
    display: none;
}

.heatmap-container.active {
    display: block;
}

#heatmap {
    width: 100%;
    height: 100%;
}

.map-container, .table-container, .scatter-container, .comparison-container {
    display: flex;
    flex-direction: column;
}

.dashboard-container,
.map-container,
.table-container,
.heatmap-container {
    display: none;
    width: 100%;
    height: 100%;
}

.dashboard-container.active,
.map-container.active,
.table-container.active,
.heatmap-container.active {
    display: block;
}
.dashboard-container,
.chart-container,
.map-container,
.table-container,
.heatmap-container {
    display: none;
    width: 100%;
    height: 100%;
}

.dashboard-container.active,
.chart-container.active,
.map-container.active,
.table-container.active,
.heatmap-container.active {
    display: block;
}

#historicalDistributionMap {
    width: 100%;
    height: 600px; /* O el alto que prefieras */
}
.map-container {
    width: 100%;
    height: 100vh; /* Esto hará que el mapa ocupe toda la altura de la ventana */
    position: relative;
  }
  
  #historicalDistributionMap {
    width: 100%;
    height: 100%;
  }


#historicalDistributionMap,
#currentEpidemiologicalMap {
    width: 100%;
    height: 100%;
}
.time-slider-container {
    width: 200px;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    cursor: auto;
    margin-bottom: 10px;
}

.time-slider {
    width: 90%;
    cursor: pointer;
    padding: 10px;
}

.time-slider-label {
    text-align: center;
    margin-top: 5px;
    font-weight: bold;
    user-select: none;
}

/* Mejorar la apariencia del deslizador para diferentes navegadores */
.time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    cursor: pointer;
    border-radius: 50%;
}

.time-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4CAF50;
    cursor: pointer;
    border-radius: 50%;
}
.loading-indicator {
    padding: 6px 8px;
    font: 14px/16px Arial, Helvetica, sans-serif;
    background: white;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    border-radius: 5px;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-y: auto;  /* Habilitar el scroll vertical */
}


.dashboard-container,
.table-container,
.map-container {
    overflow-y: auto;  /* Habilitar el scroll vertical en estas secciones */
}
/* General Report Styles */
.report-container {
    font-family: 'Arial', sans-serif;
    margin: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.report-title {
    text-align: center;
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

.report-date {
    text-align: right;
    font-size: 14px;
    color: #666;
}

.report-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    color: #444;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.data-list, .recommendations-list {
    list-style-type: none;
    padding-left: 0;
}

.data-list li, .recommendations-list li {
    background-color: #fff;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    border: 1px solid #eee;
    font-size: 16px;
    color: #333;
}

.data-list li strong, .recommendations-list li strong {
    color: #333;
    font-weight: bold;
}

.recommendations-list li {
    border-left: 4px solid #008080;
}

.recommendations-list li span {
    color: #008080;
    font-weight: bold;
}

.recommendations-list li span[color="red"] {
    color: #d9534f;
}

.recommendations-list li span[color="orange"] {
    color: #f0ad4e;
}

.recommendations-list li span[color="green"] {
    color: #5cb85c;
}

/* Improved Formatting for Better Visual Hierarchy */
.report-container ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.report-container ul ul {
    margin-top: 10px;
}

.report-container p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}

.report-container h3 {
    color: #333;
    font-size: 20px;
    margin-top: 20px;
}

.report-container h3.section-title {
    font-size: 22px;
    margin-bottom: 10px;
    margin-bottom: 15px;
    font-size: 22px;
}

.no-data {
    text-align: center;
    font-size: 18px;
    color: #d9534f;
}
/* Ajuste del espaciado para la sección del estado de las colmenas */
.hive-status-list li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Ajuste del espaciado para los factores de riesgo */
.risk-factor {
    margin-bottom: 15px;
    line-height: 1.8;
}
/* Lista de ciudades por tipo de enfermedad */
.disease-city-list {
    list-style-type: none;
    padding-left: 0;
}

.disease-city-list li {
    margin-bottom: 10px;
    margin-top: 15px;
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.disease-city-list li strong {
    color: #008080;
}
.reset-filters-button {
    background-color: #57a3a3; /* Color rojo para resaltar el botón de reset */
    color: white;
    border: none;
    padding: 10px;
    margin-top: 10px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
}

.reset-filters-button:hover {
    background-color: #0b4242;
}
/* Style for the secondary sidebar */
.secondary-sidebar {
    position: fixed;
    opacity: 0;
    transition: opacity 0.7s ease;
    top: 0;
    left: 280px; /* Adjust based on the width of your main sidebar */
    width: 350px; /* Width of the secondary sidebar */
    height: 100%; /* Full height */
    background-color: #E7AE56; /* Background color verde oficial:  #3F758B;  el que tenía antes verde suave: #8eb4c1;*/
    box-shadow: 2px 0 5px rgba(0,0,0,0.1); /* Optional shadow */
    overflow-y: auto; /* Scroll if content overflows */
    display: none; /* Hidden by default */
    z-index: 99999; /* Ensure it appears over other content */
}
.secondary-sidebar.show {
    opacity: 1;
    display: block;
}
.secondary-sidebar-content {
    padding: 20px;
    font-size: 16px;
    color: #ffffff;
    line-height: 1.5;
}

.view-icon {
    position: relative;
    cursor: pointer;
}

/* Optional: Add hover effect to icons */
.view-icon:hover {
    background-color: #e0e0e000;
}
.content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;  /* Habilitar el scroll vertical */
    height: calc(100vh - 30px);  /* Ajuste de altura para evitar que el contenido se salga de la vista */
}
.content {
    flex: 1;
    padding: 1rem;
    overflow: auto;
    display: flex;
    flex-direction: column;
}
.content {
    width: 100%;
    height: 100vh;
    overflow: auto;
}
.marker-pin {
    width: 20px;
    height: 20px;
    border-radius: 50% 50% 50% 0;
    background: #E7AE56;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
}

.marker-pin::after {
    content: '';
    width: 14px;
    height: 14px;
    margin: 3px 0 0 3px;
    background: #fff;
    position: absolute;
    border-radius: 50%;
}
.expanded-view-container {
    width: 100%;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    z-index: 9999;
}

.expanded-view-container h2 {
    text-align: center;
    margin-bottom: 20px;
    z-index: 9999;
}

.expanded-chart-container {
    width: 100%;
    height: calc(100% - 60px); /* Altura total menos el espacio del título */
    z-index: 9999;
}
.expand-button {
    position: absolute;
    margin-top:15px;
    right: 10px;
    background-color: #3F758B;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
    z-index: 9999;
}
.dashboard-card {
    position: relative;
}


.expanded-chart-content {
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.expanded-chart-content canvas {
    width: 100% !important;
    height: calc(100% - 40px) !important;
}


.sidebar-button {
    display: block;
    width: calc(100% - 20px); /* 100% menos el padding horizontal total */
    margin: 10px; /* Espacio alrededor del botón */
    padding: 10px;
    background-color: #E7AE56;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.sidebar-button:hover {
    background-color: #003a3a;
}
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 200px;
}
.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
}
.custom-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
}
.custom-select__trigger img {
    width: 24px;
    height: 16px;
    margin-right: 10px;
}
.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 0;
    background-color: #2c3e50;
    transition: all 0.5s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2;
}
.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}
.custom-option {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.5s;
}
.custom-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.custom-option img {
    width: 24px;
    height: 16px;
    margin-right: 10px;
}
.arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}
