* { 
    font-family: 'Nunito', sans-serif; 
    box-sizing: border-box;
}

#map { 
    height: 100vh; 
}

.custom-control {
    position: absolute;
    bottom: 30px;
    left: 10px;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
}

#campingSelect {
    min-width: 320px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
}

/* Apply the same styling to #datasetSelect as is used for the Schnellauswahl dropdown, for a consistent look */
#datasetSelect {
  display: inline-block;
  min-width: 220px;
  max-width: 100%;
  padding: 8px 12px;
  font-size: 1.1em;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #fff;
  color: #222;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin: 10px 0 18px 0;
  font-family: inherit;
}
#datasetSelect:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px #007bff33;
}

/* Custom Modal Styling for reduced padding */
.modal-header {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.modal-body {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.modal-footer {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.modal-content {
    max-height: 85vh; /* Slightly increased max-height due to reduced padding */
    overflow-y: auto;
    /* padding-right: 15px; Bootstrap handles scrollbar padding */
}

.slider-container { 
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.criteria-label { 
    min-width: 200px;
    font-weight: bold;
}

table { 
    border-collapse: collapse; 
    margin-top: 20px;
    width: 100%;
}

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

th { 
    background: #f8f9fa; 
    cursor: pointer;
    white-space: nowrap;
}

.data-sheet h2 { 
    margin-top: 0; 
    color: #2c3e50;
}

.data-sheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.score-badge {
    background: #e3f2fd;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    margin: 5px;
    font-size: 0.9em;
}

.name-col {
    min-width: 220px;
    text-align: left;
    white-space: nowrap;
}

.modal-backdrop.top {
    z-index: 1003;
    background: rgba(0,0,0,0.7);
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
}

@media (min-width: 1200px) {
    .modal { width: 80%; }
    #comparisonTable { font-size: 0.95em; }
}

/* Custom class to ensure body doesn't scroll when modals are open */
body.modal-open-custom {
    overflow: hidden;
}

/* Styles for score bar charts in modal */
.score-criterion-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px; /* Adjusted for a bit more space */
    padding: 2px 0;
}
.score-criterion-label {
    min-width: 160px; /* Adjusted for potentially longer labels with emojis */
    font-size: 0.9em;
}
.score-bar-container {
    flex-grow: 1;
    height: 18px; /* Slightly reduced height */
    background-color: #e9ecef; /* Bootstrap light grey, good for track */
    border: 1px solid #ced4da; /* Bootstrap border color */
    border-radius: .25rem; /* Bootstrap border radius */
    margin-left: 10px;
    position: relative; /* For absolute positioning of the value bar */
    overflow: hidden; /* Ensures value bar stays within container */
}
.score-bar-value {
    height: 100%;
    background-color: #007bff; /* Bootstrap primary blue */
    /* Text properties removed as text will be beside the bar */
    display: block; /* Changed from flex */
    border-radius: .20rem; /* Slightly smaller radius than container */
}
.score-value-text-only {
    margin-left: 10px;
    font-size: 0.9em;
    font-weight: bold;
}
.score-value-beside-bar {
    margin-left: 10px;
    font-size: 0.85em;
    min-width: 55px; /* Adjusted for "X.X / XX" */
    text-align: left;
    color: #495057; /* Bootstrap secondary text color */
}

/* For text-only scores like Preis */
.score-value-text-only {
    font-weight: bold;
    font-size: 0.85em;
    padding-left: 5px; /* Align with bar text values */
}

/* Styling for when a modal is shown on top of another */
/* Bootstrap should handle this by default if modals are opened sequentially */
/* If issues persist, specific z-index adjustments might be needed here or in JS */

/* Hide bullets in Steckbrief lists */
#dataSheetBody ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}
#dataSheetBody ul li {
    margin-left: 0;
}
.custom-control {
    background: rgba(255,255,255,0.5);
    border-radius: 8px;
    padding: 4px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: inline-block;
    position: absolute;
    left: 6px;
    bottom: 6px;
    top: auto;
    margin-bottom: 0;
    margin-top: 0;
}

/* Fix Vergleichstabelle modal cutoff and centering on wide screens */
#compareModal .modal-dialog {
    max-width: 100vw;
    width: 100vw;
    margin: 0 auto;
    left: 0;
    right: 0;
    position: fixed;
}
#compareModal .modal-content {
    max-width: 100vw;
    width: 100vw;
    min-width: 0;
    overflow-x: auto;
    box-sizing: border-box;
    margin: 0 auto;
    border-radius: 0.5rem;
}
#compareModal .modal-body {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    box-sizing: border-box;
}
@media (min-width: 1200px) {
  #compareModal .modal-dialog {
    max-width: 98vw;
    width: 98vw;
  }
  #compareModal .modal-content {
    max-width: 98vw;
    width: 98vw;
  }
}
#comparisonTable td[data-score], #comparisonTable th[data-key] {
    transition: background 0.3s;
}
#comparisonTable tbody tr:hover {
    outline: 2px solid #2980b9;
    outline-offset: -2px;
    z-index: 2;
    position: relative;
}

/* Make the first column (Name) sticky in the comparison table */
#comparisonTable .name-col, #comparisonTable th.name-col {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    box-shadow: 2px 0 6px -2px rgba(0,0,0,0.06);
}
#comparisonTable th.name-col {
    z-index: 4;
}
#comparisonTable td.name-col {
    z-index: 3;
}
/* Ensure sticky column stays above row hover outline */
#comparisonTable tbody tr:hover .name-col {
    z-index: 5;
}

/* Kommentar unter Name in Vergleichstabelle */
.camp-comment {
    font-size: 0.85em;
    color: #888;
    margin-top: 2px;
    white-space: pre-line;
    max-width: 220px;
    word-break: break-word;
}

/* Leaflet scale bar custom styling */
.leaflet-control-scale {
    background: rgba(255,255,255,0.92);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    padding: 2px 10px 2px 10px;
    font-size: 1em;
    font-family: 'Nunito', sans-serif;
    border: 1px solid #e0e0e0;
    margin-bottom: 18px;
    margin-right: 10px;
}
.leaflet-control-scale-line {
    background: #f8f9fa;
    color: #222;
    border: 1px solid #bbb;
    border-radius: 4px;
    box-shadow: none;
    height: 18px;
    line-height: 18px;
    font-weight: 600;
}