/**
  * استایل ماشین حساب سود نقره
  * Feature 4
  */

.nh-profit-calculator-wrapper {
  margin: 0 auto;
  height: 100%;
}

.nh-profit-calculator-info {
  background: #f0f8ff;
  border-right: 4px solid #2271b1;
  padding: 15px;
  margin-bottom: 25px;
  border-radius: 4px;
}

.nh-profit-calculator-info p {
  margin: 0;
  font-size: 15px;
}

.nh-profit-calculator-info strong {
  color: #1d2327;
  margin-left: 8px;
}

.nh-profit-calculator-info .nh-current-price {
  font-size: 18px;
  font-weight: bold;
  color: #2271b1;
  margin: 0 5px;
}

/* چیدمان دو ستونی */
.nh-profit-calculator {
  height: 100%;
  display: flex;
  gap: 1.5rem;
}

.nh-profit-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* فیلدهای ورودی */
.nh-profit-field {
  flex: 1;
  background-color: var(--e-global-color-85f3832);
  padding: 1.5rem;
  border-radius: 8px;
}

/* Responsive: در موبایل زیر هم */
@media (max-width: 768px) {
  .nh-profit-calculator {
    flex-direction: column;
  }
}

.nh-profit-field label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 12px;
  gap: 8px;
}

.nh-profit-field label .nh-label-title {
  display: block;
  font-size: 16px;
}

.nh-profit-field label .nh-label-value {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #1b691e;
}

.nh-profit-field label .nh-years-value,
.nh-profit-field label .nh-amount-value {
  font-size: 18px;
}

/* Wrapper برای اسلایدر و دکمه‌ها */
.nh-slider-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* دکمه‌های + و - */
.nh-slider-btn {
  background: none;
  border: none !important;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nh-slider-btn:focus {
  background: none !important;
}
.nh-slider-btn:hover {
  background: none !important;
}

.nh-slider-btn img {
  width: 1.25rem;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.nh-slider-btn:hover img {
  transform: scale(1.1);
}

.nh-slider-btn:active img {
  transform: scale(0.95);
}

.nh-slider-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nh-slider-btn:disabled:hover img {
  transform: none;
}

/* استایل اسلایدرها */
.nh-profit-slider {
  flex: 1;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #c9ba91, #56467a);
  outline: none;
  border-radius: 4px;
  transition: background 0.3s;
}

/* دسته اسلایدر - Chrome/Safari */
.nh-profit-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: #dedede;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0px 1px 1px 0px #201940;
  transition: all 0.3s;
}

.nh-profit-slider::-webkit-slider-thumb:hover {
  background: #dedede;
  transform: scale(1.1);
}

/* دسته اسلایدر - Firefox */
.nh-profit-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: #dedede;
  cursor: pointer;
  border-radius: 50%;
  border: none;
  box-shadow: 0px 1px 1px 0px #201940;
  transition: all 0.3s;
}

/* لیبل‌های اسلایدر */
.nh-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
  color: #666;
}

/* نمایش نتیجه */
.nh-profit-result {
  flex: 1;
  padding: 25px;
  background: var(--e-global-color-primary);
  border-radius: 8px;
  align-content: center;
}

.nh-profit-loading {
  text-align: center;
  font-size: 16px;
  color: #666;
  padding: 30px;
}

.nh-profit-content {
  font-size: 15px;
  line-height: 1.8;
}

.nh-profit-content .nh-result-header {
  color: var(--e-global-color-6ffc7ca);
  font-size: 2.125rem;
  text-align: center;
}

.nh-profit-content .nh-result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.nh-profit-content .nh-result-row:last-child {
  border-bottom: none;
}

.nh-profit-content .nh-result-label {
  color: #666;
  font-weight: 500;
}

.nh-profit-content .nh-result-value {
  font-weight: bold;
  color: #1d2327;
}

/* نمایش سود */
.nh-profit-summary {
  border-radius: 8px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
}

.nh-profit-summary.profit {
  color: #01d320;
}

.nh-profit-summary.loss {
  color: #721c24;
}

.nh-profit-summary .nh-profit-amount {
  font-size: 1.5rem;
  margin: 10px 0;
  display: inline-block;
  background: #f7f7f7;
  color: #1b153b;
  padding: 8px 16px;
  border-radius: 8px;
  min-width: 16rem;
}

.nh-profit-summary .nh-profit-percentage {
  font-size: 20px;
  display: block;
}

/* پیام خطا */
.nh-calculator-error {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-right: 4px solid #ff9800;
  color: #856404;
  padding: 15px;
  border-radius: 4px;
  margin: 15px 0;
  font-size: 15px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .nh-profit-field label {
    font-size: 14px;
  }

  .nh-profit-summary {
    font-size: 16px;
  }

  .nh-profit-summary .nh-profit-percentage {
    font-size: 18px;
  }

  .nh-profit-content .nh-result-row {
    flex-direction: column;
    gap: 5px;
  }
}

/* انیمیشن */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nh-profit-content {
  animation: fadeIn 0.3s ease-in-out;
}
