/* HD CLC Unified v1.5.17 — compact, aligned form controls.
   Loaded after the plugin's other front-end stylesheets. */
body :is(
  .clc-bao-gia,.clc-pricing,.hdclc-catalog,.hdclc-rfq-form,
  .hdclc-account,.hdclc-member-portal,.hdclc-staff-portal,
  .hdclc-admin-wrap,.hdclc-shared-list,.hdclc-technical-library,
  .hdclc-technical-details
) :is(
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="range"]):not(:where(.hdclc-customer-grid input)),
  select
) {
  box-sizing:border-box!important;
  height:36px!important;
  min-height:36px!important;
  max-height:36px!important;
  padding:5px 10px!important;
  font-family:"Roboto",Arial,Helvetica,sans-serif!important;
  font-size:14px!important;
  font-weight:500!important;
  line-height:20px!important;
  color:#26392d!important;
  background:#fff!important;
  border:1px solid #b9c9bd!important;
  border-radius:5px!important;
  box-shadow:none!important;
  vertical-align:middle!important;
}

/* One-line field labels share the same baseline rhythm throughout the plugin. */
body :is(
  .clc-bao-gia,.clc-pricing,.hdclc-catalog,.hdclc-rfq-form,
  .hdclc-account,.hdclc-member-portal,.hdclc-staff-portal,
  .hdclc-admin-wrap,.hdclc-shared-list,.hdclc-technical-library,
  .hdclc-technical-details
) label:not(.chk-wrap):not(.screen-reader-text):not(.hdclc-qty-label):not(:where(.hdclc-customer-panel .hdclc-rfq-save-profile label)) {
  display:block!important;
  margin:0 0 4px!important;
  padding:0!important;
  font-family:"Roboto",Arial,Helvetica,sans-serif!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:18px!important;
  color:#34483a!important;
  background:transparent!important;
}

/* Numeric values align to the right; descriptive text remains left aligned. */
body :is(
  .clc-bao-gia,.clc-pricing,.hdclc-catalog,.hdclc-rfq-form,
  .hdclc-account,.hdclc-member-portal,.hdclc-staff-portal,
  .hdclc-admin-wrap,.hdclc-shared-list,.hdclc-technical-library,
  .hdclc-technical-details
) input:is([inputmode="numeric"],[inputmode="decimal"],[type="number"]) {
  text-align:right!important;
  font-variant-numeric:tabular-nums!important;
}
.clc-bao-gia :is(
  .cl-vr,.cl-tcr,.delivery-grid,
  .it-q
) input {
  height:36px!important;
  min-height:36px!important;
  max-height:36px!important;
  padding:5px 10px!important;
  font-size:14px!important;
  line-height:20px!important;
}
.clc-bao-gia :is(
  .cl-vq,.cl-vd,.cl-tcq,.cl-tcd,.cl-ship-q,.cl-ship-d,
  .cl-q,.cl-dg
) {
  text-align:right!important;
  font-variant-numeric:tabular-nums!important;
}

.clc-bao-gia .cl-tcr label,
.clc-bao-gia .delivery-grid label {
  font-size:13px!important;
  line-height:18px!important;
  margin:0 0 4px!important;
}

/* Product catalogue quantity, search and filter fields use the same control height. */
.hdclc-catalog .hdclc-product-card :is(input,select),
.hdclc-catalog .hdclc-config-controls :is(input,select),
.hdclc-catalog .hdclc-catalog-toolbar :is(input,select),
.hdclc-member-portal :is(input:not([type="checkbox"]):not([type="radio"]):not(:where(.hdclc-customer-grid input)),select),
.hdclc-staff-portal :is(input:not([type="checkbox"]):not([type="radio"]),select),
.hdclc-account :is(input:not([type="checkbox"]):not([type="radio"]),select) {
  height:36px!important;
  min-height:36px!important;
  max-height:36px!important;
  padding:5px 10px!important;
  font-size:14px!important;
  line-height:20px!important;
}

/* Multi-line notes stay taller and are not forced into the one-line height. */
body :is(
  .clc-bao-gia,.clc-pricing,.hdclc-catalog,.hdclc-rfq-form,
  .hdclc-account,.hdclc-member-portal,.hdclc-staff-portal,
  .hdclc-admin-wrap,.hdclc-shared-list
) textarea {
  height:auto!important;
  min-height:76px!important;
  max-height:none!important;
  padding:8px 10px!important;
  font-family:"Roboto",Arial,Helvetica,sans-serif!important;
  font-size:14px!important;
  line-height:20px!important;
}

/* Consistent focus without changing the established button sizes or colors. */
body :is(
  .clc-bao-gia,.clc-pricing,.hdclc-catalog,.hdclc-rfq-form,
  .hdclc-account,.hdclc-member-portal,.hdclc-staff-portal,
  .hdclc-admin-wrap,.hdclc-shared-list
) :is(input,select,textarea):focus {
  outline:2px solid rgba(23,107,58,.16)!important;
  outline-offset:1px!important;
  border-color:#176b3a!important;
}

/* Keep the compact dimensions on mobile too; do not re-expand fields to 48px. */
@media(max-width:767px) {
  body :is(
    .clc-bao-gia,.clc-pricing,.hdclc-catalog,.hdclc-rfq-form,
    .hdclc-account,.hdclc-member-portal,.hdclc-staff-portal,
    .hdclc-admin-wrap,.hdclc-shared-list,.hdclc-technical-library,
    .hdclc-technical-details
  ) :is(
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="range"]):not(:where(.hdclc-customer-grid input)),
    select
  ) {
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    padding:5px 9px!important;
    font-size:14px!important;
    line-height:20px!important;
  }
}

