/**
 * 报价模式专属样式
 * B2C客户报价 - 隐藏敏感信息
 */

/* 报价模式下的footer-right - 隐藏原有的总价区域 */
.quote-mode .footer-right {
  display: none !important;
}

/* 报价模式：footer-top 布局 - 支付方式35%，价格包含65% */
.quote-mode .footer-top {
  display: flex !important;
  gap: 12px !important;
}

.quote-mode .footer-top .footer-left {
  flex: 0 0 35% !important;
  width: 35% !important;
  max-width: 35% !important;
}

/* 报价模式：价格包含区域（右侧65%） */
.quote-mode .footer-right-quote {
  flex: 0 0 65% !important;
  width: 65% !important;
  max-width: 65% !important;
  display: flex !important;
  flex-direction: column !important;
}

.quote-mode .footer-right-quote .info-block {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-radius: 4px;
  padding: 10px 12px;
  height: 100%;
}

.quote-mode .footer-right-quote .info-title {
  color: #059669;
  font-weight: 600;
}

.quote-mode .footer-right-quote .info-text {
  color: #065f46;
  font-size: 11px;
  line-height: 1.5;
}

/* 报价模式总价行 */
.quote-mode .total-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 4px 0 !important;
  font-size: 12px !important;
  color: var(--text-sub) !important;
  width: 100% !important;
  line-height: 1.3 !important;
}

.quote-mode .total-row .total-label {
  font-weight: 600;
  color: var(--text-sub);
  flex: 1 1 auto;
  min-width: 0;
}

.quote-mode .total-row .total-label span {
  display: block;
  line-height: 1.3;
}

.quote-mode .total-row .total-label .en {
  font-size: 9px;
  opacity: 0.7;
  font-weight: 400;
  margin-top: 0px;
  line-height: 1.2;
}

.quote-mode .total-row .total-amount {
  font-weight: 600 !important;
  color: var(--text-main) !important;
  text-align: right !important;
  white-space: nowrap !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}

.quote-mode .total-row .total-amount.text-red {
  color: var(--danger) !important;
}

/* 报价模式总价框 */
.quote-mode .total-box {
  background: var(--primary);
  color: white;
  padding: 14px 16px;
  border-radius: 6px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.quote-mode .total-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.quote-mode .total-title .en {
  display: block;
  font-size: 10px;
  opacity: 0.8;
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 2px;
}

.quote-mode .total-value {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* 显示报价专属元素 */
.quote-mode .quote-only {
  display: flex !important;
}

/* 报价模式表格单元格 */
.quote-mode th.quote-only,
.quote-mode td.quote-only {
  display: table-cell !important;
}

/* 折扣列默认隐藏 - 使用更高优先级选择器 */
.quote-mode th.quote-descuento-col,
.quote-mode td.quote-descuento-col,
.quote-mode .quote-descuento-col {
  display: none !important;
}

/* 当有折扣时显示折扣列 - 更高优先级 */
.quote-mode .has-descuento th.quote-descuento-col,
.quote-mode .has-descuento td.quote-descuento-col,
.quote-mode #invoice-paper.has-descuento th.quote-descuento-col,
.quote-mode #invoice-paper.has-descuento td.quote-descuento-col {
  display: table-cell !important;
}

/* 底部折扣行默认隐藏 */
.quote-mode #quote-descuento-row {
  display: none !important;
}

/* 当有折扣时显示底部折扣行 - #invoice-paper.has-descuento 包含 #quote-descuento-row */
.quote-mode #invoice-paper.has-descuento #quote-descuento-row {
  display: flex !important;
}

/* 报价模式总价行显示 */
.quote-mode .total-row.quote-only {
  display: flex !important;
}

/* 隐藏账单专属元素 */
.quote-mode .bill-only {
  display: none !important;
}

/* 隐藏其他模式元素 */
.quote-mode .ticket-only,
.quote-mode .compare-only {
  display: none !important;
}

/* 报价模式输入区折扣字段样式 */
.quote-mode .item-grid-btm .quote-only {
  display: block !important;
}

.quote-mode .item-grid-btm .bill-only {
  display: none !important;
}

/* 附加产品折扣字段 */
.quote-mode .addon-num-wrapper.quote-only {
  display: block !important;
}

.quote-mode .addon-num-wrapper.bill-only {
  display: none !important;
}

/* 表格折扣列红色文字 */
.quote-mode .text-red {
  color: var(--danger) !important;
}

/* 报价模式 info-block 显示 */
.quote-mode .info-block.quote-only {
  display: block !important;
}

/* 报价模式 form-group 显示 */
.quote-mode .form-group.quote-only {
  display: block !important;
}

/* 报价模式 info-block (价格包含等) 显示 */
.quote-mode .info-block.quote-only {
  display: block !important;
}

/* 报价模式：表格底部汇总行 */
.quote-mode #quote-table-footer {
  display: table-footer-group !important;
}

.quote-mode #quote-table-footer.hidden {
  display: none !important;
}

.quote-mode .quote-summary-row {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  border-top: 2px solid var(--primary);
}

.quote-mode .quote-summary-row td {
  padding: 10px 4px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  vertical-align: middle;
  color: var(--text-main);
  white-space: nowrap;
}

.quote-mode .quote-summary-row td.num {
  text-align: right !important;
  white-space: nowrap;
}

.quote-mode .quote-summary-row .summary-label {
  text-align: left;
}

.quote-mode .quote-summary-row .summary-total {
  font-weight: 700 !important;
  background: var(--primary);
  color: white !important;
  border-radius: 3px;
  padding: 6px 8px !important;
  white-space: nowrap;
  min-width: fit-content;
}

/* 汇总行折扣列红色 */
.quote-mode .quote-summary-row td#display-quote-footer-descuento {
  color: var(--danger) !important;
  font-weight: 600 !important;
}

/* 价格包含区域（右侧）：没有内容时隐藏 */
.quote-mode #quote-price-includes-right:has(.info-text:empty) {
  display: none !important;
}

/* 总价显示切换开关样式 */
.quote-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 13px;
  color: var(--text-sub);
}

/* 报价模式 footer-bottom 显示（预定条件和取消政策全宽） */
.quote-mode .footer-bottom.quote-only {
  display: block !important;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

/* 注意：表格列宽规则已在 style.css 中统一定义，无需重复 */
