Files
yingqing/core/frontend/src/video-replace-page.css
T

1366 lines
30 KiB
CSS

/* 视频复刻 · 对照影擎 replace-page。不重写共享 .btn/.pill/.input/.chip/.textarea。 */
.vrep-page {
--klein: #002fa7;
--klein-hover: #002680;
--muted: #6f747c;
--text: #17181a;
--shadow-card: 0 8px 20px rgba(20, 27, 38, 0.09);
width: 100%;
max-width: none;
box-sizing: border-box;
margin: -24px -28px -60px;
padding: 52px clamp(40px, 3.2vw, 68px) 48px;
}
@media (max-width: 1100px) {
.vrep-page { margin: -28px -24px -48px; }
}
.vrep-page .vrep-inner {
width: min(1560px, 100%);
margin: 0 auto;
}
.vrep-page .video-tool-page {
min-height: calc(100vh - 116px - 100px);
}
.vrep-page .page-header {
min-height: 76px;
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 30px;
margin-bottom: 34px;
}
.vrep-page .image-title-row {
display: flex;
align-items: flex-start;
gap: 13px;
}
.vrep-page .image-back-button {
width: 38px;
height: 38px;
display: grid;
place-items: center;
flex: 0 0 auto;
margin-top: 2px;
border: 1px solid rgba(0, 47, 167, 0.46);
border-radius: 12px;
color: var(--klein);
background: rgba(255, 255, 255, 0.82);
cursor: pointer;
box-shadow: 0 5px 14px rgba(0, 47, 167, 0.07);
transition: background-color 180ms ease, transform 180ms ease;
}
.vrep-page .image-back-button:hover {
transform: translateX(-2px);
border-color: var(--klein);
background: rgba(0, 47, 167, 0.055);
}
.vrep-page .image-back-button svg { width: 19px; height: 19px; }
.vrep-page .page-heading h1 {
margin: 0 0 10px;
font-size: 32px;
line-height: 1.2;
font-weight: 600;
letter-spacing: -.02em;
color: var(--text);
}
.vrep-page .video-flow-grid {
display: grid;
grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
gap: 22px;
margin-top: 26px;
}
.vrep-page .video-flow-panel,
.vrep-page .video-result-panel {
padding: 24px;
border: 1px solid rgba(34, 42, 54, 0.1);
border-radius: 16px;
background: rgba(255, 255, 255, 0.92);
box-shadow: var(--shadow-card);
}
.vrep-page .replace-flow-panel,
.vrep-page .replace-result-panel {
position: relative;
overflow: hidden;
}
.vrep-page .replace-flow-panel::before,
.vrep-page .replace-result-panel::before {
content: "";
position: absolute;
inset: 0 0 auto;
z-index: 3;
height: 3px;
}
.vrep-page .replace-flow-panel::before {
background: var(--klein);
}
.vrep-page .replace-result-panel::before {
background: #101012;
transition: background-color 220ms ease;
}
.vrep-page .replace-result-panel.has-result::before {
background: var(--klein);
}
.vrep-page .replace-result-panel {
display: flex;
flex-direction: column;
background:
radial-gradient(circle at 78% 16%, rgba(0, 47, 167, 0.1), transparent 28%),
linear-gradient(rgba(34, 42, 54, 0.025) 1px, transparent 1px),
linear-gradient(90deg, rgba(34, 42, 54, 0.025) 1px, transparent 1px),
rgba(252, 253, 255, 0.96);
background-size: auto, 38px 38px, 38px 38px, auto;
}
.vrep-page .video-flow-panel h2,
.vrep-page .video-result-panel h2 {
margin: 0;
font-size: 20px;
font-weight: 600;
color: var(--text);
}
.vrep-page .replace-mode-switch {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 6px;
margin: 16px 0 22px;
padding: 5px;
border: 1px solid rgba(34, 42, 54, 0.09);
border-radius: 14px;
background: rgba(241, 244, 249, 0.88);
}
.vrep-page .replace-mode-button {
min-height: 48px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 9px;
border: 0;
border-radius: 10px;
color: #69758a;
background: transparent;
font: inherit;
font-size: 12px;
font-weight: 700;
cursor: pointer;
transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.vrep-page .replace-mode-button svg {
width: 17px;
height: 17px;
}
.vrep-page .replace-mode-button.active {
color: var(--klein);
background: #fff;
box-shadow: 0 7px 18px rgba(22, 45, 92, 0.09), inset 0 0 0 1px rgba(0, 47, 167, 0.11);
}
.vrep-page .replace-mode-button:disabled {
cursor: not-allowed;
opacity: 0.55;
}
.vrep-page .video-flow-step {
margin-top: 22px;
}
.vrep-page .video-flow-step-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 9px;
}
.vrep-page .video-flow-step-head strong {
font-size: 14px;
font-weight: 600;
color: var(--text);
}
.vrep-page .video-flow-step-head span {
color: var(--muted);
font-size: 11px;
}
.vrep-page .video-upload-field {
min-height: 148px;
display: grid;
place-items: center;
padding: 22px;
border: 1px dashed rgba(0, 47, 167, 0.3);
border-radius: 13px;
color: #42506a;
background: rgba(0, 47, 167, 0.04);
text-align: center;
transition: border-color 160ms ease, background 160ms ease;
}
.vrep-page .video-upload-field:hover,
.vrep-page .video-upload-field.has-file,
.vrep-page .video-upload-field.is-dragover {
border-color: var(--klein);
background: rgba(0, 47, 167, 0.075);
}
/* 拖拽悬停:实线 + 略深底,和「已选好」区分开 */
.vrep-page .video-upload-field.is-dragover {
border-style: solid;
background: rgba(0, 47, 167, 0.11);
}
/* 已有预览时容器让位给视频本身 */
.vrep-page .video-upload-field.has-preview {
min-height: 0;
padding: 12px;
border-style: solid;
place-items: stretch;
text-align: left;
}
.vrep-page .video-upload-trigger {
display: grid;
place-items: center;
gap: 8px;
min-width: 0;
width: 100%;
padding: 0;
border: 0;
background: none;
color: inherit;
font: inherit;
text-align: center;
cursor: pointer;
}
.vrep-page .video-upload-trigger:disabled { cursor: default; opacity: .6; }
.vrep-page .video-upload-preview {
display: grid;
grid-template-columns: minmax(0, 132px) minmax(0, 1fr) auto;
align-items: center;
gap: 14px;
width: 100%;
min-width: 0;
}
.vrep-page .video-upload-preview video {
width: 100%;
aspect-ratio: 9 / 16;
max-height: 168px;
border-radius: 8px;
background: #0f1728;
object-fit: contain;
}
.vrep-page .video-upload-preview-meta {
display: grid;
gap: 4px;
min-width: 0;
}
.vrep-page .video-upload-change {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 13px;
border: 1px solid rgba(0, 47, 167, 0.3);
border-radius: 8px;
background: transparent;
color: var(--klein);
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: background 160ms ease, border-color 160ms ease;
}
.vrep-page .video-upload-change:hover:not(:disabled) {
border-color: var(--klein);
background: rgba(0, 47, 167, 0.075);
}
.vrep-page .video-upload-change:disabled { opacity: .5; cursor: default; }
.vrep-page .video-upload-change svg { width: 15px; height: 15px; }
@media (max-width: 720px) {
.vrep-page .video-upload-preview {
grid-template-columns: minmax(0, 96px) minmax(0, 1fr);
}
.vrep-page .video-upload-change { grid-column: 1 / -1; justify-content: center; }
}
/* 只给空态大图标撑到 28px:更换按钮里的小图标不能被这条盖掉 */
.vrep-page .video-upload-trigger > svg {
width: 28px;
height: 28px;
color: var(--klein);
}
.vrep-page .video-upload-field strong {
color: var(--text);
font-size: 14px;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 100%;
}
.vrep-page .video-upload-field small {
color: var(--muted);
font-size: 12px;
}
/* 临时上传商品图:拖拽悬停沿用「已选中」的蓝框,再压一层底色区分 */
.vrep-page .replace-temporary-method.is-dragover {
border-color: var(--klein);
background: rgba(0, 47, 167, 0.11);
}
/* 进页面先确认后端有没有在跑的任务。确认完之前不给看空表单,也不让提交 ——
否则用户以为没任务,又传一遍,重复扣费。 */
/* 面板是 flex column,不给 flex:1 + min-height 就会顶在最上面、下面留一大块空 */
.vrep-page .replace-restoring-state {
min-height: 470px;
flex: 1;
display: none;
place-items: center;
text-align: center;
}
/* 读取任务状态期间左侧整块不可操作:只锁提交按钮不够,用户照样能点/拖上传 */
.vrep-page .replace-flow-panel.is-locked,
.vrep-page .video-flow-panel.is-locked {
pointer-events: none;
opacity: 0.55;
filter: saturate(0.85);
transition: opacity 160ms ease;
}
.vrep-page .replace-result-panel.is-restoring .replace-restoring-state { display: grid; }
.vrep-page .replace-result-panel.is-restoring .video-result-placeholder,
.vrep-page .replace-result-panel.is-restoring .replace-generating-state,
.vrep-page .replace-result-panel.is-restoring .video-analysis-result { display: none; }
.vrep-page .replace-restoring-content {
display: grid;
justify-items: center;
gap: 10px;
width: min(280px, 100%);
}
.vrep-page .replace-restoring-content strong { color: var(--text); font-size: 16px; font-weight: 600; }
.vrep-page .replace-restoring-content span:not(.replace-restoring-spinner) {
color: var(--muted);
font-size: 12px;
line-height: 1.55;
}
.vrep-page .replace-restoring-spinner {
width: 26px;
height: 26px;
border-radius: 50%;
border: 2px solid rgba(0, 47, 167, 0.16);
border-top-color: var(--klein);
animation: replace-restoring-spin 0.8s linear infinite;
}
@keyframes replace-restoring-spin { to { transform: rotate(360deg); } }
.vrep-page .video-flow-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-top: 22px;
}
.vrep-page .primary-action,
.vrep-page .secondary-action,
.asset-library-layer .primary-action,
.asset-library-layer .secondary-action {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 9px;
border-radius: 11px;
cursor: pointer;
font: inherit;
transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.vrep-page .primary-action,
.asset-library-layer .primary-action {
min-width: 158px;
height: 50px;
padding: 0 22px;
color: #fff;
background: var(--klein);
border: 0;
box-shadow: 0 9px 18px rgba(0, 47, 167, 0.18);
}
.vrep-page .primary-action:hover:not(:disabled),
.asset-library-layer .primary-action:hover:not(:disabled) {
transform: translateY(-2px);
background: var(--klein-hover);
}
.vrep-page .primary-action:disabled,
.asset-library-layer .primary-action:disabled {
opacity: 0.38;
transform: none;
box-shadow: none;
cursor: not-allowed;
}
.vrep-page .secondary-action,
.asset-library-layer .secondary-action {
min-width: 132px;
height: 46px;
padding: 0 18px;
color: var(--text);
border: 1px solid rgba(28, 34, 43, 0.12);
background: rgba(34, 42, 54, 0.05);
}
.vrep-page .secondary-action:hover:not(:disabled),
.asset-library-layer .secondary-action:hover:not(:disabled) {
background: rgba(34, 42, 54, 0.10);
}
.vrep-page .primary-action svg,
.vrep-page .secondary-action svg,
.asset-library-layer .primary-action svg,
.asset-library-layer .secondary-action svg {
width: 19px;
height: 19px;
}
.vrep-page .product-replace-options {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}
.vrep-page .replace-product-method {
position: relative;
min-width: 0;
min-height: 112px;
display: grid;
grid-template-columns: 46px minmax(0, 1fr) auto;
align-items: center;
gap: 13px;
padding: 16px;
border: 1px solid rgba(34, 42, 54, 0.11);
border-radius: 13px;
color: var(--text);
background: rgba(249, 250, 252, 0.92);
font: inherit;
text-align: left;
cursor: pointer;
overflow: hidden;
transition: border-color 170ms ease, background-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}
/* 选中商品后不再整块铺商品图:图一花文字就读不了,active 的蓝底也被盖没。
改成图标位直接放缩略图,文字保持全对比度。 */
.vrep-page .replace-product-method-background { display: none; }
.vrep-page .replace-product-method.has-product-preview .replace-product-method-icon {
padding: 0;
overflow: hidden;
border-color: rgba(0, 47, 167, 0.22);
background: #f1f5ff;
}
.vrep-page .replace-product-method-icon img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
border-radius: inherit;
}
.vrep-page .replace-product-method:hover {
border-color: rgba(0, 47, 167, 0.28);
transform: translateY(-1px);
}
.vrep-page .replace-product-method.active {
border-color: var(--klein);
background: #f1f5ff;
box-shadow: inset 0 0 0 1px var(--klein);
}
.vrep-page .replace-product-method-icon {
width: 46px;
height: 46px;
display: grid;
place-items: center;
border: 1px solid rgba(0, 47, 167, 0.12);
border-radius: 13px;
color: var(--klein);
background: #fff;
box-shadow: 0 8px 18px rgba(0, 47, 167, 0.07);
}
.vrep-page .replace-product-method-icon svg {
width: 20px;
height: 20px;
}
.vrep-page .replace-product-method-copy {
min-width: 0;
}
.vrep-page .replace-product-method-copy strong,
.vrep-page .replace-product-method-copy small {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.vrep-page .replace-product-method-copy strong {
font-size: 13px;
}
.vrep-page .replace-product-method-copy small {
margin-top: 6px;
color: var(--muted);
font-size: 11px;
}
.vrep-page .replace-product-method > svg {
width: 17px;
height: 17px;
color: #8b94a4;
}
.vrep-page .replace-temporary-preview {
display: none;
}
.vrep-page .replace-temporary-method.has-images {
min-height: 224px;
grid-template-columns: minmax(0, 1fr);
padding: 12px;
}
.vrep-page .replace-temporary-method.has-images > .replace-product-method-icon,
.vrep-page .replace-temporary-method.has-images > .replace-product-method-copy,
.vrep-page .replace-temporary-method.has-images > svg {
display: none;
}
.vrep-page .replace-temporary-method.has-images .replace-temporary-preview {
width: 100%;
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(100px, 0.72fr);
align-items: stretch;
gap: 10px;
}
.vrep-page .replace-temporary-grid {
aspect-ratio: 1;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-rows: repeat(3, minmax(0, 1fr));
gap: 4px;
padding: 6px;
border: 1px solid rgba(34, 42, 54, 0.09);
border-radius: 11px;
background: #fff;
}
.vrep-page .replace-temporary-cell {
position: relative;
min-width: 0;
overflow: hidden;
border: 1px solid rgba(34, 42, 54, 0.09);
border-radius: 7px;
background: #e9edf4;
}
.vrep-page .replace-temporary-cell.empty {
border-style: dashed;
border-color: rgba(0, 47, 167, 0.13);
background: rgba(248, 250, 255, 0.72);
}
.vrep-page .replace-temporary-cell img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
.vrep-page .replace-temporary-remove {
position: absolute;
top: 3px;
right: 3px;
width: 18px;
height: 18px;
display: grid;
place-items: center;
border: 0;
border-radius: 5px;
color: #fff;
background: rgba(16, 16, 18, 0.72);
font: inherit;
font-size: 13px;
line-height: 1;
cursor: pointer;
}
.vrep-page .replace-temporary-more {
display: grid;
place-items: center;
align-content: center;
gap: 7px;
padding: 12px;
border: 1px dashed rgba(0, 47, 167, 0.28);
border-radius: 11px;
color: #38455d;
background: #f3f7ff;
text-align: center;
}
.vrep-page .replace-temporary-more > span:first-child {
width: 36px;
height: 36px;
display: grid;
place-items: center;
border-radius: 11px;
color: var(--klein);
background: #fff;
}
.vrep-page .replace-temporary-more svg {
width: 18px;
height: 18px;
}
.vrep-page .replace-temporary-more strong {
font-size: 12px;
}
.vrep-page .replace-temporary-count {
color: var(--muted);
font-size: 10px;
}
.vrep-page .replace-temporary-clear {
padding: 5px 8px;
border: 0;
border-radius: 6px;
color: #778196;
background: rgba(255, 255, 255, 0.78);
font: inherit;
font-size: 10px;
cursor: pointer;
}
.vrep-page .replace-generate-action {
justify-content: flex-end;
}
.vrep-page .replace-generate-action .primary-action {
min-width: 230px;
}
.vrep-page .replace-result-actions {
justify-content: flex-end;
gap: 12px;
}
.vrep-page .replace-result-panel.has-result .video-analysis-result {
flex: 1;
min-height: 470px;
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 24px;
}
.vrep-page .replace-result-panel.has-result .replace-preview,
.vrep-page .replace-result-panel.has-result .replace-preview-meta,
.vrep-page .replace-result-panel.has-result .replace-result-actions {
margin-top: 0;
}
.vrep-page .replace-placeholder-visual {
position: relative;
width: 104px;
height: 104px;
display: grid;
place-items: center;
margin-bottom: 26px;
border: 1px solid rgba(16, 16, 18, 0.1);
border-radius: 28px;
background: rgba(255, 255, 255, 0.9);
box-shadow: 0 12px 28px rgba(22, 45, 92, 0.07);
}
.vrep-page .replace-placeholder-visual::before,
.vrep-page .replace-placeholder-visual::after {
display: none;
}
.vrep-page .replace-placeholder-visual > span {
position: relative;
width: 46px;
height: 46px;
display: grid;
place-items: center;
border-radius: 14px;
color: var(--klein);
background: rgba(0, 47, 167, 0.07);
}
.vrep-page .replace-placeholder-visual svg {
width: 22px;
height: 22px;
color: var(--klein);
}
.vrep-page .video-result-placeholder,
.vrep-page .video-analysis-result {
min-height: 360px;
}
.vrep-page .video-result-placeholder {
display: grid;
place-items: center;
color: var(--muted);
text-align: center;
}
.vrep-page .video-result-placeholder > div {
display: grid;
place-items: center;
gap: 10px;
}
.vrep-page .replace-result-panel .video-result-placeholder {
min-height: 470px;
flex: 1;
}
.vrep-page .replace-result-panel .video-result-placeholder > div {
transform: translateY(24px);
}
.vrep-page .video-analysis-result {
display: none;
}
.vrep-page .video-result-panel.has-result .video-result-placeholder {
display: none;
}
.vrep-page .video-result-panel.has-result .video-analysis-result {
display: flex;
flex-direction: column;
}
.vrep-page .replace-generating-state {
min-height: 470px;
flex: 1;
display: none;
place-items: center;
text-align: center;
}
.vrep-page .replace-result-panel.is-generating .video-result-placeholder,
.vrep-page .replace-result-panel.is-generating .video-analysis-result {
display: none;
}
.vrep-page .replace-result-panel.is-generating .replace-generating-state {
display: grid;
}
.vrep-page .replace-generating-content {
width: min(300px, 100%);
display: grid;
justify-items: center;
gap: 10px;
}
.vrep-page .replace-generating-visual {
position: relative;
width: 136px;
height: 104px;
margin-bottom: 14px;
}
.vrep-page .replace-generating-frame {
position: absolute;
inset: 4px 18px 18px 4px;
display: grid;
place-items: center;
overflow: hidden;
border: 1px solid rgba(16, 16, 18, 0.11);
border-radius: 20px;
color: #101012;
background: rgba(255, 255, 255, 0.94);
box-shadow: 0 14px 30px rgba(22, 45, 92, 0.08);
}
.vrep-page .replace-generating-frame svg {
width: 27px;
height: 27px;
stroke-width: 1.7;
}
.vrep-page .replace-generating-frame::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(110deg, transparent 28%, rgba(0, 47, 167, 0.13) 50%, transparent 72%);
transform: translateX(-130%);
animation: replace-frame-scan 1.35s ease-in-out infinite;
}
.vrep-page .replace-generating-product {
position: absolute;
right: 0;
bottom: 0;
width: 44px;
height: 44px;
display: grid;
place-items: center;
border: 3px solid #fff;
border-radius: 14px;
color: #fff;
background: var(--klein);
box-shadow: 0 9px 20px rgba(0, 47, 167, 0.2);
animation: replace-product-pulse 1.35s ease-in-out infinite;
}
.vrep-page .replace-generating-product svg {
width: 19px;
height: 19px;
}
.vrep-page .replace-generating-content > strong {
color: var(--text);
font-size: 16px;
}
.vrep-page .replace-generating-content > span {
color: var(--muted);
font-size: 11px;
}
.vrep-page .replace-generating-bar {
width: 210px;
height: 4px;
margin-top: 8px;
overflow: hidden;
border-radius: 999px;
background: rgba(16, 16, 18, 0.08);
}
.vrep-page .replace-generating-bar span {
width: 44%;
height: 100%;
display: block;
border-radius: inherit;
background: var(--klein);
animation: replace-progress-slide 1.15s ease-in-out infinite;
}
@keyframes replace-frame-scan {
0%, 12% { transform: translateX(-130%); }
76%, 100% { transform: translateX(130%); }
}
@keyframes replace-product-pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.07); }
}
@keyframes replace-progress-slide {
0% { transform: translateX(-115%); }
100% { transform: translateX(260%); }
}
@media (prefers-reduced-motion: reduce) {
.vrep-page .replace-generating-frame::after,
.vrep-page .replace-generating-product,
.vrep-page .replace-generating-bar span {
animation: none;
}
}
.vrep-page .replace-preview {
position: relative;
min-height: 0;
display: grid;
margin-top: 16px;
overflow: hidden;
border-radius: 10px;
background: #101012;
}
.vrep-page .replace-preview video,
.vrep-page .replace-preview img {
width: 100%;
max-height: 420px;
display: block;
object-fit: contain;
background: #101012;
}
.vrep-page .replace-preview-meta {
display: grid;
gap: 4px;
margin-top: 12px;
}
.vrep-page .replace-preview-meta strong {
font-size: 15px;
font-weight: 600;
color: var(--text);
}
.vrep-page .replace-preview-meta span {
color: var(--muted);
font-size: 12px;
}
.vrep-page .replace-history-section {
margin-top: 28px;
}
.vrep-page .replace-history-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
margin-bottom: 13px;
}
.vrep-page .replace-history-head h2 {
margin: 0;
font-size: 19px;
font-weight: 600;
color: var(--text);
}
.vrep-page .replace-history-head span {
color: var(--muted);
font-size: 12px;
}
.vrep-page .replace-history-list {
display: grid;
gap: 10px;
}
.vrep-page .replace-history-empty {
padding: 28px 16px;
border: 1px solid rgba(0, 47, 167, 0.12);
border-radius: 12px;
color: var(--muted);
background: rgba(255, 255, 255, 0.72);
font-size: 13px;
text-align: center;
}
.vrep-page .replace-history-card {
position: relative;
overflow: hidden;
border: 1px solid rgba(0, 47, 167, 0.12);
border-radius: 12px;
background: rgba(255, 255, 255, 0.92);
box-shadow: 0 8px 20px rgba(22, 45, 92, 0.05);
}
.vrep-page .replace-history-card::before {
content: "";
position: absolute;
inset: 0 auto 0 0;
width: 3px;
background: var(--klein);
}
.vrep-page .replace-history-summary {
width: 100%;
display: grid;
grid-template-columns: 148px minmax(0, 1fr) auto;
align-items: center;
gap: 16px;
padding: 12px 14px 12px 16px;
border: 0;
color: inherit;
background: transparent;
font: inherit;
text-align: left;
cursor: pointer;
}
.vrep-page .replace-history-summary:hover {
background: rgba(0, 47, 167, 0.035);
}
.vrep-page .replace-history-cover {
position: relative;
height: 84px;
overflow: hidden;
border-radius: 8px;
background: #e9eef8;
}
.vrep-page .replace-history-cover img,
.vrep-page .replace-history-cover video {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
.vrep-page .replace-history-cover span {
position: absolute;
right: 8px;
bottom: 8px;
padding: 3px 6px;
border-radius: 4px;
color: #fff;
background: rgba(16, 16, 18, 0.76);
font-size: 10px;
font-weight: 600;
}
.vrep-page .replace-history-copy {
min-width: 0;
display: grid;
gap: 6px;
}
.vrep-page .replace-history-copy > span {
width: fit-content;
display: inline-flex;
padding: 3px 8px;
border-radius: 999px;
color: var(--klein);
background: #eef3ff;
font-size: 10px;
font-weight: 600;
}
.vrep-page .replace-history-copy strong {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 15px;
font-weight: 600;
color: var(--text);
}
.vrep-page .replace-history-copy small {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--muted);
font-size: 12px;
}
.vrep-page .replace-history-toggle {
min-height: 36px;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 0 12px;
border: 1px solid rgba(0, 47, 167, 0.18);
border-radius: 8px;
color: var(--klein);
background: #fff;
font-size: 12px;
font-weight: 500;
white-space: nowrap;
}
.vrep-page .replace-history-toggle svg {
width: 16px;
height: 16px;
transition: transform 180ms ease;
}
.vrep-page .replace-history-card.is-open .replace-history-toggle svg {
transform: rotate(180deg);
}
.vrep-page .replace-history-compare {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
padding: 0 14px 14px 16px;
border-top: 1px solid rgba(34, 42, 54, 0.08);
}
.vrep-page .replace-history-compare[hidden] {
display: none;
}
.vrep-page .replace-history-compare-pane {
min-width: 0;
display: grid;
gap: 8px;
padding-top: 12px;
}
.vrep-page .replace-history-compare-pane > span {
color: var(--muted);
font-size: 12px;
font-weight: 500;
}
.vrep-page .replace-history-compare-pane video,
.vrep-page .replace-history-compare-empty {
width: 100%;
aspect-ratio: 9 / 16;
max-height: 360px;
display: grid;
place-items: center;
overflow: hidden;
border-radius: 8px;
background: #101012;
}
.vrep-page .replace-history-compare-pane video {
display: block;
object-fit: contain;
}
.vrep-page .replace-history-compare-empty {
color: rgba(255, 255, 255, 0.62);
font-size: 12px;
}
/* 挂到 body,盖住顶栏。变量写在本层,不依赖 .vrep-page */
.asset-library-layer {
--klein: #002fa7;
--klein-hover: #002680;
--muted: #6f747c;
--text: #17181a;
position: fixed;
inset: 0;
z-index: var(--z-overlay);
visibility: hidden;
opacity: 0;
pointer-events: none;
transition: visibility 0s linear 260ms, opacity 220ms ease;
}
.asset-library-layer.open {
visibility: visible;
opacity: 1;
pointer-events: auto;
transition-delay: 0s;
}
.asset-library-scrim {
position: absolute;
inset: 0;
border: 0;
background: rgba(6, 9, 15, 0.58);
cursor: default;
}
.asset-library-drawer {
position: absolute;
top: 0;
right: 0;
width: min(650px, 48vw);
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
background: #fff;
box-shadow: -22px 0 48px rgba(7, 12, 22, 0.2);
transform: translateX(100%);
transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
.asset-library-layer.open .asset-library-drawer {
transform: translateX(0);
}
.asset-library-head {
min-height: 82px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
padding: 0 24px;
border-bottom: 1px solid rgba(34, 42, 54, 0.09);
}
.asset-library-head h2 {
margin: 0 0 4px;
font-size: 21px;
}
.asset-library-head p {
margin: 0;
color: var(--muted);
font-size: 11px;
}
.asset-library-layer .product-drawer-close {
width: 38px;
height: 38px;
display: grid;
place-items: center;
border: 1px solid rgba(34, 42, 54, 0.10);
border-radius: 11px;
color: var(--muted);
background: rgba(34, 42, 54, 0.045);
cursor: pointer;
transition: color 160ms ease, background-color 160ms ease;
}
.asset-library-layer .product-drawer-close:hover {
color: var(--text);
background: rgba(34, 42, 54, 0.09);
}
.asset-library-layer .product-drawer-close svg {
width: 18px;
height: 18px;
}
.asset-library-grid {
min-height: 0;
flex: 1;
overflow-y: auto;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
align-content: start;
gap: 12px;
padding: 22px 24px;
}
.asset-library-choice {
position: relative;
min-height: 214px;
overflow: hidden;
border: 1px solid rgba(34, 42, 54, 0.1);
border-radius: 13px;
background: #f7f8fa;
cursor: pointer;
font: inherit;
padding: 0;
transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.asset-library-choice:hover {
transform: translateY(-2px);
border-color: rgba(0, 47, 167, 0.32);
box-shadow: 0 10px 24px rgba(20, 27, 38, 0.08);
}
.asset-library-choice.selected {
border-color: var(--klein);
box-shadow: 0 0 0 2px rgba(0, 47, 167, 0.1);
}
.asset-library-choice img {
width: 100%;
height: 164px;
display: block;
object-fit: cover;
background: #e9eef8;
}
.asset-library-choice > span:not(.asset-choice-check) {
display: grid;
gap: 3px;
padding: 10px;
text-align: left;
}
.asset-library-choice strong { font-size: 11px; }
.asset-library-choice small { color: var(--muted); font-size: 9px; }
.asset-choice-check {
position: absolute;
top: 9px;
right: 9px;
width: 24px;
height: 24px;
display: none;
place-items: center;
border-radius: 50%;
color: #fff;
background: var(--klein);
}
.asset-library-choice.selected .asset-choice-check { display: grid; }
.asset-choice-check svg { width: 13px; height: 13px; }
.asset-library-footer {
min-height: 82px;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 10px;
padding: 0 24px;
border-top: 1px solid rgba(34, 42, 54, 0.09);
background: #fff;
box-shadow: 0 -10px 24px rgba(20, 27, 38, 0.045);
}
.asset-library-empty {
grid-column: 1 / -1;
padding: 36px 12px;
color: var(--muted);
font-size: 13px;
text-align: center;
}
@media (max-width: 1120px) {
.vrep-page .video-flow-grid { grid-template-columns: 1fr; }
.vrep-page .product-replace-options { grid-template-columns: 1fr; }
.vrep-page .replace-history-summary {
grid-template-columns: 1fr;
}
.vrep-page .replace-history-toggle {
justify-self: start;
}
.vrep-page .replace-history-compare {
grid-template-columns: 1fr;
}
.asset-library-drawer {
width: min(650px, 100vw);
}
.asset-library-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}