/* Tela 9.1 — quadro compacto de Custo CMV sem alterar a estrutura controlada pelo React. */
div:has(> #custo-cmv) {
  position: relative !important;
  width: 175px !important;
  min-height: 62px;
  padding: 8px 12px 8px 44px !important;
}

label[for="custo-cmv"] {
  display: block !important;
  width: 100%;
  margin: 0 !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 1 !important;
  cursor: pointer;
  user-select: none;
}

label[for="custo-cmv"]::before {
  content: "Custo CMV";
  display: block;
  color: #9ca3af;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.025em;
  text-align: right;
  text-transform: uppercase;
}

label[for="custo-cmv"]::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  border-radius: 6px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  transition: background-color 160ms ease, filter 160ms ease;
}

label[for="custo-cmv"]:hover::after {
  background-color: rgba(255, 255, 255, 0.05);
  filter: brightness(1.25);
}

label[for="custo-cmv"] > span {
  display: none !important;
}

div:has(> #custo-cmv)::after {
  content: attr(data-cmv-display);
  display: block;
  min-height: 28px;
  margin-top: 4px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  line-height: 28px;
  text-align: right;
  white-space: nowrap;
}

#custo-cmv {
  position: absolute !important;
  right: 12px;
  bottom: 8px;
  box-sizing: border-box;
  width: 112px !important;
  height: 28px !important;
  margin: 0 !important;
  padding: 0 4px 0 8px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  font-size: 14px !important;
  text-align: left !important;
}

#custo-cmv:focus {
  opacity: 1 !important;
  pointer-events: auto !important;
}

div:has(> #custo-cmv:focus)::after {
  visibility: hidden;
}

#custo-cmv + div {
  display: none !important;
}
