/* ===== EARNINGS CALCULATOR STYLES ===== */
.earnings-calculator-section {
  width: 100%;
  background: transparent;
  position: relative;
  z-index: 1;
}

.calculator-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 60px;
}

.calculator-title {
  font-family: "Manrope", sans-serif;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: #ffffff;
  margin-bottom: 60px;
  letter-spacing: -0.02em;
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 660px;
  gap: 32px;
  align-items: center;
  height: 100%;
}

/* ===== LEFT PANEL - CONTROLS ===== */
.calculator-left-panel {
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  height: 100%;

  background: radial-gradient(
    113.26% 113.26% at 50% 100%,
    #1b1f23 0%,
    #22272c 100%
  );
  border-image-source: linear-gradient(180deg, #2e3237 0%, #101214 100%);
  border-image-slice: 1;
}

.calculator-control {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-label {
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #e6e7e8;
  letter-spacing: 0.01em;
}

.control-value {
  font-family: "Manrope", sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #0cf19e;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.calculator-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  position: relative;
}

.calculator-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  background: #0cf19e;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(12, 241, 158, 0.4);
  transition: all 0.2s ease;
}

.calculator-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(12, 241, 158, 0.6);
}

.calculator-slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  background: #0cf19e;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 12px rgba(12, 241, 158, 0.4);
  transition: all 0.2s ease;
}

.calculator-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(12, 241, 158, 0.6);
}

/* Slider track fill effect - removed to allow inline styles to work */

.period-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.period-labels span {
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}

.period-labels span.active {
  color: #0cf19e;
  font-weight: 600;
}

/* Property Blocks Visualization */
.property-blocks-container {
  background: #1b1f23;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0px 12px 24px 0px #0b0c0d66;
  border: 1px solid #2e3237;
}

.blocks-title {
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  margin-bottom: 24px;
}

.blocks-title span {
  font-weight: 600;
}
.property-blocks-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
}

.property-block {
  height: 60px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.property-block.owned {
  background: #0cf19e;
  box-shadow: 0 2px 8px rgba(12, 241, 158, 0.3);
}

/* ===== RIGHT PANEL - RESULTS ===== */
.calculator-right-panel {
  background: radial-gradient(
    159.71% 159.71% at 50% -59.71%,
    #06c485 0%,
    #04241b 100%
  );

  border-image-source: linear-gradient(180deg, #06c485 0%, #04241b 100%);
  border-image-slice: 1;
  border-radius: 24px;
  padding: 32px 32px 0px 32px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-height: 100%;
}

.total-return-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid #0d5b45;
}

.return-label {
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #e6e7e8;
  letter-spacing: 0.01em;
}

.return-value {
  font-family: "Manrope", sans-serif;
  font-size: 56px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.gains-breakdown {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.breakdown-title {
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.01em;
}

.gains-row {
  display: flex;
  gap: 24px; /* spacing between items */
}

.gain-item:first-child {
  position: relative; /* needed for ::after positioning */
  padding-right: 24px; /* space for the divider */
}

.gain-item:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background-color: #0d5b45;
}

.gain-label {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
}

.gain-value-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gain-amount {
  font-family: "Manrope", sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.gain-percent {
  background: #97f9d5;
  border-radius: 8px;
  padding: 4px 12px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #083d2f;
}

/* Bar Chart */
.projection-chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  min-height: 300px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  gap: 16px;
  padding-top: 40px;
}

.chart-bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* height: 100%; */
  gap: 2px;
}

.chart-value-label {
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #97f9d5;
  text-align: center;
  white-space: nowrap;
  margin-bottom: 12px;
}

.chart-bar {
  position: relative;
  border-radius: 12px 12px 0px 0px;
  background: radial-gradient(
    170.59% 170.59% at 49.81% 113.45%,
    rgba(8, 61, 47, 0) 0%,
    #0d5b45 100%
  );
  overflow: hidden;
  width: 100%;
  /* max-width: 126px; */
  padding-bottom: 20px;

  display: flex;
  flex-direction: column-reverse;
  min-height: 60px;
  transition: all 0.3s ease;
}

.chart-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px; /* border thickness */
  background: linear-gradient(180deg, #06c485 0%, #04241b 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.chart-bar:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.bar-profit {
  background: linear-gradient(
    to top,
    rgba(12, 241, 158, 0.8),
    rgba(12, 241, 158, 0.95)
  );
  width: 100%;
  transition: height 0.4s ease;
}

.bar-invested {
  background: rgba(255, 255, 255, 0.15);
  width: 100%;
  transition: height 0.4s ease;
}

.chart-year-label {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #b1b5ba;
  text-align: center;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .earnings-calculator-section {
    padding: 0px;
  }

  .calculator-container {
    padding: 0 16px;
  }

  .calculator-title {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .calculator-left-panel {
    padding: 12px;
    gap: 32px;
    border-radius: 12px;
  }

  .calculator-right-panel {
    padding: 16px 16px 0px 16px;
    gap: 12px;
    border-radius: 12px;
    overflow: hidden;
  }

  .control-label {
    font-size: 16px;
  }

  .control-value {
    font-size: 28px;
  }

  .calculator-slider {
    height: 6px;
  }

  .calculator-slider::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }

  .calculator-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }

  .period-labels {
    gap: 4px;
  }

  .period-labels span {
    font-size: 12px;
  }

  .property-blocks-container {
    padding: 12px;
    border-radius: 12px;
  }

  .blocks-title {
    font-size: 16px;
    margin-bottom: 0px;
    font-weight: 400;
    color: #f0f0f0;
  }
  .blocks-title span {
    font-weight: 600;
  }

  .property-blocks-grid {
    gap: 6px;
    margin-bottom: 12px;
  }

  .property-block {
    border-radius: 4px;
  }

  .return-label {
    font-size: 16px;
  }

  .return-value {
    font-size: 28px;
  }

  .breakdown-title {
    font-size: 16px;
    margin-bottom: 0px;
    font-weight: 500;
  }

  .gains-row {
    margin-bottom: 0px;
    flex-direction: column;
  }

  .gain-item {
    gap: 8px;
  }

  .gain-label {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .gain-amount {
    font-size: 20px;
  }

  .gain-percent {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
  }

  .projection-chart {
    min-height: 280px;
  }

  .chart-bars {
    gap: 12px;
    padding-top: 0px;
    overflow-x: auto;
  }

  .chart-bar {
    border-radius: 6px 6px 0 0;
    min-height: 40px;
    padding-bottom: 12px;
  }

  .chart-value-label {
    font-size: 16px;
    margin-bottom: 4px;
    font-weight: 600;
  }

  .chart-value-label span {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-weight: 500;
    font-size: 12px;
  }

  .chart-year-label {
    font-size: 12px;
  }

  .gains-breakdown {
    gap: 12px;
  }

  .total-return-header {
    padding-bottom: 12px;
  }

  .property-block {
    height: 34px;
  }
}
