@font-face {
  font-family: "Noto Sans Lao";
  src: url("/portal/assets/NotoSansLao.ttf") format("truetype");
  font-weight: 100 900;
  unicode-range: U+0E80-0EFF;
  font-display: swap;
}
html:lang(lo) body {
  font-family: "Noto Sans Lao", Kanit, sans-serif;
}
.prototype-bar {
  display: none;
}
.live-panel {
  padding: 28px;
  background: white;
  border: 1px solid #d8e4dc;
  border-radius: 16px;
  margin: 18px 0;
}
.live-panel h2,
.live-panel h3 {
  margin-top: 0;
}
.live-empty {
  text-align: center;
  padding: 50px 20px;
}
.live-error {
  color: #9f2319;
  background: #fff1ed;
  border: 1px solid #eac2b9;
  padding: 12px;
  border-radius: 9px;
  white-space: pre-wrap;
}
.live-error:empty {
  display: none;
}
.live-message {
  padding: 14px;
  background: #edf6ee;
  border-radius: 10px;
}
.live-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.live-fields .wide {
  grid-column: 1/-1;
}
.live-fields input,
.live-fields select,
.live-fields textarea,
.live-panel select,
.live-panel input {
  max-width: 100%;
  width: 100%;
  padding: 11px;
  border: 1px solid #b8cabd;
  border-radius: 7px;
  background: white;
  color: #143c2d;
  font: inherit;
}
.live-fields label {
  display: grid;
  gap: 6px;
}
.live-fields input[type="checkbox"] {
  width: auto;
}
.live-check {
  display: flex !important;
  align-items: start;
  gap: 10px !important;
}
.distributor-terms {
  min-inline-size: 0;
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid #b8cabd;
  border-radius: 10px;
}
.distributor-terms legend { padding: 0 5px; font-weight: 700; }
.distributor-terms p { margin: 4px 0 12px; }
.distributor-terms p:last-child { margin: 10px 0 0; }
.distributor-terms a { text-decoration: underline; }
.live-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 18px 0;
}
.live-actions .btn {
  min-height: 42px;
}
.order-payment-result { max-width: 620px; margin: 28px auto; text-align: center; }
.order-payment-result h1 { font-size: clamp(24px, 5vw, 34px); }
.order-payment-mark { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 16px;
  border-radius: 50%; background: #edf6ee; color: #236b41; }
.order-payment-summary { padding: 12px; background: #f5f8f5; border-radius: 10px; }
.order-payment-summary div { display: grid; gap: 4px; margin: 6px 0; }
.order-payment-summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.order-payment-result .live-actions { justify-content: center; margin-bottom: 0; }
.live-price {
  font-size: 24px;
  font-weight: 600;
  color: #236b41;
}
.live-photo {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: #f0f6ef;
  border-radius: 12px;
  color: #628069;
}
.live-photo img {
  width: 100%;
  height: 260px;
  object-fit: contain;
}
.live-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 30px 0;
}
.live-detail img {
  max-width: 100%;
  height: 400px;
  object-fit: contain;
}
.live-list {
  display: grid;
  gap: 14px;
}
.live-line {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 90px 130px 75px;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #dce7de;
}
.live-line input {
  width: 80px;
}
.live-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
}
.live-summary .total {
  border-top: 1px solid #bccdbf;
  font-weight: 600;
  font-size: 22px;
}
.live-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.live-tabs a {
  border: 1px solid #bad0bf;
  border-radius: 30px;
  padding: 9px 17px;
  background: #f6faf5;
}
.live-tabs .on {
  background: #245d3d;
  color: white;
}
.live-status {
  display: inline-block;
  background: #edf5ed;
  color: #245f3b;
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 13px;
}
.live-order {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dce7de;
  padding: 16px 0;
}
.live-progress {
  height: 12px;
  background: #dde9df;
  border-radius: 20px;
  overflow: hidden;
}
.live-progress span {
  display: block;
  background: #38784c;
  height: 100%;
}
.portal-frame {
  border: 0;
  width: 100%;
  height: 1000px;
  min-height: 650px;
  background: #f1f4f8;
  border-radius: 14px;
  display: block;
}
.portal-frame-wrap {
  margin: 20px 0 40px;
}
.live-workspace-note {
  font-size: 13px;
  color: #52645a;
}
.live-table {
  overflow: auto;
}
.live-table table {
  width: 100%;
  border-collapse: collapse;
}
.live-table th,
.live-table td {
  padding: 12px;
  border-bottom: 1px solid #dce7de;
  text-align: left;
}
.live-company {
  white-space: pre-line;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.live-loading {
  text-align: center;
  padding: 100px 20px;
}
#dialog-body {
  overflow-wrap: anywhere;
}
#dialog {
  max-width: min(820px, calc(100vw - 24px));
  max-height: 90vh;
}
.product-card .sku {
  overflow-wrap: anywhere;
}
.live-order-detail {
  margin: 20px 0;
}
.live-address {
  padding: 14px;
  border: 1px solid #d1e0d5;
  border-radius: 9px;
}
.live-media-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.live-media-thumbs img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}
.live-quantity {
  max-width: 110px;
}
.live-payments {
  padding: 12px;
  background: #f4f8f3;
  border-radius: 8px;
}
.live-payments p {
  margin: 6px 0;
}
@media (max-width: 650px) {
  .live-fields,
  .live-detail {
    grid-template-columns: 1fr;
  }
  .live-line {
    grid-template-columns: 1fr 75px;
  }
  .live-line strong {
    grid-column: 1/-1;
  }
  .live-panel {
    padding: 18px;
  }
  .live-detail img {
    height: 270px;
  }
  .portal-frame {
    height: 900px;
  }
  .live-fields .wide {
    grid-column: auto;
  }
  .live-order {
    align-items: start;
  }
  .live-actions .btn {
    max-width: 100%;
  }
  .live-table th,
  .live-table td {
    padding: 8px;
  }
  .live-table {
    max-width: 100%;
  }
}

.signup-location {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}
.signup-location input,
.signup-location select {
  min-height: 44px;
  font-size: max(16px, 1em);
}
.signup-province-status,
.signup-branch-choice {
  grid-column: 1 / -1;
}
.signup-province-status {
  color: #385447;
  font-size: 0.9rem;
}
.signup-branch-choice[hidden] {
  display: none;
}
@media (max-width: 650px) {
  .signup-location {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .mainnav {
    flex-wrap: nowrap;
  }
  .mainnav > .brand {
    flex: 1 1 0;
    min-width: 0;
  }
  .mainnav .brand img,
  .mainnav .tools {
    flex-shrink: 0;
  }
  .mainnav .brand .wordmark {
    font-size: clamp(16px, 5.4vw, 24px);
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .mainnav { gap: 14px; }
  .mainnav .brand .wordmark { font-size: 18px; }
  .mainnav .tools { gap: 10px; }
  .mainnav .search { width: clamp(95px, 13vw, 145px); }
  .mainnav .shipping span { display: none; }
}
