.mlcq-public-wrap{max-width:980px;margin:0 auto}
.mlcq-public-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.mlcq-public-grid .mlcq-field{display:flex;flex-direction:column;gap:6px}
.mlcq-public-grid label{font-weight:600}
.mlcq-public-message{margin-top:12px;padding:10px;border-radius:8px}
.mlcq-public-message.error{background:#ffecec;border:1px solid #f5a3a3}
.mlcq-public-message.success{background:#ecfff1;border:1px solid #9fe3b0}
.mlcq-items-table{width:100%;border-collapse:collapse}
.mlcq-items-table th,.mlcq-items-table td{border-bottom:1px solid #e6e6e6;padding:8px;vertical-align:top}
.mlcq-right{text-align:right}
.mlcq-input{width:100%;max-width:100%}
.mlcq-num{max-width:140px}
@media (max-width:720px){
  .mlcq-public-grid{grid-template-columns:1fr}
}


/* --- Visual refresh (scoped) --- */
.mlcq-public-wrap{
  padding: 18px;
}
.mlcq-public-wrap form{
  background:#fff;
  border:1px solid #ededed;
  border-radius:14px;
  padding:18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.04);
}
.mlcq-section-title{
  margin:18px 0 10px;
  font-size:28px;
  line-height:1.1;
}
.mlcq-items-table{
  border:1px solid #eee;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}
.mlcq-items-table thead th{
  background:#fafafa;
  font-weight:700;
  color:#333;
}
.mlcq-items-table td{
  vertical-align:middle;
}
.mlcq-input{
  border:1px solid #e6e6e6;
  border-radius:10px;
  padding:10px 12px;
  height:42px;
  outline:none;
}
.mlcq-input:focus{
  border-color:#cfd7ff;
  box-shadow: 0 0 0 4px rgba(59,130,246,.10);
}
.mlcq-num{
  text-align:left;
}
.mlcq-actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.mlcq-totals-wrap{
  margin-top:16px;
  display:flex;
  justify-content:flex-end;
}
.mlcq-totals{
  min-width:320px;
  padding:14px 14px 10px;
  border:1px solid #eee;
  border-radius:12px;
  background:#fafafa;
}
.mlcq-totals-row{
  display:flex;
  justify-content:space-between;
  margin:8px 0;
}
.mlcq-totals-row--grand{
  border-top:1px solid #e6e6e6;
  padding-top:10px;
  font-size:18px;
}
.mlcq-submit{
  margin-top:14px;
  display:flex;
  justify-content:flex-start;
}
.mlcq-btn{
  appearance:none;
  border:1px solid transparent;
  border-radius:999px;
  padding:10px 16px;
  font-weight:700;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.mlcq-btn--primary{
  background:#0b5bd3;
  color:#fff;
}
.mlcq-btn--secondary{
  background:#0b5bd3;
  color:#fff;
  opacity:.95;
}
.mlcq-btn--danger{
  background:#0b5bd3;
  color:#fff;
}
.mlcq-btn--icon{
  width:44px;
  height:44px;
  justify-content:center;
  padding:0;
  border-radius:999px;
}
@media (max-width:720px){
  .mlcq-public-wrap{padding:10px}
  .mlcq-public-wrap form{padding:12px}
  .mlcq-section-title{font-size:22px}
  .mlcq-totals{min-width:100%}
}

/* --- Woo product autocomplete --- */
.mlcq-ac,
.mlcq-suggest{
  position:absolute;
  left:0;
  right:0;
  top: calc(100% + 4px);
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
  max-height: 240px;
  overflow:auto;
  z-index: 50;
  padding: 6px;
}
.mlcq-ac-item,
.mlcq-suggest-item{
  display:block;
  width:100%;
  text-align:left;
  padding:8px 10px;
  border:0;
  background:transparent;
  border-radius:8px;
  cursor:pointer;
  font-size: 13px;
}
.mlcq-ac-item:hover,
.mlcq-suggest-item:hover{
  background:#f3f4f6;
}

.mlcq-ac-portal{z-index:99999}


/* --- Responsive items table (mobile-first) --- */
@media (max-width: 860px){
  .mlcq-items-table{
    border-radius: 14px;
  }
  .mlcq-items-table thead{ display:none; }
  .mlcq-items-table,
  .mlcq-items-table tbody,
  .mlcq-items-table tr,
  .mlcq-items-table td{
    display:block;
    width:100%;
  }
  .mlcq-items-table tr{
    padding:10px 0;
    border-bottom:1px solid #eee;
  }
  .mlcq-items-table tr:last-child{
    border-bottom:none;
  }
  .mlcq-items-table td{
    border:none;
    padding:8px 12px;
    display:flex;
    gap:12px;
    align-items:center;
    justify-content:space-between;
  }
  .mlcq-items-table td::before{
    content: attr(data-label);
    font-weight:600;
    color:#555;
    flex: 0 0 38%;
    max-width:38%;
  }
  .mlcq-items-table td[data-label=""]::before{
    content: "";
    display:none;
  }
  .mlcq-items-table td .mlcq-input,
  .mlcq-items-table td select.mlcq-input{
    flex: 1 1 auto;
    width: 100%;
  }
  .mlcq-items-table td.mlcq-right{
    text-align:right;
  }
  .mlcq-items-table td.mlcq-right > *{
    margin-left:auto;
  }
  .mlcq-items-table td:last-child{
    justify-content:flex-end;
  }
  .mlcq-items-table td:last-child::before{ display:none; }

  .mlcq-actions{
    justify-content:stretch;
  }
  .mlcq-actions .mlcq-btn{
    width:100%;
    justify-content:center;
  }
  .mlcq-totals-wrap{
    justify-content:stretch;
  }
  .mlcq-totals{
    width:100%;
    min-width:0;
  }
}
