/* Styles for the "Premiere to Pro Tools AAF" tool page (/aaftool). Everything is inside .aaf so it
   does not affect the rest of the site. Colors and fonts come from the variables in site.css. */

.aaf { --panel: #2a2929; --line: #4a4848; --ok: #7cc48a; --warn: #f0b429; --bad: #ff8a80; }

/* Intro */
.aaf-intro .big-heading { margin-bottom: 32px; }
.aaf-lead { max-width: 820px; font-size: 18px; line-height: 1.6; }
.aaf-private { max-width: 820px; margin-top: 16px; padding-left: 16px; border-left: 3px solid var(--accent); }

/* Steps */
.aaf-tool > * { max-width: 1000px; margin-left: auto; margin-right: auto; }
.aaf-step { background: var(--panel); border-radius: 24px; padding: 32px; margin-bottom: 24px; }
.aaf-step-title {
  font-family: var(--font-head); font-weight: 600; font-size: 24px; line-height: 1.3;
  display: flex; align-items: center; gap: 16px; margin: 0 0 12px;
}
.aaf-num {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--dark);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
}
.aaf-optional { font-family: var(--font-text); font-weight: 400; font-size: 16px; opacity: .7; }
.aaf-help { margin-bottom: 20px; max-width: 760px; }
.aaf-small { font-size: 14px; margin: 16px 0 0; opacity: .85; }
.aaf code {
  font-family: Menlo, Monaco, Consolas, monospace; font-size: .9em;
  background: rgba(255, 255, 255, .08); padding: 1px 6px; border-radius: 4px;
}

/* Drop zones */
.aaf-drop {
  border: 2px dashed var(--line); border-radius: 20px; padding: 28px 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px;
  text-align: center; transition: border-color .2s, background .2s;
}
.aaf-drop.is-over { border-color: var(--accent); background: rgba(218, 150, 5, .08); }

/* Buttons (same rounded shape as the contact form) */
.aaf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 28px; border: 0; border-radius: 32px;
  background: var(--accent); color: var(--dark); font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background .2s, color .2s;
}
.aaf-btn:hover { background: var(--light); }
.aaf-btn:disabled { opacity: .45; cursor: not-allowed; background: var(--accent); }
.aaf-btn-light { background: transparent; color: var(--light); box-shadow: inset 0 0 0 2px var(--accent); }
.aaf-btn-light:hover { background: var(--accent); color: var(--dark); }
.aaf-drop label:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Picked XMLs and folders */
.aaf-list { list-style: none; margin: 0; padding: 0; }
.aaf-item {
  display: flex; gap: 16px; align-items: flex-start; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.aaf-list:not(:empty) { margin-top: 16px; }
.aaf-item-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.aaf-item-note { font-size: 14px; opacity: .85; margin-top: 4px; }
.aaf-item-note.is-warn { color: var(--warn); opacity: 1; }
.aaf-item-note.is-error, .aaf-note.is-error { color: var(--bad); opacity: 1; }
.aaf-count { font-size: 14px; opacity: .75; }
.aaf-remove {
  flex: none; background: none; border: 0; padding: 4px 0; color: var(--light); opacity: .7;
  text-decoration: underline; cursor: pointer; font-size: 14px;
}
.aaf-remove:hover { opacity: 1; color: var(--accent); }
.aaf-seqs { border: 0; padding: 0; margin: 8px 0 0; }
.aaf-seqs legend { font-size: 14px; opacity: .85; padding: 0; margin-bottom: 4px; }

/* Form fields */
.aaf input[type="text"], .aaf textarea {
  width: 100%; background: var(--dark); color: var(--light);
  border: 2px solid var(--line); border-radius: 16px; padding: 10px 16px;
  font-family: Menlo, Monaco, Consolas, monospace; font-size: 14px;
}
.aaf textarea { resize: vertical; }
.aaf input[type="text"]:focus, .aaf textarea:focus { border-color: var(--accent); outline: none; }
.aaf-field { display: block; }
.aaf-field span { display: block; font-size: 14px; margin-bottom: 6px; }
.aaf-field small { opacity: .7; font-size: 13px; }
.aaf-loc { margin-top: 10px; }
.aaf-check { display: flex; gap: 10px; align-items: baseline; cursor: pointer; }
.aaf-check input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }

