/* Presentation for unavailable media and actual provider results. */
.media-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 140px;
  color: var(--muted, #718078);
  background: linear-gradient(135deg, #eef3ef, #e4ece9);
}
.task-type-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  color: #127c65;
  background: #edf5f0;
}
.real-video {
  display: block;
  width: 100%;
  max-height: 62vh;
  background: #17201c;
  border-radius: 16px;
}
.result-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 40vh;
  overflow: auto;
}
.summary-row strong {
  overflow-wrap: anywhere;
  min-width: 0;
}
.pack small {
  display: block;
}
/* Video generation wizard (MiniMax H3). Only the interaction inside the existing
   creation workspace is styled here; the standalone design preview shell,
   scenario controls and demo affordances are deliberately not part of the live UI. */
.h3-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.h3-mode-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}
.h3-mode-track::before {
  content: "";
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 29px;
  height: 1px;
  background: var(--border);
}
.h3-mode {
  position: relative;
  z-index: 1;
  min-height: 94px;
  padding: 16px 10px 13px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.h3-mode:last-child {
  border-right: 0;
}
.h3-mode i {
  width: 23px;
  height: 23px;
  margin: 0 auto 9px;
  display: grid;
  place-items: center;
  border: 4px solid var(--surface-2);
  border-radius: 50%;
  background: #b7c4be;
  box-shadow: 0 0 0 1px #c8d2cd;
}
.h3-mode strong,
.h3-mode small {
  display: block;
}
.h3-mode strong {
  font-size: 12px;
}
.h3-mode small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.h3-mode.selected {
  background: var(--accent-soft);
  color: var(--accent);
}
.h3-mode.selected i {
  background: var(--accent);
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}
.h3-field-grid,
.h3-frame-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.h3-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
}
.h3-field small {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.65;
}
.h3-field-error {
  display: block;
  color: #b23f39;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.h3-field-error[hidden] {
  display: none;
}
.h3-material {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.h3-material-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}
.h3-material-head strong {
  font-size: 13px;
}
.h3-material-head span {
  color: var(--muted);
  font-size: 11px;
}
.h3-material .h3-field small {
  color: var(--muted);
}
.h3-frame-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 17px;
}
.h3-frame-choice button,
.h3-resolution button {
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
}
.h3-frame-choice button.selected,
.h3-resolution button.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.h3-image-list {
  display: grid;
  gap: 10px;
}
.h3-image-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 36px;
  gap: 9px;
  align-items: center;
}
.h3-image-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #e8efeb;
  color: #5d7369;
  font-size: 11px;
  font-weight: 700;
}
.h3-remove {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: #7d8a84;
  font-size: 18px;
  line-height: 1;
}
.h3-remove:disabled {
  visibility: hidden;
}
.h3-add-material {
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid #bdd1c7;
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.h3-input-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
}
.h3-settings {
  display: grid;
  gap: 24px;
}
.h3-setting-block {
  min-width: 0;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.h3-setting-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.h3-setting-block h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.h3-setting-block > p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.h3-duration-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 18px;
  align-items: center;
}
.h3-duration-number {
  position: relative;
}
.h3-duration-number input {
  padding-right: 34px;
}
.h3-duration-number span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}
.h3-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}
.h3-resolution {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.h3-resolution button {
  min-height: 58px;
  text-align: left;
}
.h3-resolution strong,
.h3-resolution small {
  display: block;
}
.h3-resolution small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.h3-inline-note {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #fff4df;
  color: #9a5a08;
  font-size: 11px;
  line-height: 1.65;
}
.h3-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}
.h3-review-list {
  min-width: 0;
  border-top: 1px solid var(--border);
}
.h3-review-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.h3-review-row span {
  color: var(--muted);
}
.h3-review-row strong {
  max-width: 62%;
  text-align: right;
  overflow-wrap: anywhere;
}
.h3-review-aside {
  padding: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
}
.h3-review-aside strong {
  display: block;
  margin-bottom: 8px;
  color: #276a55;
  font-size: 13px;
}
.h3-review-aside p {
  margin: 0 0 11px;
  color: #526c62;
  font-size: 11px;
  line-height: 1.75;
}
.h3-review-aside p:last-child {
  margin-bottom: 0;
}
@media (max-width: 860px) {
  .h3-review {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}
@media (max-width: 620px) {
  .h3-mode-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .h3-mode-track::before {
    display: none;
  }
  .h3-mode {
    border-bottom: 1px solid var(--border);
  }
  .h3-mode:nth-child(2n) {
    border-right: 0;
  }
  .h3-mode:nth-child(n + 3) {
    border-bottom: 0;
  }
  .h3-field-grid,
  .h3-frame-grid,
  .h3-resolution {
    grid-template-columns: minmax(0, 1fr);
  }
  .h3-duration-control {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 12px;
  }
  .h3-material {
    padding: 15px;
  }
  .h3-material-head {
    align-items: flex-start;
  }
  .h3-image-row {
    grid-template-columns: 26px minmax(0, 1fr) 34px;
    gap: 7px;
  }
  .h3-review-row {
    display: grid;
    gap: 6px;
  }
  .h3-review-row strong {
    max-width: none;
    text-align: left;
  }
}
@media (max-width: 640px) {
  .task-type-icon {
    width: 48px;
    height: 48px;
  }
  .task-meta {
    overflow-wrap: anywhere;
  }
  .real-video {
    max-height: 50vh;
  }
}
