.calc-main-container {
    width: 95%;
    display: flex;
    align-items: flex-start;
    margin: auto;
}

.calculator-section {
    width: 900px;
}

.chart-section {
    flex: 1;
}


/* --- Calculation type selection --- */
.calc-type-buttons {
    display: flex;
    gap: 8px;
    margin: 0 0 6px;
    padding: 4px;
    justify-content: flex-start;
}

.type-btn {
    padding: 8px 16px;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 14px;
    background-color: #FAFAFA;
    border: 1px solid #E5E7EB;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    color: #6B7280;
    border-radius: 4px;
    white-space: nowrap;
}

.type-btn:hover {
    background-color: #F3F4F6;
}

.type-btn.active {
    background-color: #F8F8FF;
    border-color: #2563EB;
    color: #111111;
}


/*--- Panels and forms ---*/

.toggle-panel-container {
    padding: 16px 8px;
    border-radius: 16px;
    margin-bottom: 200px;
}

.panels-container {
    border: 1px solid #E5E7EB;
    padding: 8px;
    margin-bottom: 200px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

.comparison-toggle-wrapper {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.comparison-toggle-wrapper span {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
}

/* Switch container */
.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 16px;
}

/* Hide default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.2s;
  border-radius: 22px;
}

/* Circle */
.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

/* Checked state */
.switch input:checked + .slider {
  background-color: #28a745; /* green */
}

.switch input:checked + .slider:before {
  transform: translateX(16px);
}


.scenarios-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#compare-scenario {
    display: none;
}

#compare-scenario.active {
    display: flex;
}

#base-scenario {
    border-radius: 8px;
    border: 1px solid #3498db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

#compare-scenario {
    border-radius: 8px;
    background: #F9FAFB;
    border: 1px solid #e74c3c;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.06);
}


.scenario-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.input-group-wrapper {
    display: flex;
    flex-direction: column;
}

.results-wrapper {
    display: flex;
    flex-direction: column;
}

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    width: 100%;
}

.input-group label {
    width: 120px;
    min-width: 120px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    height: 100%;
}

.input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
}


.input-wrapper input,
.input-wrapper select {
    width: 140px;
    padding: 8px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    font-family: "Inter", sans-serif;
    text-align: right;
}

.input-group-addon {
    margin-left: 8px;
    color: #6B7280;
    font-weight: 600;
    font-size: 14px;
    font-family: "Inter", sans-serif;
    line-height: 1;
}

.solve-btn {
    width: 140px;
    padding: 8px 12px;
    border: 1px solid #2563EB;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #373A40;
    background: #F8FAFC;
    outline: none;
    font-family: "Inter", sans-serif;
}

.solve-btn:hover {
    background-color: #2563EB;
    color: #F8FAFC;
}

/* Hide diff fields in base results */
#base-results .result-diff {
    visibility: hidden;
    height: 0;
    margin: 0;
}

/* Show diff fields in compare results */
#compare-results .result-diff {
    visibility: visible;
    height: auto;
}

.trend-arrow {
    font-size: 16px;
    font-weight: bold;
    margin-right: 8px;
}

.trend-arrow.up {
    color: #22c55e;
}

.trend-arrow.down {
    color: #ef4444;
}

.trend-arrow.neutral {
    color: #6b7280;
}





.chart-section {
    margin: 120px 20px 20px 50px;
    /*box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    border: 1px solid #E5E7EB; */
}

.pre-wrap {
    white-space: pre-wrap;      /* wrap lines */
    word-break: break-word;     /* break long words */
}