.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.import-main {
  min-width: 0;
}
.footage-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0 0 24px;
  padding: 0 0 16px;
  list-style: none;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.footage-steps [aria-current="step"] { color: var(--accent); font-weight: 600; }
.is-preparing .import-layout { grid-template-columns: minmax(0, 1fr); max-width: 1000px; }
.footage-workspace [hidden] { display: none !important; }
#import-loading, #import-filename { overflow-wrap: anywhere; }
#import-filename, .footage-steps { max-width: 1000px; margin-left: auto; margin-right: auto; }
#import-review .panel-title { padding: 0; border: 0; margin-bottom: 12px; }
#import-review .panel-title h2 { margin-bottom: 0; }
#import-exact-range { margin-bottom: 24px; }
#import-exact-range summary { cursor: pointer; padding: 12px 0; }
#import-source-details { margin-bottom: 16px; }
#import-source-details summary { cursor: pointer; padding: 12px 0; }
#import-exact-range .form-grid { margin-top: 12px; }
#import-exact-range label { display: block; margin-bottom: 8px; }
#import-exact-range input { width: 100%; }
#import-continue { margin: 16px 0; }
.import-section {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.import-section:first-child {
  padding-top: 8px;
}
.import-section h2 {
  margin: 0 0 18px;
}
.import-section > label,
.import-section form > label {
  display: block;
  margin-bottom: 8px;
}
.import-section select {
  width: 100%;
}
.import-sources summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
}
.import-sources > .hint {
  margin-top: 4px;
}
.flight-choices {
  border: 0;
  padding: 0;
  margin: 22px 0;
  display: flex;
  gap: 12px;
}
.flight-choices legend {
  margin-bottom: 10px;
}
.flight-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  border: 1px solid var(--line);
  padding: 18px;
  cursor: pointer;
  border-radius: 5px;
  background: var(--surface);
}
.flight-choice:has(:checked) {
  border-color: var(--accent);
  background: var(--selection);
}
.flight-choice .icon {
  width: 28px;
  height: 28px;
}
.flight-choice input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.source-tabs span {
  padding: 8px 12px;
  border-bottom: 2px solid var(--accent);
  font-weight: 600;
}
.source-tabs button {
  font-size: 12px;
  min-height: 36px;
  background: transparent;
}
.file-drop {
  display: flex !important;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  border: 1px dashed var(--quiet);
  border-radius: 5px;
  padding: 30px 20px;
  cursor: pointer;
  background: var(--surface);
  margin: 24px 0 18px !important;
}
.file-drop:hover {
  background: var(--hover);
}
.file-drop:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.file-drop .icon {
  width: 30px;
  height: 30px;
}
.file-drop span {
  font-size: 13px;
  color: var(--muted);
}
.file-drop input {
  width: 100%;
  max-width: 370px;
  min-height: 42px;
  padding: 8px;
}
.import-progress progress {
  width: 100%;
  height: 8px;
  margin-top: 22px;
  accent-color: var(--accent);
}
.import-progress p {
  font-size: 13px;
  color: var(--muted);
}
#import-queue { margin-top: 24px; }
.upload-queue { list-style: none; padding: 0; margin: 0; }
.upload-queue > li { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.upload-queue > li:last-child { border-bottom: 0; }
.upload-queue-file { flex: 1; min-width: 0; display: grid; gap: 8px; overflow-wrap: anywhere; }
.upload-queue-file progress { width: 100%; height: 8px; accent-color: var(--accent); }
.upload-queue-file p { margin: 0; }
.upload-queue .actions { margin: 0; flex-wrap: wrap; }
@media (max-width: 700px) {
  .upload-queue > li { flex-direction: column; gap: 12px; }
  .upload-queue-file { width: 100%; }
}
.quality-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 18px 0;
}
.quality-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.quality-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
}
#import-preview {
  width: 100%;
  max-height: 400px;
  background: #101315;
  margin: 10px 0;
}
.flyer-selection {
  border: 0;
  padding: 0;
  margin: 22px 0;
}
.flyer-selection label {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin: 8px 24px 8px 0;
}
.flyer-selection input,
.check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
  font-size: 14px;
}
.source-history {
  display: block;
  text-align: left;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 15px 0;
}
.source-history strong {
  display: block;
  overflow-wrap: anywhere;
}
.source-history span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
#import-save-button {
  margin-top: 22px;
}
.warning {
  color: var(--warning);
}
.footage-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.footage-toolbar select {
  flex: 1;
  min-width: 120px;
}
.footage-frame {
  padding: 0 !important;
  display: block !important;
  background: #101315 !important;
}
.footage-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.footage-caption {
  font-size: 13px;
  color: var(--muted);
  padding: 14px 0;
}
.footage-manage {
  margin-top: 22px;
}
.angle-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.angle-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.footage-manage details {
  margin-top: 20px;
}
.footage-manage summary {
  cursor: pointer;
}
@media (max-width: 520px) {
  .quality-grid {
    grid-template-columns: 1fr 1fr;
  }
  .flight-choice {
    padding: 14px 10px;
    gap: 8px;
  }
  .file-drop {
    padding: 22px 12px;
  }
  .angle-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .source-tabs button {
    padding: 8px;
  }
  .footage-toolbar {
    gap: 8px;
  }
  .footage-toolbar label {
    width: 100%;
  }
  .import-section .form-grid {
    grid-template-columns: 1fr;
  }
  .import-section {
    padding: 22px 0;
  }
}

/* The flight's one status line, beside its tabs: shown only while something is
   happening or needs the owner. */
.flight-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px; flex-shrink: 0; }
.flight-status[hidden] { display: none; }
.flight-status-main { min-width: 0; flex: 1 1 320px; }
.flight-status-main p { margin: 0; }
.flight-status-main .hint { margin-top: 2px; font-size: 12px; }
.flight-status .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.flight-status .actions .button, .flight-status .actions button { min-height: 36px; padding: 6px 14px; }
/* Footage table: each angle's status, with its action when it needs the owner. */
.footage-status { min-width: 150px; }
.footage-status > * { display: block; }
.footage-status .hint { font-size: 12px; margin-top: 2px; max-width: 32ch; }
.footage-status .button { display: inline-flex; margin-top: 6px; }
