/* v1.0.6 — Restore centered layout, swatches, and one-line form */
.dx-wrap{
  max-width: 760px;
  margin: 24px auto;
  padding: 20px;
  border: 1px solid #eaeaea;
  border-radius: 14px;
  background: #ffffff;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  text-align: center;
}
.dx-title{ margin-top: 0; margin-bottom: 12px; }

.dx-form{
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;            /* giữ 1 hàng */
  justify-content: center;
  align-items: flex-end;        /* canh đáy để nút thẳng hàng input */
}
.dx-form .field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;             /* nhỏ gọn để không đẩy nút xuống */
  align-items: center;
}
.dx-form label{ text-align: center; }

.dx-form input[type="number"]{
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  width: 140px;                 /* ô năm gọn */
  text-align: center;
  height: 42px;
  line-height: 42px;
  -moz-appearance: textfield;
}
.dx-form input[type=number]::-webkit-outer-spin-button,
.dx-form input[type=number]::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
.dx-btn{
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  height: 42px;
  line-height: 42px;
}

/* Nếu màn hình quá hẹp thì tự xuống hàng để không vỡ layout */
@media (max-width: 460px){
  .dx-form{ flex-wrap: wrap; }
}

.dx-result{ 
  margin-top: 16px; 
  padding: 16px; 
  border-radius: 12px; 
  background: #fafafa; 
  border: 1px solid #e5e5e5; 
  line-height: 1.6; 
  text-align: left;
}
.dx-result--placeholder{ margin-top: 16px; }

/* Swatches */
.dx-swatches{ display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; justify-content: center; }
.dx-swatch{ width:36px; height:28px; border-radius:6px; border:1px solid rgba(0,0,0,.1); }

.dx-section{ margin-top: 12px; }
.dx-note{ font-style: italic; opacity: .85; }
.dx-badge{ display:inline-block; padding:4px 8px; border:1px solid #ddd; border-radius:999px; background:#f8f8f8; font-size:12px; margin-left: 6px; }

.dx-spacer{ visibility: hidden; height: 1.2em; } /* tạo chiều cao label cho cột nút */
