/* 创作台左栏表单控件：上传区、画幅 / 时长分段、折叠区、吸底提交；配色沿用 base.css 变量 */
/* 上传区 */
.dropzone {
  position: relative;
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-raised);
  cursor: pointer;
}

.dropzone:hover,
.dropzone:focus-within {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone[data-disabled="true"] {
  border-style: solid;
  opacity: 0.6;
  cursor: not-allowed;
}

.dropzone[data-disabled="true"]:hover {
  border-color: var(--line-strong);
  background: var(--surface-raised);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.dropzone-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--accent-text);
  background: var(--surface);
  place-items: center;
}

.dropzone-mark svg {
  width: 20px;
  height: 20px;
}

.dropzone-text {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dropzone-text strong {
  color: var(--text);
  font-size: 12.5px;
}

.dropzone-text small {
  font-size: 11px;
  line-height: 1.4;
}

.reference-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reference-list:empty {
  display: none;
}

.reference-chip {
  position: relative;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
}

.reference-chip img {
  display: block;
  width: 100%;
  border-radius: 7px;
  aspect-ratio: 1;
  object-fit: cover;
}

.reference-chip span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 输入槽容器：一个模型几个槽就几块，块之间留够间距 */
.input-slots {
  display: grid;
  gap: 14px;
}

.input-slots[hidden],
.consent-check[hidden] {
  display: none;
}

/* 被另一端点占用的槽（给了首帧就锁参考素材）：标题变淡，上传区换成说明 */
.input-slot[data-blocked] .field-head {
  opacity: 0.55;
}

.slot-blocked {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-sunken);
  font-size: 12.5px;
  line-height: 1.5;
}

/* 视频 / 音频素材卡：预览 + 文件名 · 时长 + 移除 */
.asset-chip {
  position: relative;
  display: grid;
  width: 100%;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
}

.asset-chip audio {
  width: 100%;
  height: 36px;
}

.asset-chip video {
  display: block;
  width: 100%;
  max-height: 220px;
  border-radius: 8px;
  background: var(--canvas-bg);
}

.asset-chip span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(27, 29, 34, 0.7);
  font-size: 13px;
  line-height: 1;
  place-items: center;
}

.chip-remove:hover {
  background: var(--danger);
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted-strong);
  font-size: 11.5px;
  line-height: 1.6;
}


.consent-check input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.consent-check a,
.compliance-strip a,
.risk-note a {
  color: var(--accent-text);
}

/* 折叠区：高级参数（安全声明已并入《用户协议》第 5 条，点“生成”即确认，不再逐次勾选） */
.advanced {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.advanced summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced summary > span {
  flex: none;
  white-space: nowrap;
}

.advanced summary small {
  min-width: 0;
  flex: 1;
  margin-left: auto;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  width: 7px;
  height: 7px;
  flex: none;
  margin: 0 4px 3px 0;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

details[open] > summary .chevron {
  margin: 3px 4px 0 0;
  transform: rotate(-135deg);
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--danger-line);
  border-radius: 9px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 12px;
  line-height: 1.5;
}

/* 吸底：本次消耗 + 生成按钮 */
.compose-footer {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding: 12px 0 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -18px 18px -12px rgba(27, 29, 34, 0.1);
}

.cost-note {
  margin-left: auto;
  font-size: 11px;
}

.generate {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(31, 58, 138, 0.22);
  font-size: 14.5px;
  font-weight: 800;
  transition:
    background 0.12s,
    transform 0.12s;
}

.generate svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.generate:hover {
  background: var(--accent-hover);
}

.generate:active {
  transform: translateY(1px);
}

.generate:disabled {
  opacity: 0.55;
  box-shadow: none;
}

.generate kbd {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
}

/* 合规一句话 + 三个链接并排；再长的条款放协议页，不在这里堆 */
.compliance-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.strip-links {
  display: inline-flex;
  gap: 10px;
  margin-left: auto;
  white-space: nowrap;
}

.compliance-strip button {
  padding: 0;
  border: 0;
  color: var(--accent-text);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}

.compliance-strip a,
.compliance-strip button {
  text-decoration: none;
}

.compliance-strip a:hover,
.compliance-strip button:hover {
  text-decoration: underline;
}
