/* calc-luodijia 页面专属样式 */
/* 工具页面 */
.tool-header {
  background: linear-gradient(135deg, #ff7d00 0%, #ff9330 100%);
  padding: 35px 0;
  color: #fff;
  text-align: center;
}

.tool-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.tool-header p {
  font-size: 15px;
  opacity: 0.9;
}

/* Tab 切换 */
.tab-section {
  background: #fff;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.tab-section .container {
  width: 800px;
  max-width: 800px;
  margin: 0 auto;
}

.tab-container {
  display: flex;
  gap: 12px;
}

.tab-item {
  flex: 1;
  max-width: 240px;
  padding: 14px 24px;
  text-align: center;
  background: #fff;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  font-size: 15px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.tab-item:hover {
  border-color: #ff7d00;
  color: #ff7d00;
}

.tab-item.active {
  background: #ff7d00;
  border-color: #ff7d00;
  color: #fff;
  font-weight: 600;
}

.tab-item.active:hover {
  background: #e86d00;
  border-color: #e86d00;
}

/* 计算行样式 */
.calc-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.calc-row.three-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.calculator-section {
  padding: 25px 0;
}

.calc-form {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.form-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.form-section:last-of-type {
  border-bottom: none;
}

.section-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 14px;
  color: #ff7d00;
  border-left: 3px solid #ff7d00;
  padding-left: 10px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 7px;
  color: #333;
}

.form-select,
.form-input {
  width: 100%;
  padding: 10px 14px !important;
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  outline: none !important;
  box-sizing: border-box !important;
  height: 40px !important;
  line-height: 1.5 !important;
  vertical-align: middle !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
  min-height: 40px !important;
  max-height: 40px !important;
}

.form-select {
  cursor: pointer;
  background: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
}

.form-input {
  background: #fff !important;
}

.form-select:focus,
.form-input:focus {
  border-color: #ff7d00;
  box-shadow: 0 0 0 2px rgba(255, 125, 0, 0.1);
}

.form-hint {
  font-size: 12px;
  color: #999;
  margin-top: 6px;
  line-height: 1.4;
}

.form-hint-inline {
  font-size: 12px;
  color: #999;
  font-weight: normal;
  margin-left: 8px;
}

/* 购车方式切换 */
.payment-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.toggle-btn {
  flex: 1;
  padding: 10px;
  background: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
}

.toggle-btn.active {
  background: #fff9f0;
  border-color: #ff7d00;
  color: #ff7d00;
  font-weight: 500;
}

/* 贷款金额快捷选择 */
.loan-amount-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loan-presets {
  display: flex;
  gap: 8px;
}

.loan-preset-btn {
  flex: 1;
  padding: 8px 12px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

.loan-preset-btn:hover {
  background: #fff9f0;
  border-color: #ff7d00;
  color: #ff7d00;
}

.loan-preset-btn.active {
  background: #ff7d00;
  border-color: #ff7d00;
  color: #fff;
}

.loan-fields {
  display: none;
}

.loan-fields.show {
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.calc-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #ff7d00, #ff9330);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 5px;
}

.calc-btn:hover {
  opacity: 0.95;
}

/* 结果展示 */
.result-section {
  max-width: 800px;
  margin: 20px auto 0;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  display: none;
}

.result-section.show {
  display: block;
}

.result-title {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 14px;
  color: #333;
  border-left: 3px solid #ff7d00;
  padding-left: 10px;
}

.result-category {
  margin-bottom: 14px;
}

.category-title {
  font-size: 14px;
  font-weight: 500;
  color: #ff7d00;
  margin-bottom: 8px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  color: #666;
  font-size: 13px;
}

.result-value {
  color: #333;
  font-size: 13px;
  font-weight: 500;
}

.result-total {
  background: linear-gradient(135deg, #fff9f0, #fff4e5);
  padding: 14px 16px;
  border-radius: 6px;
  margin-top: 14px;
}

.result-total .result-label {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.result-total .result-value {
  font-size: 26px;
  font-weight: bold;
  color: #ff7d00;
}

.loan-info {
  background: #f8f8f8;
  padding: 12px;
  border-radius: 6px;
  margin-top: 12px;
}

.loan-info-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
}

.result-note {
  margin-top: 14px;
  padding: 10px;
  background: #f8f8f8;
  border-radius: 5px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.action-btn {
  flex: 1;
  padding: 10px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
}

.action-btn.primary {
  background: #ff7d00;
  color: #fff;
  border: none;
}

.action-btn.secondary {
  background: #fff;
  color: #ff7d00;
  border: 1px solid #ff7d00;
}

.action-btn:hover {
  opacity: 0.9;
}

/* 中等屏幕响应式（平板）- 三栏变两栏 */
@media (max-width: 992px) {
  .calc-row.three-cols {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .calc-row.three-cols .form-group:last-child {
    grid-column: span 2;
  }
  
  .tab-section .container {
    width: 100%;
    max-width: 100%;
    padding: 0 12px;
  }
  
  .calc-form {
    max-width: 90%;
    padding: 20px;
  }
  
  .result-section {
    max-width: 90%;
    padding: 16px;
  }
}

/* 移动端响应式（手机）- 两栏变一栏 */
@media (max-width: 768px) {
  .tool-header {
    padding: 25px 0;
  }

  .tool-header h1 {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .tool-header p {
    font-size: 13px;
    padding: 0 20px;
    line-height: 1.5;
  }

  .tab-section {
    padding: 12px 0;
  }

  .tab-section .container {
    width: 100%;
    max-width: 100%;
    padding: 0 12px;
  }

  .tab-container {
    gap: 8px;
  }

  .tab-item {
    flex: 1;
    max-width: none;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 20px;
    border-width: 1px;
  }

  .calculator-section {
    padding: 20px 0;
  }

  .calc-form {
    max-width: none;
    padding: 16px;
    border-radius: 8px;
    margin: 0 12px;
  }

  .form-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
  }

  .section-title {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .form-group {
    margin-bottom: 12px;
  }

  .form-label {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .calc-row.three-cols {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .calc-row.three-cols .form-group:last-child {
    grid-column: span 1;
  }

  .form-select,
  .form-input {
    padding: 12px 14px !important;
    font-size: 14px !important;
    border-radius: 20px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
  }

  .form-hint {
    font-size: 12px;
    margin-top: 4px;
  }

  .payment-toggle {
    gap: 8px;
  }

  .toggle-btn {
    padding: 10px;
    font-size: 13px;
    border-radius: 20px;
  }

  .calc-btn {
    padding: 14px;
    font-size: 16px;
    border-radius: 20px;
  }

  .result-section {
    max-width: none;
    margin: 16px 12px 0;
    padding: 16px;
    border-radius: 8px;
  }

  .result-title {
    font-size: 17px;
    margin-bottom: 12px;
  }

  .category-title {
    font-size: 14px;
  }

  .result-item {
    padding: 8px 0;
  }

  .result-label {
    font-size: 13px;
  }

  .result-value {
    font-size: 13px;
  }

  .result-total {
    padding: 12px;
    margin-top: 12px;
  }

  .result-total .result-label {
    font-size: 14px;
  }

  .result-total .result-value {
    font-size: 22px;
  }

  .result-note {
    margin-top: 12px;
    padding: 10px;
    font-size: 12px;
  }

  .result-actions {
    margin-top: 12px;
    flex-direction: column;
  }

  .action-btn {
    padding: 12px;
    font-size: 14px;
    border-radius: 20px;
  }
}