/* Deepfake Studio: feature-local layout, accessibility and consent states. */
.df-studio {
  width: min(100%, 960px);
  margin-inline: auto;
  padding-inline: 4px;
}

.df-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.df-head .workflow-title {
  color: var(--t1);
  font-size: 20px;
  font-weight: 600;
}

.df-head .workflow-sub {
  color: var(--t3);
  font-size: 12px;
}

.df-field-label,
.df-section .field--stack > label {
  display: block;
  color: var(--t2);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.df-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  max-height: 188px;
  overflow: auto;
  padding: 3px;
}

.df-img-cell {
  appearance: none;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.df-img-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.df-img-cell:focus-visible,
.df-consent-check input:focus-visible {
  outline: 2px solid var(--accent-strong, var(--accent));
  outline-offset: 2px;
}

#df-sw-picked {
  margin-top: 4px;
  color: var(--t3);
  font-size: 11px;
}

.df-faceref-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 160px;
  overflow: auto;
}

.df-faceref-checks .pf-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--t1);
  font-size: 12px;
  cursor: pointer;
}

.df-consent-explainer {
  color: var(--t2);
  font-size: 12px;
  line-height: 1.5;
}

.df-consent textarea[readonly] {
  resize: none;
  line-height: 1.5;
}

.df-section input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 6px 10px;
  color: var(--t1);
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-hover, var(--surface));
  cursor: pointer;
}

.df-studio .cap-banner {
  margin-bottom: 12px;
  padding: 8px 12px;
  color: var(--t1);
  font-size: 12px;
  line-height: 1.5;
  border-left: 3px solid var(--t3);
  border-radius: 4px;
  background: var(--surface);
}

.df-studio .cap-banner-ok { border-left-color: var(--ok); }
.df-studio .cap-banner-warning { border-left-color: var(--warn); }
.df-cap-title { font-weight: 600; }
.df-studio .cap-banner ul { margin: 4px 0 0 18px; padding: 0; }
.df-consent-unavailable p { color: var(--t2); font-size: 12px; line-height: 1.5; }

@media (max-width: 640px) {
  .df-head { align-items: flex-start; }
  .df-field-row > .field--stack { width: 100%; min-width: 0 !important; }
  .df-field-row select,
  .df-field-row input { max-width: none !important; width: 100% !important; }
}
