body {
  font-family: "Roboto", sans-serif;
  margin: 3% 4%;
  background-color: #adcb93;
}

#bg {
  position: fixed;
  width: 100%;
  height: 100vh;
  top: 0;
  left: 0;
  background-image: url(img/solaranlage.jpeg);
  z-index: -1;
  background-size: cover;
  background-position: bottom;
  opacity: 0.4;
}

#intro {
  padding: 3px 14px;
  margin-top: 1rem;
  background-color: #dce9efb0;
  border-radius: 10px;
}

#intro .lead {
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
}

/* Species intro section - same styling as main intro */
#species-intro {
  padding: 3px 14px;
  margin-top: 2rem;
  margin-bottom: 1rem;
  background-color: #dce9efb0;
  border-radius: 10px;
}

#species-intro .lead {
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
}

/* Category intro text (e.g. for Species-based ES) */
.category-intro {
  padding: 3px 14px;
  margin: 2rem 0 1rem 0;
  background-color: #dce9efb0;
  border-radius: 10px;
}

.category-intro .lead {
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
}

.guidance-box {
    background: #ecf4f6a3;
    border-radius: 8px;
    padding: 0.5em 1.1em;
    margin-bottom: 0.8em;
}

.guidance-box ul {
    list-style: none;
    padding-left: 0;
}
.guidance-box ul li:not(:last-child) {
    margin-bottom: 1.2em;
}

.guidance-box ul li {
    counter-increment: guidance-counter;
    padding-left: 2.8em;
    position: relative;
}

.guidance-box ul li::before {
    content: "i";
    position: absolute;
    left: 0;
    width: 1.5em;
    height: 1.5em;
    background: #3d77c2;
    color: #fff;
    font-weight: bold;
    font-size: 1.2em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    top: -3px;
}

.lead,
#intro p,
.guidance-box,
#species-intro p,
.category-intro p {
  max-width: 900px;
}

#es-list {
  position: relative;
  z-index: 1;
}

#es-list ul {
  list-style-type: none;
  margin: 0 0 12px 0;
  padding: 0;
}

#es-list > ul > li {
  padding: 3px 14px;
  margin-top: 1rem;
  background-color: #f6fae89e;
  border-radius: 10px;
}

h1 {
  max-width: 900px;
}

h2 {
  font-weight: normal;
}

h3 {
  color: #0055aa;
}

#es-list ul.subservices {
  padding: 15px 0;
  background-color: #e9f0e4;
  border-radius: 7px;
  border: solid 1px #a5bb93;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
}

.subservice {
  margin-bottom: 1rem;
}

.subservice h4 {
  margin: 0 0 5px 0;
  font-size: 1.1em;
  color: var(--color-accent);
}

.subservice p {
  margin: 3px 0 6px 0;
  padding: 0;
  font-size: 0.9em;
  max-width: 700px;
}

.subservice input[type="radio"] {
  margin: 0 2px 0 0;
}

input[type="checkbox"] {
  margin: 0 3px 0 0;
}

input[type="range"] {
  margin: 5px 5px 0 0;
  width: 100%;
}

.subservice:not(:first-of-type) {
  border-top: solid 1px #99c573;
  padding: 15px 0px 0px 0px;
}

li.subservice {
  margin: 5px 18px;
}

.es {
  display: flex;
  justify-content: space-between;
}



.subservices button {
  font-size: 0.9em;
  background-color: var(--color-accent);
  color: #fff;
  border: none;
  padding: 6px 9px;
  border-radius: 4px;
  cursor: pointer;
}

button.review-btn {
  background-color: var(--color-primary);
  margin: 0;
  font-size: 0.9em;
  padding: 6px 12px;
}

.review-btn-bottom {
  justify-self: end;
  margin-left: 0;
  margin-right: 0;
}

.review-btn-bottom-li {
  text-align: right;
  padding: 0px 18px 0px 18px;
}
.landcover-container {
  box-sizing: border-box;
  width: 100%;
  margin: 8px 0; 
  padding: 10px 12px; 
  border-radius: 8px; 
  background-color: #fcfffb;
  box-shadow: 0 0 0 1px #cbd6c2; 
}

.landcover-container.active {
  background-color: #f5fbf1;
  /* box-shadow stays the same */
}

.landcover-container.show {
  display: block;
}

.landcover-container label {
  font-weight: 700;   /* make labels bold */
  display: block;
  margin-top: 6px;
}

