/* 可视化装修 · 与 admin.css D11 token 对齐 */
.visual-editor-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  gap: var(--ding-space-3, 12px);
  width: 100%;
}

.visual-editor-layout {
  display: flex;
  gap: var(--ding-space-3, 12px);
  align-items: stretch;
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.ve-panel--global,
.ve-panel--props,
.ve-canvas-col {
  background: var(--ding-surface, #fff);
  border: none;
  border-radius: var(--ding-radius-xl, 12px);
  box-shadow: var(--ding-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04));
  padding: var(--ding-space-3, 12px);
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  max-height: 100%;
}

.ve-panel--global,
.ve-panel--props {
  flex-shrink: 0;
  max-width: 100%;
  overflow-y: auto;
}

.ve-panel--global {
  flex: 15 1 0;
  align-self: stretch;
  min-height: 0;
}

.ve-panel--props {
  flex: 40 1 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ve-canvas-col {
  flex: 45 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(143, 149, 158, 0.35) transparent;
}
.ve-canvas-col::-webkit-scrollbar,
.ve-device-scroll::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
.ve-canvas-col::-webkit-scrollbar-thumb,
.ve-device-scroll::-webkit-scrollbar-thumb {
  background: rgba(143, 149, 158, 0.35);
  border-radius: 4px;
}
.ve-canvas-col::-webkit-scrollbar-track,
.ve-device-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.ve-panel-title {
  font-size: var(--ding-font-nav, 13px);
  font-weight: 600;
  color: var(--ding-text-secondary, #373c43);
  margin-bottom: var(--ding-space-2, 8px);
  letter-spacing: 0.01em;
}

.ve-module-item {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
  border: 1px solid var(--ding-border, #e5e6eb);
  background: var(--ding-surface, #fff);
  border-radius: var(--ding-radius-lg, 10px);
  padding: var(--ding-space-2, 8px) var(--ding-space-3, 10px);
  font-size: var(--ding-font-nav, 13px);
  color: var(--ding-muted, #646a73);
  cursor: pointer;
  margin-bottom: var(--ding-space-2, 6px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ve-module-item:hover {
  border-color: #c9cdd4;
  background: #fafbfc;
}

.ve-module-item.is-on {
  border-color: var(--ding-brand, #0089ff);
  color: var(--ding-brand, #0089ff);
  font-weight: 600;
  background: var(--ding-brand-soft, #e6f3ff);
  box-shadow: var(--ding-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04));
}

.ve-module-item:focus-visible {
  outline: none;
  box-shadow: var(--ding-focus-ring, 0 0 0 2px rgba(0, 137, 255, 0.2));
}

.ve-props-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ding-space-2, 8px);
  margin-bottom: var(--ding-space-1, 4px);
}

.ve-props-toolbar .el-button {
  flex: 0 0 auto;
  max-width: 100%;
  margin: 0 !important;
}

.ve-panel--props .el-button,
.ve-panel--global .el-button {
  width: auto;
  max-width: 100%;
}

.ve-panel--props .el-table {
  width: 100% !important;
  border-radius: var(--ding-radius-md, 8px);
  overflow: hidden;
  margin-top: var(--ding-space-2, 8px);
}

.ve-panel--props .el-table .cell {
  padding-left: 6px;
  padding-right: 6px;
}

.ve-panel--props .el-table .el-button--text {
  padding-left: 4px;
  padding-right: 4px;
}

.ve-panel--props p {
  font-size: var(--ding-font-nav, 13px);
  color: var(--ding-muted, #646a73);
  line-height: var(--ding-line-height, 1.5);
  margin: 0 0 var(--ding-space-2, 8px);
}

.ve-panel--global .el-select {
  width: 100%;
  max-width: 100%;
}

.ve-panel--global .el-input__inner {
  border-radius: var(--ding-radius-md, 8px);
  border-color: var(--ding-border, #e5e6eb);
}

.ve-hint {
  font-size: var(--ding-font-caption, 12px);
  color: var(--ding-placeholder, #8f959e);
  text-align: center;
  margin: 0;
  line-height: 1.45;
  flex-shrink: 0;
  padding: 0 var(--ding-space-2, 8px);
}

.ve-canvas-col .ve-device-scroll {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.ve-device-scroll.is-overflow-fallback {
  align-items: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
}

.ve-device-scale-host {
  position: relative;
  flex-shrink: 0;
  max-width: 100%;
  max-height: 100%;
}

.ve-device {
  border-radius: 2rem;
  border: 10px solid #1a1a1a;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

.ve-device.is-tablet {
  border-radius: 1.25rem;
}

.ve-device.is-tablet .ve-home-indicator {
  display: none;
}

.ve-status-bar {
  height: 44px;
  padding: 12px 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  background: #e2f6fb;
}

.ve-wx-nav {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  background: #e2f6fb;
}

.ve-wx-capsule {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.85);
}

.ve-device-screen {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #f5fbfd;
}

.ve-device-screen--full {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 1.35rem 1.35rem 0 0;
  overflow: hidden;
  position: relative;
}

.ve-iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: none;
  background: #f5fbfd;
  flex: 1 1 auto;
}

.ve-preview-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 20px;
  text-align: center;
  background: linear-gradient(180deg, #f5fbfd 0%, #e8f6fa 100%);
  pointer-events: none;
}

.ve-preview-loading-icon {
  font-size: 28px;
  color: #3d8fa8;
}

.ve-preview-loading-title {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a3a44;
}

.ve-preview-loading-tip {
  margin: 0;
  max-width: 240px;
  font-size: 12px;
  line-height: 1.5;
  color: #5a7a85;
}

.ve-page-tabs {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.ve-page-tabs .el-radio-button__inner {
  padding: 7px 8px;
  font-size: 12px;
}

.ve-home-indicator {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: #111;
  border-radius: 999px;
  opacity: 0.85;
  z-index: 20;
  pointer-events: none;
}

.ve-device-meta {
  font-size: var(--ding-font-caption, 12px);
  color: var(--ding-placeholder, #8f959e);
  text-align: center;
  flex-shrink: 0;
}

.ve-props-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 4px 16px;
}

.ve-props-section {
  margin-top: 0;
  padding-top: 4px;
}

.ve-panel--props .ve-props-section + .ve-props-section {
  margin-top: 16px;
}

.ve-field-hint {
  font-size: var(--ding-font-caption, 12px);
  color: var(--ding-placeholder, #8f959e);
  line-height: 1.45;
  margin: var(--ding-space-2, 8px) 0;
}

.ve-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  min-height: 32px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ding-text-secondary, #373c43);
}

.ve-panel--props .el-switch {
  flex-shrink: 0;
}

.ve-panel--props .el-button--mini,
.ve-panel--props .el-button--small {
  font-size: 12px;
  padding: 7px 12px;
}

.ve-panel--props .el-button--text.el-button--mini {
  padding: 4px 6px;
  font-size: 12px;
}

.ve-inline-form {
  margin-top: 8px;
}

.ve-inline-form--compact .el-form-item {
  margin-bottom: 12px;
}

.ve-panel--props .ve-inline-form .el-form-item__label {
  font-size: 12px;
  color: var(--ding-text-secondary, #373c43);
  line-height: 32px;
  padding-right: 8px;
}

.ve-panel--props .ve-inline-form .el-form-item__content {
  line-height: 32px;
}

.ve-panel--props .el-select .el-input__inner {
  height: 28px;
  line-height: 28px;
  font-size: 12px;
}

.ve-banner-list {
  display: flex;
  flex-direction: column;
  gap: var(--ding-space-2, 8px);
  margin-top: var(--ding-space-2, 8px);
}

.ve-banner-row {
  display: flex;
  align-items: center;
  gap: var(--ding-space-2, 8px);
  padding: var(--ding-space-2, 8px);
  border: 1px solid var(--ding-border, #e5e6eb);
  border-radius: var(--ding-radius-lg, 10px);
  background: #fafbfc;
  cursor: grab;
}

.ve-banner-row:active {
  cursor: grabbing;
}

.ve-banner-drag {
  color: var(--ding-placeholder, #8f959e);
  font-size: 14px;
  user-select: none;
  flex-shrink: 0;
}

.ve-banner-thumb {
  width: 72px;
  height: 48px;
  border-radius: var(--ding-radius-sm, 6px);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--ding-border, #e5e6eb);
  background: #fff;
}

.ve-banner-meta {
  flex: 1;
  min-width: 0;
}

.ve-banner-title {
  font-size: var(--ding-font-nav, 13px);
  font-weight: 500;
  color: var(--ding-text, #1f2329);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ve-banner-actions {
  flex-shrink: 0;
}

.ve-featured-list {
  margin-top: var(--ding-space-2, 8px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ve-featured-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--ding-border, #e5e6eb);
  border-radius: var(--ding-radius-md, 8px);
  font-size: var(--ding-font-nav, 13px);
}
.ve-featured-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--ding-border, #e5e6eb);
  border-radius: var(--ding-radius-lg, 10px);
  background: #fff;
  cursor: grab;
}
.ve-preview-tabs {
  display: flex;
  width: 100%;
}
.ve-preview-tab-panel {
  margin-top: 10px;
}
.ve-featured-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--ding-radius-sm, 6px);
  flex-shrink: 0;
  border: 1px solid var(--ding-border, #e5e6eb);
  overflow: hidden;
}
.ve-featured-main {
  flex: 1;
  min-width: 0;
}
.ve-featured-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ve-featured-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.ve-mascot-config-row {
  flex-wrap: nowrap;
  align-items: center;
  margin-top: 8px;
  margin-bottom: 0;
  gap: 10px;
  width: 100%;
}
.ve-mascot-config-row:first-of-type {
  margin-top: 8px;
}
.ve-mascot-config-label {
  flex: 0 0 76px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ding-text-secondary, #373c43);
  white-space: nowrap;
}
.ve-mascot-config-suffix {
  flex: 0 1 auto;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ding-text-secondary, #373c43);
  white-space: nowrap;
}
.ve-mascot-config-row .el-input-number {
  width: 110px;
  flex-shrink: 0;
}
.ve-mascot-config-row > .el-input {
  flex: 1;
  min-width: 0;
}

.ve-upload-inline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.ve-upload-spec {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ding-placeholder, #8f959e);
  max-width: 168px;
}

.ve-mascot-tired-block {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--ding-border, #e5e6eb);
}

.ve-mascot-tired-inner.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.ve-mascot-field-body {
  align-items: center;
}

.ve-mascot-field-body .el-button--mini {
  min-width: 96px;
}

.ve-section-head .el-button--mini {
  min-width: 72px;
}

.ve-featured-list {
  gap: 10px;
}

.ve-banner-actions,
.ve-banner-row-actions {
  align-items: center;
}

.ve-publish-dock {
  position: static;
  flex: 0 0 auto;
  flex-shrink: 0;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--ding-surface, #fff);
  border: none;
  border-radius: var(--ding-radius-xl, 12px);
  box-shadow: var(--ding-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04));
  overflow: hidden;
}
.ve-publish-dock-inner {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 12px 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}
.ve-publish-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ve-publish-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--ding-text-secondary, #373c43);
}
.ve-publish-status.is-dirty {
  color: var(--ding-warning, #ff9200);
}
.ve-publish-time {
  font-size: 12px;
  color: var(--ding-placeholder, #8f959e);
}
.ve-publish-actions {
  display: flex;
  flex-shrink: 0;
  gap: 10px;
}
.ve-tip-card {
  margin: 10px 0 12px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ding-text-secondary, #373c43);
  background: linear-gradient(135deg, #f0f7ff 0%, #fafbfc 100%);
  border: 1px dashed rgba(0, 137, 255, 0.35);
  border-radius: var(--ding-radius-md, 8px);
}
.ve-section-block {
  margin-top: 14px;
  padding-top: 4px;
}
.ve-section-block--primary {
  padding: 12px 12px 14px;
  background: #fafbfc;
  border: 1px solid var(--ding-border, #e5e6eb);
  border-radius: var(--ding-radius-lg, 10px);
  margin-top: 0;
}
.ve-section-block.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
.ve-section-block--primary {
  pointer-events: auto;
}
.ve-section-block--primary.is-disabled {
  pointer-events: auto;
  opacity: 1;
}
.ve-activity-config-body.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
.ve-subsection-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ding-placeholder, #8f959e);
  margin: 16px 0 10px;
  letter-spacing: 0.02em;
}
.ve-field-row--lg {
  margin-bottom: 12px;
  gap: 10px;
  padding: 2px 0;
  min-height: 36px;
}

.ve-field-row--lg:last-child {
  margin-bottom: 0;
}
.ve-field-strong {
  font-weight: 600;
  color: var(--ding-text, #1f2329);
}
.ve-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ve-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ding-text, #1f2329);
}
.ve-banner-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.ve-inline-label {
  font-size: 12px;
  color: var(--ding-placeholder, #8f959e);
}
.ve-shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ve-shortcut-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ding-border, #e5e6eb);
  border-radius: var(--ding-radius-lg, 10px);
  background: #fff;
  cursor: grab;
}
.ve-shortcut-label {
  flex: 1;
  font-size: 13px;
}
.ve-mascot-field {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ding-border, #e5e6eb);
}
.ve-mascot-field:last-of-type {
  border-bottom: none;
}
.ve-mascot-field-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.ve-mascot-field-head strong {
  font-size: 13px;
  color: var(--ding-text, #1f2329);
}
.ve-mascot-field-head span {
  font-size: 12px;
  color: var(--ding-placeholder, #8f959e);
  line-height: 1.45;
}
.ve-mascot-field-body {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ve-page-tabs .el-radio-button__inner {
  position: relative;
}
.ve-page-badge {
  display: inline-block;
  margin-left: 4px;
  min-width: 16px;
  padding: 0 4px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: var(--ding-warning, #ff9200);
  border-radius: 8px;
  vertical-align: middle;
}

/* 右侧配置区：按钮组、上传行、预览 Tab 内容区统一间距 */
.ve-action-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.ve-action-group .el-button + .el-button {
  margin-left: 0;
}
.ve-upload-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 4px;
}
.ve-upload-spec--block {
  max-width: 100%;
  line-height: 1.5;
}
.ve-thumb--square {
  width: 56px;
  height: 56px;
}
.ve-panel--props .ve-preview-tabs {
  margin-top: 4px;
}
.ve-panel--props .ve-preview-tabs .el-radio-button__inner {
  padding: 7px 14px;
  font-size: 12px;
}
.ve-preview-tab-panel {
  margin-top: 14px;
  padding-top: 2px;
}
.ve-panel--props .ve-inline-form .el-input__inner,
.ve-panel--props .ve-inline-form .el-textarea__inner {
  font-size: 13px;
}
.ve-panel--props .el-form-item {
  margin-bottom: 14px;
}
.ve-panel--props .ve-section-head .el-button--mini {
  min-width: 64px;
  padding: 7px 14px;
}

@media (max-width: 1100px) {
  .visual-editor-layout {
    flex-direction: column;
    max-height: none;
  }

  .ve-panel--global,
  .ve-panel--props {
    position: static;
    flex: 1 1 100%;
    width: 100%;
    max-height: none;
  }

  .ve-canvas-col {
    max-height: none;
  }
}


/* ===== 2026-10-19 统一模拟器加载过渡动画：骨架屏 + 微光扫描 ===== */
.ve-preview-loading--skeleton {
  background: linear-gradient(180deg, #f5fbfd 0%, #eef8fb 100%);
}
.ve-preview-loading--boot .ve-preview-loading-title {
  margin-top: 10px;
}
.ve-preview-boot-phone {
  position: relative;
  width: 74%;
  max-width: 230px;
  aspect-ratio: 9 / 17;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(61, 143, 168, 0.18);
  box-shadow: 0 8px 24px rgba(15, 42, 58, 0.12);
  overflow: hidden;
}
.ve-preview-boot-phone::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#e7f2f6, #e7f2f6) 12% 7% / 76% 8px,
    linear-gradient(#e7f2f6, #e7f2f6) 10% 16% / 30% 30px,
    linear-gradient(#e7f2f6, #e7f2f6) 12% 33% / 76% 52px,
    linear-gradient(#e7f2f6, #e7f2f6) 12% 50% / 38% 12px,
    linear-gradient(#e7f2f6, #e7f2f6) 12% 56% / 52% 12px,
    linear-gradient(#e7f2f6, #e7f2f6) 12% 70% / 76% 96px;
  background-repeat: no-repeat;
}
.ve-preview-boot-shimmer {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.85) 50%, transparent 58%);
  background-size: 220% 100%;
  animation: ve-shimmer-sweep 1.5s linear infinite;
  pointer-events: none;
}
@keyframes ve-shimmer-sweep {
  from { background-position: 160% 0; }
  to { background-position: -160% 0; }
}
.ve-preview-loading-hint {
  margin: 0;
  max-width: 240px;
  font-size: 12px;
  line-height: 1.5;
  color: #5a7a85;
}

.bj-tpl-table .cell {
  line-height: 1.35;
}

.bj-tpl-table .bj-scope-link {
  padding: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bj-tpl-scope-drawer .el-tabs__header {
  margin-bottom: 12px;
}
