/**
 * U-Home — Trang Báo giá: khối cấu hình (thanh kéo hóa đơn, tùy chọn tính toán, cảnh báo)
 * Dùng chung token màu của design system: đỏ #e4181f, navy #14202e, cam #ffa724.
 */

.uh-bg-config-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 18px rgba(20, 32, 46, 0.04);
}

.uh-bg-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 32px;
  align-items: start;
}

.uh-bg-config-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.uh-bg-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--uh-color-navy, #14202e);
  margin-bottom: 10px;
}

/* ── Slider hóa đơn / tỷ lệ ban ngày ── */
.uh-bg-slider-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.uh-bg-slider-big {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--uh-color-primary, #e4181f);
  font-variant-numeric: tabular-nums;
}

.uh-bg-slider-input {
  margin-left: auto;
  width: 140px;
  max-width: 100%;
  height: 38px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  color: var(--uh-color-navy, #14202e);
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
}

@media (max-width: 768px) {
  .uh-bg-slider-input {
    display: none;
  }
}

.uh-bg-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(90deg, #e4181f var(--p, 50%), #e8ebef var(--p, 50%));
}

.uh-bg-range-day {
  background: linear-gradient(90deg, #ffa724 var(--p, 50%), #14202e var(--p, 50%));
}

.uh-bg-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #e4181f;
  box-shadow: 0 2px 6px rgba(20, 32, 46, 0.25);
}

.uh-bg-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #e4181f;
  box-shadow: 0 2px 6px rgba(20, 32, 46, 0.25);
}

.uh-bg-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: #6b7a8c;
  font-variant-numeric: tabular-nums;
}

/* ── Nhóm nút chọn ── */
.uh-bg-opt-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.uh-bg-opt-group-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.uh-bg-opt {
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  padding: 10px 8px;
  color: var(--uh-color-navy, #14202e);
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
}

.uh-bg-opt small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
}

.uh-bg-opt:hover {
  border-color: #e4181f;
}

.uh-bg-opt.is-on {
  background: #fff1f1;
  border-color: #e4181f;
  color: #e4181f;
}

/* ── Ô nhập vùng mái ngang × dài ── */
.uh-bg-area-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* ── Logo hãng trên thẻ gói, cảnh báo cấu hình ── */
.uh-bg-brand-mini-logo {
  height: 50px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.uh-bg-warn-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  color: #8a3809;
  background: #fff7ed;
  border: 1px solid #ffa724;
  border-left: 5px solid #d97706;
  border-radius: 14px;
}

.uh-bg-swipe-hint {
  padding: 10px 16px 0;
}

@media (max-width: 820px) {
  .uh-bg-config-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .uh-bg-config-box {
    padding: 18px;
  }
}

@media (max-width: 420px) {
  .uh-bg-opt-group {
    grid-template-columns: minmax(0, 1fr);
  }
}

.uh-bg-opt-group + .uh-bg-label {
  margin-top: 18px;
}