.landcover-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 8px 0 15px 0;
}

li.add-custom-impact-btn,
li.custom-impact-input {
  margin: 5px 18px;
  border-top: solid 1px #99c573;
  padding: 10px 0px 5px 0;
}

input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 5px;
  border-radius: 4px;
  border: solid 1px #99c573;
}

.add-custom-impact-btn-li,
.custom-impact-input-wrapper,
.custom-impact-input {
  margin-top: 12px;
  margin-bottom: 12px;
}

.add-custom-impact-btn-li button,
.add-impact-btn,
.custom-impact-input-wrapper button,
.custom-impact-input button {
  margin-top: 0;
  margin-bottom: 0;
}

/* --- Custom Impact Button & Input Wrapper Abstand wie v5 (margin-left: 18px) --- */
.add-custom-impact-btn-li,
.custom-impact-input-wrapper,
li.add-custom-impact-btn,
li.custom-impact-input {
  margin-left: 18px;
  margin-right: 18px;
}

/* Optional: Abstand zu den Subservice-Items erhöhen */
.custom-impact-input-wrapper input,
.custom-impact-input input {
  margin-bottom: 4px;
}

@media (max-width: 600px) {
  .landcover-block {
    grid-template-columns: 1fr;
  }
}

.slider-container {
  margin-bottom: 2px;
}

.slider-container span {
  font-size: 0.9em;
  vertical-align: 3px;
}

.slider-container label {
  margin-top: 2px;
}

.slider-value {
  display: block;
  margin: 0 0 7px 0;
  font-size: 0.9em;
}

.es-group-header {
  cursor: pointer;
  border: solid 1px #a5bb93;
  border-radius: 6px;
  padding: 14px 18px 10px 18px;
  margin-top: 10px;
  background-color: #ffffffb3;
}

.es-group-header-top:hover h3 {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.es-group-header.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.es-group-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;

  border-radius: 6px;
}

.es-group-header h3 {
  margin: 0;
}

span.progress-title {
  color: #6486be;
  font-size: 0.8em;
  padding-right: 4px;
}

.progress-bar-container {
  display: inline-block;
  vertical-align: middle;
  width: 50px;
  height: 14px;
  background: #e0ecdb;
  border-radius: 3px;
  border: 1px solid #ccc;
  position: relative;
  margin-left: 0;
}

.progress-bar-fill {
  height: 100%;
  background: #5b90e8;
  border-radius: 3px;
  transition: width 0.3s;
  width: 0%;
}

.progress-bar-label {
  display: none;
  /* Hide the label by default */
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  font-size: 10px;
  color: #222;
  text-align: center;
  line-height: 14px;
  pointer-events: none;
}

.multibox-row {
  position: relative;
  display: flex;
  margin: 8px 0 2px 0;
  border-radius: 4px;
  overflow: hidden;
  border: solid 1px #a5bb93;
}

.multibox {
  height: 20px;
  background: #e9f0e4;
  cursor: pointer;
  transition: background 0.15s, border 0.15s;
  display: inline-block;
  flex-grow: 1;
  opacity: 0.8;
}

.multibox:not(:last-child) {
  border-right: 1px solid #adadad;
}

.multibox.selected {
  background: #b7e0b7;

  opacity: 1;
}

.multibox:hover {
  opacity: 1;
}

.multibox-value {
  margin: 4px 0 0 0;
  font-size: 0.93em;
  color: #333;
  min-height: 1.5em;
}

/* Multiboxen nach Skala einfärben */
.multibox.selected.multibox-strongly-decreases {
  background: var(--color-strongly-decreases);
}

.multibox.selected.multibox-moderately-decreases {
  background: var(--color-moderately-decreases);
}

.multibox.selected.multibox-slightly-decreases {
  background: var(--color-slightly-decreases);
}

.multibox.selected.multibox-slightly-increases {
  background: var(--color-slightly-increases);
}

.multibox.selected.multibox-moderately-increases {
  background: var(--color-moderately-increases);
}

.multibox.selected.multibox-strongly-increases {
  background: var(--color-strongly-increases);
}

/* Neutral (No PV impact) - gray */
.multibox.selected.multibox-neutral {
  background: #e0e0e0 !important;
  border-color: #918f8f !important;
  color: #444 !important;
}

/* Tooltip für Landcover-Boxen */
.custom-tooltip {
  position: absolute;
  z-index: 1000;
  background: #fffbe6;
  color: #333;
  border: 1px solid #b5b5b5;
  border-radius: 2px;
  padding: 3px 6px;
  font-size: 0.95em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  white-space: pre-line;
  display: none;
  max-width: 200px;
}

