@font-face {
  font-family: Vazirmatn;
  src: url("../../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../../fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600;
}

.sc-calculator-wrap * {
  box-sizing: border-box;
}

.sc-calculator-wrap {
  margin: 0;
  font-family: Vazirmatn, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.sc-box {
  width: 450px;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #e5e9ef;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  padding: 20px;
}

.sc-title {
  text-align: center;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 16px;
  color: #1f2937;
}

.sc-table {
  width: 100%;
  border-collapse: collapse;
}

.sc-table td {
  padding: 10px 8px; /* کمی کاهش پدینگ برای تراز بهتر */
  border-bottom: 1px solid #edf0f4;
  vertical-align: middle;
}

.sc-table tr:last-child td {
  border-bottom: none;
}

.sc-table td:first-child {
  width: 35%;
  color: #374151;
  font-size: 14px;
}

/* بخش شماره ۱: اصلاح قطعی گردی لبه ها */
.sc-calculator-wrap input,
.sc-calculator-wrap select {
  width: 100% !important;
  padding: 10px 12px !important;
  border: 1px solid #cfd6df !important;
  
  /* گردی ۱۵ پیکسل با اولویت بالا */
  border-radius: 15px !important; 
  -webkit-border-radius: 15px !important;
  -moz-border-radius: 15px !important;

  /* حذف استایل های پیش فرض مرورگر که مانع گرد شدن میشوند */
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;

  font-family: Vazirmatn, sans-serif !important;
  font-size: 14px !important;
  background: #fff !important;
  color: #111827 !important;
  outline: none !important;
  height: 45px !important;
  display: block !important;
}

/* برای اینکه آیکون فلش در Select حذف نشود (چون appearance: none آن را میبرد) */
.sc-calculator-wrap select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 12px center !important;
  background-size: 16px !important;
  padding-left: 35px !important; /* فضا برای فلش سمت چپ */
}


/* بخش شماره ۲: ایجاد فاصله بین کادرها و هم تراز کردن */
.sc-result {
  background: #f8fafc;
  border: 1px solid #f1f5f9; /* اضافه کردن بوردر ملایم برای هماهنگی با کادرهای بالا */
  border-radius: 15px; /* گردی ۱۵ پیکسل */
  padding: 0 12px;
  font-weight: 600;
  color: #111827;
  height: 45px; /* دقیقا هم‌ارتفاع با input های بالا */
  display: flex;
  align-items: center;
  justify-content: flex-end; /* تراز کردن عدد به سمت چپ/تومان */
  margin-bottom: 8px; /* ایجاد فاصله بین کادرهای نتیجه (شماره ۲) */
  margin-top: 8px; /* ایجاد فاصله بین کادرهای نتیجه (شماره ۲) */

}

/* حذف فاصله اضافی آخرین ردیف نتیجه */
tr:last-child .sc-result {
    margin-bottom: 0;
}

.sc-unit {
  font-size: 12px;
  color: #6b7280;
  margin-right: 6px;
  font-weight: 400;
}

/* استایل بخش توضیحات طرح */
.sc-plan-description-wrap {
  width: 100%;
  margin-top: 20px;
}

.sc-plan-description-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
}

.sc-plan-description {
  width: 100%;
  background: #f8fafc;
  border: 1px dashed #d7dee7;
  border-radius: 15px;
  padding: 15px;
  color: #374151;
  font-size: 13px;
  line-height: 1.8;
  min-height: 70px;
  white-space: pre-line;
  text-align: justify;
}


/* ===== Mobile Responsive ===== */
@media (max-width:768px){

  .sc-box{
    width:100%;
    padding:16px;
  }

  .sc-title{
    font-size:16px;
    margin-bottom:12px;
  }

  /* تبدیل جدول به حالت ستونی */
  .sc-table,
  .sc-table tbody,
  .sc-table tr,
  .sc-table td{
    display:block;
    width:100%;
  }

  .sc-table tr{
    border-bottom:1px solid #edf0f4;
    padding:10px 0;
  }

  .sc-table tr:last-child{
    border-bottom:none;
  }

  /* label */
  .sc-table td:first-child{
    width:100%;
    margin-bottom:6px;
    font-size:13px;
  }

  /* input/select */
  .sc-calculator-wrap input,
  .sc-calculator-wrap select{
    height:42px !important;
    font-size:14px;
  }

  /* result boxes */
  .sc-result{
    height:42px;
    font-size:14px;
  }

  /* توضیحات طرح */
  .sc-plan-description{
    font-size:13px;
    line-height:1.9;
  }

}

/* ===== Mobile UI Enhancement ===== */
@media (max-width:768px){

  /* فاصله بهتر بین ردیف‌ها */
  .sc-table tr{
    background:#ffffff;
    border:1px solid #eef2f7;
    border-radius:14px;
    padding:12px;
    margin-bottom:10px;
  }

  /* حذف خط‌های قدیمی جدول */
  .sc-table td{
    border-bottom:none;
    padding:4px 0;
  }

  /* ورودی‌ها کمی نرم‌تر */
  .sc-calculator-wrap input,
  .sc-calculator-wrap select{
    border:1px solid #d7dee7 !important;
    background:#fafbfd !important;
  }

  /* افکت فوکوس برای لمس */
  .sc-calculator-wrap input:focus,
  .sc-calculator-wrap select:focus{
    border-color:#3b82f6 !important;
    box-shadow:0 0 0 2px rgba(59,130,246,0.15);
  }

  /* باکس نتایج کمی برجسته‌تر */
  .sc-result{
    background:#f8fafc;
    border:1px solid #e6edf5;
    font-weight:600;
  }

  /* توضیحات طرح */
  .sc-plan-description-wrap{
    margin-top:16px;
  }

}