.clc-bao-gia .hdclc-customer-panel { margin-top: 16px; }
.hdclc-customer-panel .hdclc-customer-title {
  margin: 0 0 4px !important;
  color: #214d31;
  font-size: 22px;
  line-height: 1.3;
}
.hdclc-customer-panel .hdclc-customer-hint {
  margin: 0 0 12px !important;
  color: #54675a;
  font-size: 14px !important;
}
.hdclc-customer-panel .hdclc-customer-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px 16px;
}
.hdclc-customer-grid .hdclc-customer-field { min-width: 0; }
.hdclc-customer-grid .hdclc-customer-wide { grid-column: 1 / -1; }
.hdclc-customer-grid .hdclc-customer-field > span { display: block; color: #34483a; }
.hdclc-customer-grid .hdclc-customer-field b { color: #a13528; }
body .hdclc-customer-panel .hdclc-customer-grid .hdclc-customer-field input {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 44px !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 9px 11px !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
}
body .hdclc-member-portal .hdclc-customer-grid label.hdclc-customer-field input { margin-top: 4px !important; }
.hdclc-customer-panel .hdclc-customer-grid input[aria-invalid="true"] {
  outline: 2px solid #a13528 !important;
}
.hdclc-customer-panel .hdclc-rfq-customer-error:not(:empty) {
  margin: 0 0 12px !important;
  padding: 9px 11px;
  border-radius: 5px;
  background: #fff2ef;
  color: #912e21;
  font-size: 14px;
  line-height: 1.5;
}
.hdclc-customer-panel :is(.hdclc-rfq-customer-error,.hdclc-rfq-result):empty { display: none !important; }
.hdclc-customer-panel .hdclc-customer-optional {
  margin-top: 14px;
  border-top: 1px solid #dbe6dd;
  border-bottom: 1px solid #dbe6dd;
}
.hdclc-customer-panel .hdclc-customer-optional > summary {
  padding: 12px 2px;
  min-height: 44px;
  color: #214d31;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}
.hdclc-customer-optional[open] .hdclc-customer-grid { padding: 0 2px 12px; }
.hdclc-customer-panel .hdclc-rfq-save-profile label {
  display: flex !important;
  align-items: flex-start;
  margin: 0 !important;
}
.hdclc-customer-panel .hdclc-rfq-save-profile strong { overflow-wrap: anywhere; }
.hdclc-customer-panel .hdclc-customer-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 8px 0 0;
  padding: 10px 20px;
  border: 1px solid #176b3a;
  border-radius: 5px;
  background: #176b3a;
  color: #fff;
  font: 700 16px/1.35 "Roboto",Arial,sans-serif;
  text-align: center;
  text-transform: none;
  cursor: pointer;
}
.hdclc-customer-panel .hdclc-customer-submit[hidden] { display: none !important; }
.hdclc-customer-panel .hdclc-customer-submit:hover:not(:disabled) { background: #10532c; }
.hdclc-customer-panel .hdclc-customer-submit:disabled { opacity: .68; cursor: default; }

@media (max-width: 767px) {
  .hdclc-customer-panel .hdclc-customer-grid { grid-template-columns: minmax(0,1fr); }
  .hdclc-customer-panel .hdclc-customer-submit { width: 100%; }
  .hdclc-customer-panel .hdclc-rfq-save-profile { padding: 10px 11px; }
}

/* v1.5.67 — Mobile: dòng sản phẩm trong danh sách báo giá.
   Ô số lượng/đơn giá gọn, đơn vị đi liền ô, nút Xóa đủ lớn để bấm (>=44px). */
@media screen and (max-width: 640px) {
  .clc-bao-gia .it {
    grid-template-columns: minmax(0,1fr) auto !important;
    gap: 10px 10px !important;
    align-items: start !important;
  }
  .clc-bao-gia .it-n { grid-column: 1 !important; grid-row: 1 !important; }
  .clc-bao-gia .it-n br { display: none !important; }
  .clc-bao-gia .it .cl-x {
    grid-column: 2 !important; grid-row: 1 !important;
    align-self: start !important; justify-self: end !important;
    min-width: 56px !important; min-height: 44px !important;
    padding: 8px 12px !important;
    font-size: 14px !important; line-height: 1.2 !important;
  }
  .clc-bao-gia .it-q {
    grid-column: 1 !important; grid-row: 2 !important;
    display: flex !important; flex-wrap: wrap !important;
    align-items: center !important; gap: 8px 6px !important;
  }
  .clc-bao-gia .it-t {
    grid-column: 2 !important; grid-row: 2 !important;
    align-self: end !important; justify-self: end !important;
    padding-bottom: 10px !important;
    font-size: 15px !important; text-align: right !important;
  }
  .clc-bao-gia .it-q input.cl-q {
    flex: 0 0 auto !important; width: 92px !important;
  }
  .clc-bao-gia .it-q input.cl-dg {
    flex: 0 0 auto !important; width: 116px !important;
  }
  .clc-bao-gia .it-q span {
    flex: 0 0 auto !important; font-size: 13px !important; white-space: nowrap !important;
  }
}