.es-info {
  position: relative;
  max-width: 900px;
}

.info-icon {
  display: inline-block;
  width: 15px;
  height: 15px;
  color: #747474;
  border: solid 1px #7d7d7d;
  box-shadow: inset 0px 0px 0px 1px rgb(0 0 0 / 40%);
  border-radius: 50%;
  text-align: center;
  line-height: 16px;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  margin-left: 5px;
  vertical-align: 1px;
}

.infotext {
  display: none;
  font-size: 0.8em;
  color: #666;
  margin-top: 4px;
  font-style: italic;
  max-width: 700px;
}

.infotext.visible {
  display: block;
}

.chart-container {
  width: 100%;
  max-width: 900px;
  margin-top: 30px;
  margin-bottom: 20px;
}

#personal-info {
  padding: 3px 14px;
  margin-top: 1rem;
  background-color: #dce9efb0;
  border-radius: 10px;
}

#personal-info label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

#personal-info input[type="text"],
#personal-info input[type="email"] {
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  padding: 5px;
  border-radius: 4px;
  border: solid 1px #99c573;
  margin-bottom: 14px;
  font-size: 1em;
}

#personal-info form > div {
  margin-bottom: 10px;
}

.send-success-msg,
.send-error-msg {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: none;
  max-width: 90vw;
  text-align: center;
}

.send-success-msg {
  background: #e6fbe6;
  color: #2b6e2b;
  border: 1px solid #a5bb93;
}

.send-error-msg {
  background: #ffeaea;
  color: #a94442;
  border: 1px solid #e0b4b4;
}

/* Consent Modal Styles */
.modal-overlay {
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 50, 60, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
}

.modal-content {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  max-width: 540px;
  width: 92vw;
  max-height: 90vh;
  padding: 32px 28px 22px 28px;
  position: relative;
  font-size: 1.05em;
  color: #2a2a2a;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 1.45em;
  color: #0055aa;
  font-weight: 600;
}

.modal-content h3 {
  font-size: 1.1em;
  margin-bottom: 0.5em;
  color: #3a5c8c;
}

.modal-scroll {
  overflow-y: auto;
  max-height: 48vh;
  margin-bottom: 1.2em;
  padding-right: 4px;
}

.modal-content ul {
  padding-left: 1.2em;
  margin-top: 0.2em;
}

.modal-content li {
  margin-bottom: 0.4em;
}

.consent-btn {
  background: var(--color-accent, #6486be);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.08em;
  font-weight: 500;
  padding: 12px 28px;
  margin: 0 auto;
  display: block;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: background 0.18s;
}

.consent-btn:hover,
.consent-btn:focus {
  background: #4a6ea8;
}

@media (max-width: 600px) {
  .modal-content {
    padding: 16px 6vw 16px 6vw;
    max-width: 98vw;
  }

  .modal-scroll {
    max-height: 54vh;
  }
}

/* Style for the sector select dropdown in the personal info form */
#personal-info-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #f7f7fa;
  border: 1.5px solid #bfc6d1;
  border-radius: 6px;
  padding: 0.5em 2.2em 0.5em 0.9em;
  font-size: 1em;
  font-family: "Roboto", Arial, sans-serif;
  color: #222;
  transition: border-color 0.2s;
  box-shadow: 0 1px 2px rgba(60, 60, 80, 0.04);
  margin-top: 0.2em;
  margin-bottom: 0.8em;
  min-width: 260px;
  max-width: 100%;
  outline: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 7.293a1 1 0 011.414 0L10 8.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.8em center;
  background-size: 1.2em;
}

#personal-info-form select:focus {
  border-color: #4a90e2;
  background-color: #fff;
}

#personal-info-form label[for="pi-sector"] {
  font-weight: 500;
  color: #2a2a2a;
  margin-bottom: 0.2em;
  display: inline-block;
}

#personal-info-form option {
  color: #222;
}

@media (max-width: 600px) {
  #personal-info-form select {
    min-width: 100%;
  }
}

/* --- "I can't tell" Button als schöner Kasten, rechtsbündig --- */
.cant-tell-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 12px;
  margin: 8px 0;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  cursor: pointer;
  background-color: transparent;
  transition: background-color 0.2s, border-color 0.2s;
}