/* Options */
.aaf-options summary { cursor: pointer; list-style: none; margin: 0; }
.aaf-options summary::-webkit-details-marker { display: none; }
.aaf-options summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 28px; line-height: 1; }
.aaf-options[open] summary::after { content: "\2212"; }
.aaf-option-grid { display: grid; gap: 16px; margin-top: 20px; }
.aaf-option-grid .aaf-small { margin: 8px 0 -6px; }

/* Build */
.aaf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.aaf-actions .aaf-btn { min-width: 184px; min-height: 56px; font-size: 17px; }
.aaf-status { flex: 1; min-width: 220px; }
.aaf-status.is-busy::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 10px; vertical-align: -1px;
  border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%;
  animation: aaf-spin .8s linear infinite;
}
.aaf-status.is-error { color: var(--bad); }
.aaf-status.is-ok { color: var(--ok); }
@keyframes aaf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .aaf-status.is-busy::before { animation: none; } }

/* Results */
.aaf-results { margin-top: 48px; }
.aaf-zip { margin-bottom: 20px; }
.aaf-result { background: var(--panel); border-radius: 24px; padding: 28px 32px; margin-bottom: 20px; border-left: 6px solid var(--ok); }
.aaf-result.is-check-report { border-left-color: var(--warn); }
.aaf-result.is-failed { border-left-color: var(--bad); }
.aaf-result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.aaf-result h3 { font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
.aaf-badge {
  flex: none; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 12px; border-radius: 32px; background: var(--ok); color: var(--dark);
}
.is-check-report .aaf-badge { background: var(--warn); }
.is-failed .aaf-badge { background: var(--bad); }
.aaf-result-info { margin: 12px 0 0; font-weight: 500; }
.aaf-warnings { margin: 12px 0 0; padding-left: 20px; color: var(--warn); }
.aaf-sub { margin: 20px 0 8px; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; color: var(--accent); font-size: 15px; }
.aaf-all { margin-top: 16px; }
.aaf-all summary { cursor: pointer; color: var(--accent); }
.aaf-all .aaf-table-wrap { margin-top: 8px; }
.aaf-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.aaf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.aaf-table th, .aaf-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.aaf-table th { font-weight: 600; background: rgba(255, 255, 255, .04); white-space: nowrap; }
.aaf-table td:nth-child(3), .aaf-table td:nth-child(4) { font-family: Menlo, Monaco, Consolas, monospace; white-space: nowrap; }
.aaf-table td:nth-child(5) { overflow-wrap: anywhere; min-width: 200px; }
.aaf-table tr:last-child td { border-bottom: 0; }
.aaf-table tr.is-flag td:last-child { color: var(--warn); }
.aaf-downloads { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Guide */
.aaf-guide-title { font-size: 38.4px; margin-bottom: 32px; }
.aaf-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.aaf-guide h3 { color: var(--accent); font-size: 17.6px; text-transform: uppercase; font-weight: 500; margin-bottom: 12px; }
.aaf-guide ul { margin: 0; padding-left: 20px; }
.aaf-guide li + li { margin-top: 8px; }
.aaf-terms { margin: 0; }
.aaf-terms dt { font-weight: 600; font-family: Menlo, Monaco, Consolas, monospace; font-size: 14px; }
.aaf-terms dd { margin: 0 0 10px; }
.aaf-credits { margin-top: 48px; font-size: 14px; opacity: .75; }
.aaf-credits a { color: var(--accent); }

@media (max-width: 975px) {
  .aaf-guide-grid { grid-template-columns: 1fr; gap: 32px; }
  .aaf-step, .aaf-result { padding: 24px 20px; border-radius: 20px; }
}
@media (max-width: 575px) {
  .aaf-step-title { font-size: 20px; }
  .aaf-actions .aaf-btn { width: 100%; }
  .aaf-result-head { flex-direction: column; }
  .aaf-guide-title { font-size: 30px; }
}
