/* static/css/components/investment-calculator.css */
/* Investment Calculator Component */
.investment-calculator {
  padding: clamp(2rem, 8vw, 4rem) 0;
  padding-bottom: 0%;
  background: var(--bg-primary);
}

.investment-calculator__title {
  color: #FFF;
  text-align: center;
  font-family: var(--font-family);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: clamp(2rem, 6vw, 4rem);
}

.investment-calculator__container {
  display: flex;
  align-items: flex-start;
  gap: clamp(2rem, 8vw, 5rem);
  align-self: stretch;
}

/* Form Section */
.investment-calculator__form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2rem);
  min-width: 320px;
}

/* Input Components */
.calculator-input {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 2vw, 1rem);
}

.calculator-input__label {
  color: #F0FEFF;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 600;
  line-height: 1.2;
}

.calculator-input__wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.calculator-input__field {
  display: flex;
  padding: clamp(0.75rem, 3vw, 1rem) clamp(1rem, 4vw, 1.5rem);
  justify-content: flex-start;
  align-items: center;
  flex: 1;
  border-radius: 42.328px;
  border: 0.847px solid #040548;
  background: radial-gradient(50.91% 97.54% at 50% 2.46%, #FFF 0%, #FFF 100%);
  box-shadow: 0px 17.778px 33.27px rgba(132, 0, 255, 0.33);
  
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  font-weight: 500;
  color: #1a1a1a;
  outline: none;
  transition: all 0.3s ease;
}

.calculator-input__field:focus {
  border-color: #EB1260;
  box-shadow: 0px 17.778px 33.27px rgba(235, 18, 96, 0.4);
}

.calculator-input__field::placeholder {
  color: #999;
  font-weight: 400;
}

/* Dropdown Specific */
.calculator-input__field--dropdown {
  appearance: none;
  cursor: pointer;
  padding-right: 3rem;
}

.calculator-input__dropdown-icon {
  position: absolute;
  right: 1.5rem;
  color: #666;
  pointer-events: none;
  transition: transform 0.3s ease;
}

.calculator-input__field--dropdown:focus + .calculator-input__dropdown-icon {
  transform: rotate(180deg);
}

/* Currency Selector */
.calculator-input__currency {
  position: absolute;
  right: 1rem;
  display: flex;
  align-items: center;
}

.calculator-input__currency-select {
  background: transparent;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #EB1260;
  cursor: pointer;
  outline: none;
  appearance: none;
  padding-right: 1rem;
}

/* Period Selector */
.calculator-input__period {
  position: absolute;
  right: 1rem;
  display: flex;
  align-items: center;
}

.calculator-input__period-select {
  background: transparent;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  outline: none;
  appearance: none;
}

/* Calculate Button */
.calculator-btn {
  display: flex;
  padding: clamp(0.75rem, 3vw, 1rem) clamp(1rem, 4vw, 1.5rem);
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border-radius: 42.328px;
  border: 0.847px solid #EB1260;
  background: radial-gradient(50.91% 97.54% at 50% 2.46%, #7B1B3D 0%, #EB1260 100%);
  
  color: #E3E1EB;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  font-weight: 500;
  line-height: 1.5;
  
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.calculator-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0px 20px 40px rgba(235, 18, 96, 0.4);
}

.calculator-btn:active {
  transform: translateY(0);
}

/* Exchange Rate Display */
.calculator-exchange {
  padding: 0.5rem 1rem;
  background: rgba(240, 254, 255, 0.1);
  border-radius: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.calculator-exchange__text {
  color: #F0FEFF;
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
}

/* Chart Section */
.investment-calculator__chart {
  flex: 2;
  min-width: 0;
}

.calculator-chart {
  width: 100%;
  max-width: 800px;
  height: clamp(400px, 50vw, 528px);
  border-radius: 25.397px;
  border: 0.847px solid #EB1260;
  background: rgba(235, 18, 96, 0.15);
  padding: clamp(1rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.calculator-chart__header {
  text-align: center;
}

.calculator-chart__profit-label {
  color: #FFF;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  font-weight: 500;
  margin: 0 0 0.5rem 0;
}

.calculator-chart__profit-amount {
  color: #FFF;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: normal;
  transition: all 0.3s ease;
}

.calculator-chart__container {
  flex: 1;
  position: relative;
  min-height: 300px;
}

#investment-chart {
  width: 100% !important;
  height: 100% !important;
}

/* Chart Legend */
.calculator-chart__legend {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.calculator-legend {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.calculator-legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calculator-legend__indicator {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid;
}

.calculator-legend__indicator--investment {
  background: rgba(235, 18, 96, 0.15);
  border-color: rgba(235, 18, 96, 0.15);
}

.calculator-legend__indicator--return {
  background: #EB1260;
  border-color: #EB1260;
}

.calculator-legend__label {
  color: #FFF;
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.75rem, 2vw, 1rem);
  font-weight: 700;
  line-height: normal;
}

/* Updated CSS for ellipsis and responsiveness */
.calculator-input__field--dropdown {
  appearance: none;
  cursor: pointer;
  padding-right: 3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Enhanced dropdown styling for better text handling */
.calculator-input__field--dropdown option {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.5rem;
  color: #1a1a1a;
  background: #fff;
}

/* Mobile responsive dropdown */
@media (max-width: 768px) {
  .calculator-input__field--dropdown {
      font-size: 0.875rem;
      padding-right: 2.5rem;
  }
  
  .calculator-input__dropdown-icon {
      right: 1rem;
  }
}

/* Currency and period selectors with ellipsis */
.calculator-input__currency-select,
.calculator-input__period-select {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
  margin-right: 16px;
}

/* Ensure proper text handling in all input fields */
.calculator-input__field {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calculator-input__field:focus {
  text-overflow: clip; /* Show full text when focused */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .investment-calculator__container {
      gap: 3rem;
      flex-direction: column;
  }
  
  
  .investment-calculator__form {
      min-width: 90%;
      width: 100% ;
  }
}

@media (min-width:1024px) {
  .calculator-btn {
    width: max-content;
  }
}

@media (max-width: 1024px) {
  .investment-calculator__container {
      flex-direction: column;
      gap: 2rem;
  }
  
  .investment-calculator__form {
      min-width: 90%;
      overflow: hidden;
      width: 100%;
  }
  
  .calculator-chart {
      height: 400px;
  }


}

/* Add to static/css/components/investment-calculator.css */

.calculator-details {
  margin: 1rem 0;
  padding: 1rem;
  background: radial-gradient(50.91% 97.54% at 50% 2.46%, #11127C 0%, #040548 100%);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.calculator-details__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.calculator-details__item:last-child {
  margin-bottom: 0;
}

.calculator-details__label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.calculator-details__value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #EB1260;
}

.calculator-input__info {
  margin-top: 0.25rem;
}

.calculator-input__range {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Enhanced Chart Styling to Match Design */
.calculator-chart {
  width: 100%;
  max-width: 800px;
  height: clamp(400px, 50vw, 528px);
  border-radius: 25px;
  border: 1px solid #EB1260;
  background: linear-gradient(135deg, rgba(123, 27, 61, 0.4) 0%, rgba(75, 16, 38, 0.6) 100%);
  padding: clamp(1rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.calculator-chart::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(235, 18, 96, 0.08);
  border-radius: 25px;
  pointer-events: none;
}

.calculator-chart__profit-amount {
  color: #FFF;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: normal;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Dotted underline for profit amount */
.calculator-chart__profit-amount::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: repeating-linear-gradient(
      to right,
      #fff 0,
      #fff 4px,
      transparent 4px,
      transparent 8px
  );
  opacity: 0.6;
}

.calculator-chart__container {
  flex: 1;
  position: relative;
  min-height: 300px;
  z-index: 2;
}

/* Legend styling to match design */
.calculator-legend__indicator--investment {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(123, 27, 61, 0.8);
  border: none;
}

.calculator-legend__indicator--return {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: #EB1260;
  border: none;
}

.calculator-legend {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.calculator-legend__label {
  color: #FFF;
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  font-weight: 600;
  line-height: normal;
}

/* Theme Variants */
[data-theme="light"] .investment-calculator {
  background: var(--light-bg-primary);
}

[data-theme="light"] .investment-calculator__title {
  color: var(--light-text-primary);
}

[data-theme="light"] .calculator-input__label {
  color: var(--light-text-primary);
}

[data-theme="light"] .calculator-exchange__text {
  color: var(--light-text-secondary);
}

[data-theme="light"] .calculator-chart__profit-label,
[data-theme="light"] .calculator-chart__profit-amount,
[data-theme="light"] .calculator-legend__label {
  color: var(--light-text-primary);
}