/* POLICES */
@font-face {
  font-family: 'Libre Baskerville';
  src: url('/fonts/libre-baskerville-v24-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Baskerville';
  src: url('/fonts/libre-baskerville-v24-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body {
    font-family: 'Libre Baskerville', serif;
    margin: 0;
    padding: 0;
    height: 96vh;
}

footer {
	text-align: center;
	font-size: 12px;
	color: #333;
	padding-top: 10px;
}

.container {
    display: flex;
    width: 100%;
    height: 100%;
}

#map {
    flex: 1;
    height: 100%;
    order: 1;
    z-index: 1;
}

.filter-panel {
    flex: 0 0 400px;
    padding: 15px;
    background-color: #f9f9f9;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    font-family: 'Libre Baskerville', serif;
    order: 0;
    transition: flex 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1000;
}

.filter-panel.collapsed {
    flex: 0 0 40px;
    padding: 0;
    overflow: hidden;
}

.filter-panel.collapsed .filters-container,
.filter-panel.collapsed .reset-button {
    display: none;
}

.filter-panel .toggle-button {
    display: block;
    width: 40px;
    height: 40px;
    padding: 0;
    background: #f9f9f9;
    border: none;
    cursor: pointer;
    font-size: 24px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1001;
    text-align: center;
}

.filter-panel:not(.collapsed) .toggle-button {
    background: #f9f9f9;
}

.filters-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    overflow-y: auto;
    margin-top: 40px;
}

.filter-section {
    display: flex;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.filter-title {
    font-weight: 700;
    font-size: 16px;
    color: #333;
    word-break: break-word;
}

.filter-image-container {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.filter-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    object-position: center;
}

.filter-content-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.data-panel {
    flex: 0 0 400px;
    height: 100%;
    background-color: #fff;
    overflow-y: auto;
    border-left: 1px solid #ccc;
    font-family: 'Libre Baskerville', serif;
    order: 2;
    transition: flex 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1000;
}

.data-panel.collapsed {
    flex: 0 0 40px;
    padding: 0;
    overflow: hidden;
}

.data-panel.collapsed .data-container,
.data-panel.collapsed h3,
.data-panel.collapsed #feature-data {
    display: none;
}

.data-panel .toggle-button {
    display: block;
    width: 40px;
    height: 40px;
    padding: 0;
    background: #fff;
    border: none;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
    font-size: 24px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1001;
    text-align: center;
}

.data-panel:not(.collapsed) .toggle-button {
    background: #fff;
}

.data-container {
    flex: 1;
    overflow-y: auto;
    margin-top: 40px;
}

.toggle-button {
    cursor: pointer;
    font-size: 24px;
    border: none;
    background: transparent;
    text-align: center;
    line-height: 40px;
}

.toggle-button:hover {
    background: rgba(0,0,0,0.1);
}

.toggle-button:active {
    background: rgba(0,0,0,0.2);
}

.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.button-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
}

.button-color-square {
    width: 10px;
    height: 10px;
    margin-right: 8px;
    display: inline-block;
}

/* Contamination: colored borders */
.button-color-square.contamination-no { border: 2px solid #3158cd; background: white; }
.button-color-square.contamination-suspicion { border: 2px solid #ef8a1d; background: white; }
.button-color-square.contamination-yes { border: 2px solid #d63f03; background: white; }
.button-color-square.contamination-unknown { border: 2px solid #e3e3e3; background: white; }

/* Movement: patterns */
.button-color-square.movement-excavation {
    border: 1px solid #ccc;
    background: 
        repeating-linear-gradient(to right, rgba(200,200,200,0.8) 0 1px, transparent 1px 6px),
        repeating-linear-gradient(to bottom, rgba(200,200,200,0.8) 0 1px, transparent 1px 6px);
}
.button-color-square.movement-backfill {
    border: 1px solid #ccc;
    background: 
        radial-gradient(circle at center, rgba(200,200,200,0.8) 0.5px, transparent 2px);
    background-size: 4px 4px;
}

/* Soil Cover: very light grey */
.button-color-square.soilcover { background-color: #f0f0f0; border: 1px solid #ddd; }

/* Infiltration & Underground: very light grey */
.button-color-square.highinf { background-color: #3158cd; border: 1px solid #ddd; }
.button-color-square.limitedinf { background-color: #ef8a1d; border: 1px solid #ddd; }
.button-color-square.undergrndconst { background-color: #d63f03; border: 1px solid #ddd; }

.button-color-square.default { background-color: #f0f0f0; border: 1px solid #ddd; }

.filter-buttons button {
    padding: 6px 10px;
    border: 1px solid #000;
    background-color: #fff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Libre Baskerville', serif;
    width: 100%;
    text-align: left;
    color: #5d5d5d;
    display: flex;
    align-items: center;
}

.filter-buttons button.active {
    color: black;
    font-weight: bold;
}

.filter-buttons button:hover {
    background-color: #f0f0f0;
}

.reset-button {
    margin-top: 15px;
    padding: 8px 15px;
    background-color: #517fc4;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Libre Baskerville', serif;
    font-size: 12px;
    width: 100%;
}

.reset-button:hover {
    background-color: #d32f2f;
}

.data-container {
    flex: 1;
    overflow-y: auto;
}

.data-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

#feature-data {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-section {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.feature-section h4 {
    margin: 0 0 10px 0;
    color: #517fc4;
    font-size: 16px;
}

.feature-section p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.feature-section strong {
    color: #333;
}

.empty-state {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Unsealing table styles */
.unsealing-table-container {
    padding: 10px 0;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

/* Hide table when panel is collapsed */
.filter-panel.collapsed .unsealing-table-container {
    display: none;
}

.unsealing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.unsealing-table th,
.unsealing-table td {
    text-align: center;
    vertical-align: middle;
    padding: 6px;
}

.unsealing-table th {
    background-color: #fff;
    font-weight: bold;
}

.unsealing-table td:first-child:nth-child(2) {

    background-color: #fff;
}

/* Highlightable cells - same width */
.unsealing-table td:not(:first-child):not(:nth-child(2)) {
    width: 50px;
	background-color: #eaeaea;
}

/* Label cells */
.unsealing-table .hide {
	display: none;
}
.unsealing-table .benefits-label {
    vertical-align: center;
    font-weight: bold;
}
.unsealing-table .benefits-sublabel{
    font-weight: bold;
}

.unsealing-table .constraints-label {
    text-align: center;
}

/* Highlighted cell - grey color */
.unsealing-table td.highlighted {
    background-color: #e86b43 !important;
    color: white;
    font-weight: bold;
}

/* Graphical Representation Styles */
.graphical-representation {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #fafafa;
}

.visualization-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.soil-visualization {
    border: 1px solid #ccc;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.visualization-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ccc;
}

.detailed-data {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}


/* All buttons now have uniform styling: white background with thin black border */
/* Color indicator squares show the original style color for each button */