.cant-tell-wrapper:hover {
  background-color: #f5fbf1; /* Slightly lighter background on hover */
  border-color: #3d77c2; /* Change border color on hover */
}

.cant-tell-wrapper input[type="checkbox"] {
  margin-right: 10px;
}

.landcover-container .cant-tell-label {
    font-weight: normal;
    font-size: 0.93em;
    color: #333;
    cursor: pointer;
    margin-top: 0;
}

/* Selected state - when checkbox is checked */
.cant-tell-wrapper:has(input[type="checkbox"]:checked) {
  background-color: #3d77c2;
  border-color: #3d77c2;
  color: #fff;
}

.cant-tell-wrapper:has(input[type="checkbox"]:checked) .cant-tell-label {
  color: #fff;
}

/* --- "I don't know" (LULC-level) - Distinct styling --- */
.dont-know-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 5px 8px;
  margin: 8px 0;
  cursor: pointer;
  background-color: transparent;
  transition: background-color 0.2s;
}

.dont-know-wrapper:hover {
  background-color: #fff8e6; /* Light orange/yellow background on hover */
}

.dont-know-wrapper input[type="checkbox"] {
  margin-right: 10px;
}

.dont-know-label {
  font-size: 1em;
  color: black;  
  cursor: pointer;
}

/* Selected state - when checkbox is checked */
.dont-know-wrapper:has(input[type="checkbox"]:checked) {
  color: #fff;
}

.dont-know-wrapper:has(input[type="checkbox"]:checked) .dont-know-label {
  color: black;
  font-style: normal; 
}

.subservice-cant-tell {
  display: none;
}

.subservice-cant-tell:checked + .cant-tell-label,
.cant-tell-label:active {
  background: #3d77c2;
  color: #fff;
  border-color: #3d77c2;
}

.available-impacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px 12px;
  margin-bottom: 15px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
}

.impact-checkbox-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.impact-checkbox-option:hover {
  background-color: rgba(0, 123, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.impact-checkbox-option input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.impact-checkbox-option .clickable-label {
  flex: 1;
  margin: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  user-select: none;
}

/* Custom input styling */
.custom-impact-simple {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
}

.custom-impact-simple .custom-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.custom-impact-simple .add-custom-btn {
  background-color: var(--color-accent);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.custom-impact-simple .add-custom-btn:hover {
  background-color: #218838;
}

/* Selected impacts styling */
.selected-impacts {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}

.selected-impacts h5 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
  font-size: 16px;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 8px;
  background-color: white;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  transition: box-shadow 0.2s ease;
}

.rank-item:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rank-item .rank-number {
  font-weight: bold;
  color: #007bff;
  margin-right: 8px;
  min-width: 25px;
}

.rank-item .rank-label {
  flex: 1;
  margin-right: 10px;
}

.rank-controls {
  display: flex;
  gap: 4px;
}

.rank-controls button {
  background-color: var(--color-accent);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s ease;
  min-width: 24px;
}

.rank-controls button:disabled {
  background-color: var(--color-accent);
  cursor: not-allowed;
}

.rank-controls .remove {
  background-color: var(--color-strongly-decreases);
  margin-left: 4px;
}

/* Horizontal layout for mechanism checkboxes */
.available-impacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px 12px;
  margin-bottom: 15px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
}

/* Custom input styling */
.custom-impact-simple {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
}

.custom-impact-simple .custom-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.custom-impact-simple .add-custom-btn {
  background-color: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}


/* Selected impacts styling */
.selected-impacts {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}

.selected-impacts h5 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
  font-size: 16px;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* PV impact section styling */
.pv-impact-simple {
  background-color: #fcfffb;
  box-shadow: 0 0 0 1px #cbd6c2; 
  border-radius: 10px;
  padding: 20px;
    margin: 20px 0;
}

.pv-impact-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.pv-impact-description {
  color: #666;
  margin-bottom: 15px;
  font-size: 14px;
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .available-impacts {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .impact-checkbox-option .clickable-label {
    font-size: 13px;
  }
  
  .custom-impact-simple {
    flex-direction: column;
  }
  
  .custom-impact-simple .add-custom-btn {
    align-self: flex-start;
  }
}

/* Force hide when "I can't tell" is selected */
.cantell-hidden {
  display: none !important;
}

/* Species block styling - similar to landcover blocks */
.species-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 8px 0 15px 0;
}

@media (max-width: 600px) {
  .species-block {
    grid-template-columns: 1fr;
  }
}
