/* Keep the virtual table inside the available viewport at every display scale. */
/* Desktop density follows the compact reference (224px navigation -> 161px).
   CSS zoom preserves the virtual table's layout sizes; compensate viewport
   heights so the workspace and navigation still reach the window bottom. */
@media (min-width: 1200px) {
  body.hs-workspace { zoom: .72; }
  .hs-workspace #app .index_wrap,
  .hs-workspace #app .header,
  .hs-workspace #app .layout_wrap { height: calc(100vh / .72) !important; }
  body.hs-workspace .el-dialog {
    max-width: calc(100vw / .72 - 32px) !important;
    max-height: calc(100vh / .72 - var(--hs-dialog-top) - 16px);
  }
}
/* Let Element Plus manage dialog/popover stacking above all workspace chrome.
   The old layout z-index trapped fixed dialogs beneath the sidebar. */
.hs-workspace #app .layout_wrap { z-index: auto !important; }
.hs-workspace #app .header { z-index: 100 !important; }
.hs-workspace .hs-brand, .hs-workspace .hs-nav-footer { z-index: 110; }
.hs-workspace .hs-topbar { z-index: 80; }
.hs-workspace .hs-nav-backdrop { z-index: 90; }
.hs-workspace #huisuan-environment-setup, .hs-workspace #local-machine-status { z-index: 120 !important; }
/* Fit CSS viewport dimensions, including Windows display scaling and zoom.
   Keep header/footer visible while long settings forms scroll internally. */
