
/* REssETt & BAaSssE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f2f5;
  color: #333;
}
.container {
  width: 95%;
  max-width: 1200px;
  margin: 20px auto;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  padding: 20px 30px;
}

/* HEADER */
header h1 {
  text-align: center;
  margin-bottom: 15px;
  color: #2c3e50;
}
header p {
  font-size: 1.05em;
  color: #7f8c8d;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 15px;
}

/* NAVIGATION TABS */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 25px;
}
.tablink {
  background: #ecf0f1;
  border: none;
  padding: 12px 18px;
  margin: 3px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
  color: #2c3e50;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}
.tablink.active {
  background: #2980b9;
  color: #fff;
}
.tablink:hover {
  background: #bdc3c7;
}

/* TAB CONTENT */
.tabcontent {
  display: none;
  margin-top: 10px;
}
.tabcontent h2 {
  margin-bottom: 10px;
}
.tabcontent p {
  margin-bottom: 10px;
  line-height: 1.4;
}

/* FORM & BUTTONS */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.form-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  position: relative;
}
.form-item label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
  position: relative;
}
.form-item select,
.form-item input[type="range"] {
  padding: 6px;
  border: 1px solid #bdc3c7;
  border-radius: 4px;
  font-size: 1em;
}
.form-item span {
  margin-top: 3px;
  font-weight: 600;
  color: #e74c3c;
}
.buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}
.buttons-row button {
  background-color: #2980b9;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-size: 1em;
}
.buttons-row button:hover {
  background-color: #1c5980;
  transform: translateY(-2px);
}

/* LEVEL CARDS (Inputs Tab) */
.input-card {
  background-color: #f7f9fc;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}
.input-card h2 {
  margin-bottom: 10px;
  color: #2c3e50;
}
.input-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.input-level-card {
  background-color: #fff;
  border: 1px solid #bdc3c7;
  border-radius: 8px;
  padding: 15px;
  flex: 1 1 300px;
}
.input-level-card h3 {
  margin-bottom: 10px;
  font-size: 1.1em;
  color: #2c3e50;
}
.input-level-card .reference {
  font-size: 0.9em;
  color: #7f8c8d;
  margin-left: 5px;
}
.input-level-card .options label {
  display: block;
  margin-bottom: 5px;
}

/* INFO BUTTONS & TOOLTIP TEXT */
.info-container {
  position: relative;
  display: inline-block;
}
.info-button {
  background: none;
  border: none;
  padding: 0;
  margin-left: 5px;
  cursor: pointer;
}
.info-button i {
  width: 16px;
  height: 16px;
  color: #2980b9;
}
.tooltip-text {
  visibility: hidden;
  width: 240px;
  background-color: #2c3e50;
  color: #fff;
  text-align: left;
  padding: 10px;
  border-radius: 6px;
  position: absolute;
  z-index: 10;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}
.info-container:hover .tooltip-text,
.info-container:focus-within .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* ATTRIBUTES */
.attributes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px;
}
.attribute-card {
  background-color: #f7f9fc;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: flex-start;
  width: calc(33.33% - 20px);
  margin-bottom: 20px;
  position: relative;
}
.attribute-icon {
  margin-right: 15px;
  display: flex;
  align-items: center;
  position: relative;
}
.attribute-icon svg {
  width: 24px;
  height: 24px;
  cursor: pointer;
}
.tooltip {
  visibility: hidden;
  width: 240px;
  background-color: #2c3e50;
  color: #fff;
  text-align: left;
  padding: 10px;
  border-radius: 6px;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}
.attribute-card:hover .tooltip,
.attribute-card:focus-within .tooltip {
  visibility: visible;
  opacity: 1;
}
.attribute-content h4 {
  margin-bottom: 6px;
  color: #2c3e50;
  font-size: 1em;
}
.attribute-content p {
  color: #7f8c8d;
  font-size: 0.95em;
}

/* CHARTS */
canvas {
  margin-top: 10px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.chart-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.chart-box {
  flex: 1 1 45%;
  padding: 10px;
  background: #fafafa;
  border: 1px solid #ccc;
  border-radius: 6px;
  position: relative;
}
.chart-box h3 {
  text-align: center;
  margin-bottom: 8px;
  color: #2c3e50;
}

/* COSTS & BENEFITS */
.calculation-info {
  background-color: #f9f9f9;
  border-left: 4px solid #2980b9;
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
}
.cost-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
}
.cost-card {
  background-color: #f7f9fc;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 15px;
  width: calc(33.33% - 20px);
  margin-bottom: 20px;
  position: relative;
}
.cost-card h4 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 1em;
}
.cost-card p {
  color: #7f8c8d;
  font-size: 0.95em;
  margin: 0;
}

/* RESULTS in Inputs Tab */
#inputResults {
  margin-top: 20px;
}

/* MODAL STYLES */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 8px;
  position: relative;
}
.close-button {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close-button:hover,
.close-button:focus {
  color: #000;
}

/* SCENARIOS TABLE */
.table-container {
  overflow-x: auto;
}
#scenarioTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}
#scenarioTable th,
#scenarioTable td {
  border: 1px solid #bdc3c7;
  padding: 10px;
  text-align: center;
}
#scenarioTable th {
  background-color: #2980b9;
  color: #fff;
  font-weight: 600;
}
#scenarioTable tr:nth-child(even) {
  background-color: #f2f2f2;
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
  .attribute-card, .cost-card {
    width: calc(50% - 20px);
  }
}
@media (max-width: 768px) {
  .tabs {
    flex-direction: column;
  }
  .tablink {
    width: 100%;
    text-align: left;
    border-radius: 0;
  }
  .form-grid, .input-cards {
    grid-template-columns: 1fr;
  }
  .chart-box {
    flex: 1 1 100%;
  }
  .attributes-list, .cost-cards {
    flex-direction: column;
  }
}
  
/* FOOTER */
footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9em;
  color: #7f8c8d;
  border-top: 1px solid #ecf0f1;
  padding-top: 20px;
}