.hs-workspace .el-dialog {
  --hs-dialog-top: min(6vh, 40px);
  box-sizing: border-box;
  max-width: calc(100vw - 32px) !important;
  max-height: calc(100vh - var(--hs-dialog-top) - 16px);
  margin-top: var(--hs-dialog-top) !important;
  margin-bottom: 16px !important;
  display: flex;
  flex-direction: column;
}
.hs-workspace .el-dialog__header, .hs-workspace .el-dialog__footer { flex: 0 0 auto; }
.hs-workspace .el-dialog__body { flex: 1 1 auto; min-height: 0; overflow: auto; overflow-wrap: anywhere; }
.hs-workspace .el-dialog__body label { white-space: normal; }
.hs-workspace .el-dialog__body textarea { box-sizing: border-box; max-width: 100%; }
/* Older Vue templates put the footer in the body via slot="footer". */
.hs-workspace .el-dialog__body > .dialog-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 0;
  background: #fff;
}
#app .hs-job-status { flex: 0 0 auto; margin-top: 10px; padding: 9px 12px; border: 1px solid #cce5e8; border-radius: 7px; background: #eef8f8; color: #176570; text-align: left; white-space: pre-line; font: 12px/1.6 "Microsoft YaHei", sans-serif; max-height: 110px; overflow: auto; }
#app .hs-job-status[hidden] { display: none; }
#app .hs-job-status.is-error { color: #a43d32; border-color: #f1d1c9; background: #fff3ef; }
#app .hs-job-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
#app .hs-job-actions button { border: 1px solid #76b4b9; border-radius: 5px; background: white; color: #176570; padding: 5px 10px; cursor: pointer; }
#app .hs-job-actions button:disabled { opacity: .6; cursor: wait; }
#app .hs-video-layout { min-width: 0; min-height: 0; gap: 12px !important; }
#app .hs-video-layout > .shop_view { flex: 0 0 300px; width: 300px !important; min-width: 0; margin-right: 0 !important; }
#app .hs-video-layout > .hs-video-pane { display: flex; flex-direction: column; flex: 1 1 0; width: 0 !important; min-width: 0; min-height: 0; height: 100%; overflow-y: auto; overflow-x: hidden; }
#app .hs-video-pane #headdiv { flex: 0 0 auto; width: 100%; min-width: 0; }
#app .hs-video-pane #headdiv .el-form-item { display: block; margin-right: 0; }
#app .hs-video-pane #headdiv .el-form-item__content { display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; line-height: 32px; }
#app .hs-video-pane #headdiv .el-button { margin-left: 0 !important; }
#app .hs-video-pane #headdiv .el-divider { margin: 12px 0 0; }
#app .hs-video-pane #contentUploadDiv { display: flex; flex-direction: column; flex: 1 1 0; height: 0 !important; min-height: 120px; min-width: 0; margin-top: 12px; overflow: hidden; }
#app .hs-video-pane #contentUploadDiv > .el-auto-resizer { flex: 1 1 0; height: 0 !important; min-height: 0; min-width: 0; }
#app .hs-table-scroll { position: relative; z-index: 10; flex: 0 0 22px; height: 22px; width: 100%; box-sizing: border-box; overflow-x: scroll; overflow-y: hidden; background: #edf2f6; border-top: 1px solid #dfe6ed; scrollbar-color: #71959e #edf2f6; scrollbar-width: auto; }
#app .hs-table-scroll[hidden] { display: none; }
#app .hs-table-scroll > div { height: 1px; }
#app .hs-table-scroll::-webkit-scrollbar { height: 16px; }
#app .hs-table-scroll::-webkit-scrollbar-track { background: #edf2f6; }
#app .hs-table-scroll::-webkit-scrollbar-thumb { background: #71959e; border: 3px solid #edf2f6; border-radius: 8px; }
#app .hs-table-scroll::-webkit-scrollbar-thumb:hover { background: #087f8c; }
@media (max-width: 1500px) {
  #app .hs-video-layout > .shop_view { flex-basis: 260px; width: 260px !important; }
}
@media (max-width: 1000px) {
  #app .hs-video-layout > .shop_view { flex-basis: 220px; width: 220px !important; }
  .hs-workspace #app .layout_wrap > .content { padding-left: 16px !important; padding-right: 16px !important; }
  .hs-workspace #app .hs-video-pane #headdiv { padding: 12px !important; }
}
@media (max-width: 600px) {
  #app .hs-video-layout { flex-direction: column; overflow-y: auto; }
  #app .hs-video-layout > .shop_view { flex: 0 0 180px; width: 100% !important; height: 180px !important; }
  #app .hs-video-layout > .hs-video-pane { flex: 1 0 360px; width: 100% !important; height: auto; }
}
/* Leave the bottom table controls clear of the floating helper buttons. */
@media (min-width: 761px) {
  .hs-workspace.hs-video-active #huisuan-environment-setup { top: 96px !important; bottom: auto !important; }
  .hs-workspace.hs-video-active #local-machine-status { top: 141px !important; bottom: auto !important; }
}
@media (max-width: 760px) {
  .hs-workspace.hs-video-active #huisuan-environment-setup { top: 99px !important; bottom: auto !important; right: 16px !important; padding: 6px 10px !important; font-size: 11px !important; }
  .hs-workspace.hs-video-active #local-machine-status { top: 76px !important; bottom: auto !important; right: 16px !important; font-size: 10px !important; }
}
/* Product ID cell: clean 2-row grid that never clips or duplicates titles. */
.hs-product-cell {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 6px;
  row-gap: 5px;
  padding: 4px 0;
  box-sizing: border-box;
}
.hs-product-cell.is-single-col {
  grid-template-columns: minmax(0, 1fr);
}
.hs-product-cell > .el-input {
  min-width: 0;
  width: 100%;
}
.hs-product-cell > .el-input .el-input__wrapper {
  padding: 0 8px !important;
  height: 26px !important;
  min-height: 26px !important;
  border-radius: 6px !important;
}
.hs-product-cell > .el-input .el-input__inner {
  height: 24px !important;
  line-height: 24px !important;
  font-size: 12px !important;
  font-variant-numeric: tabular-nums;
}
.hs-product-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 9px;
  border: 1px solid #bfe0e2;
  border-radius: 6px;
  background: #edf8f8;
  color: #087f8c;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  transition: background-color .15s, border-color .15s, color .15s;
}
.hs-product-action:hover:not(:disabled):not(.is-disabled) {
  background: #dff3f3;
  border-color: #7cc0c6;
  color: #066976;
}
.hs-product-action:disabled,
.hs-product-action.is-disabled {
  opacity: .5;
  cursor: not-allowed;
}
.hs-product-meta {
  grid-column: 1 / -1;
  min-width: 0;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #748496;
}
.hs-product-meta.is-matched {
  color: #0e7a78;
  font-weight: 500;
}
.hs-product-meta.is-error {
  color: #b84a27;
}
.hs-product-select {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  height: 24px;
  padding: 0 20px 0 7px;
  border: 1px solid #cce3e5;
  border-radius: 5px;
  background-color: #f4fbfb;
  color: #0e7a78;
  font-size: 12px;
  line-height: 22px;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
  text-overflow: ellipsis;
}
.hs-product-select:hover:not(:disabled) {
  border-color: #7cc0c6;
  background-color: #eaf7f7;
}
.hs-product-select:focus {
  border-color: #087f8c;
  box-shadow: 0 0 0 2px #087f8c22;
}
.hs-product-select:disabled {
  opacity: .6;
  cursor: not-allowed;
}
