/* =============================================================
   Microsoft Office File Analyzer — tool-specific styles  (BETA)
   Built on the shared design system (styles.css); read-only tool.
   ============================================================= */

/* ---- Beta marking ---- */
.ofa .tool-hero h1 { flex-wrap: wrap; }
.ofa .tool-hero h1 > span:not(.tool-icon):not(.ofa-beta) { min-width: 0; }
.ofa-beta { font-size: .62rem; align-self: center; }
.ofa-beta-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: color-mix(in srgb, var(--brand-2) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-2) 55%, var(--border));
  border-radius: 12px; padding: 11px 15px; margin-bottom: 16px;
  font-size: 13px; color: var(--text); line-height: 1.5;
}
.ofa-beta-note::before { content: "🔬"; font-size: 15px; line-height: 1.4; }

/* ---- Source bar ---- */
.ofa-source {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 16px 18px; margin-bottom: 16px;
}
.ofa-source .grow { flex: 1 1 auto; min-width: 180px; }
.filemeta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filemeta .fname { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 13px; color: var(--text); word-break: break-all; }
.filemeta .fsub { font-size: 12.5px; color: var(--text-soft); }
.filemeta.empty .fname { color: var(--text-soft); }
.ofa-typebadge { font-size: .68rem; }
.ofa .btn .ic { width: 16px; height: 16px; }
.ofa .btn svg { display: block; }

/* ---- Cards ---- */
.ofa-card { padding: 8px 20px 14px; margin-bottom: 16px; }
.ofa-sec { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); font-weight: 700; margin: 12px 0 4px; }

/* ---- Blocking card (encrypted / corrupt / unsupported) ---- */
.ofa-block { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; margin-bottom: 16px;
  border-left: 4px solid var(--office-powerpoint); }
.ofa-block-ico { font-size: 26px; line-height: 1; flex: 0 0 auto; }
.ofa-block-title { font-weight: 700; font-size: 1.05rem; color: var(--text); margin-bottom: 6px; }
.ofa-block-text { margin: 0; font-size: 13.5px; color: var(--text-soft); line-height: 1.55; max-width: 80ch; }

/* ---- Summary banner ---- */
.ofa-banner { display: flex; gap: 13px; align-items: flex-start; padding: 16px 20px; margin-bottom: 16px; border-left: 4px solid var(--border); }
.ofa-banner-ico { font-size: 20px; line-height: 1.2; flex: 0 0 auto; }
.ofa-banner-title { font-weight: 700; font-size: 1.02rem; color: var(--text); }
.ofa-banner-text { margin: 4px 0 0; font-size: 13px; color: var(--text-soft); line-height: 1.5; max-width: 80ch; }
.ofa-banner.ok { border-left-color: var(--office-excel); background: color-mix(in srgb, var(--office-excel) 7%, transparent); }
.ofa-banner.warn { border-left-color: var(--office-powerpoint); background: color-mix(in srgb, var(--office-powerpoint) 7%, transparent); }
.ofa-banner.info { border-left-color: var(--office-general); background: color-mix(in srgb, var(--office-general) 7%, transparent); }

/* ---- Issue list (native <details>) ---- */
.ofa-issue { border: 1px solid var(--border); border-radius: 10px; margin: 8px 0; overflow: hidden; background: var(--bg-soft); }
.ofa-issue > summary {
  list-style: none; cursor: pointer; padding: 11px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.ofa-issue > summary::-webkit-details-marker { display: none; }
.ofa-issue > summary:hover { background: var(--bg); }
.ofa-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.ofa-dot.error { background: var(--office-powerpoint); }
.ofa-dot.warning { background: var(--brand-2); }
.ofa-issue-title { font-weight: 600; font-size: 14px; color: var(--text); }
.ofa-issue-part { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--text-soft); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ofa-sev { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.ofa-sev.error { color: color-mix(in srgb, var(--office-powerpoint) 90%, var(--text)); background: color-mix(in srgb, var(--office-powerpoint) 14%, transparent); }
.ofa-sev.warning { color: #6b4e00; background: color-mix(in srgb, var(--brand-2) 28%, transparent); }
.ofa-issue-body { padding: 4px 14px 14px; border-top: 1px solid var(--border); }
.ofa-sub { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); font-weight: 700; margin: 12px 0 5px; }
.ofa-explain { margin: 0; font-size: 13.5px; color: var(--text); line-height: 1.55; max-width: 82ch; }
.ofa-loc { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font-size: 12.5px; }
.ofa-loc dt { color: var(--text-soft); }
.ofa-loc dd { margin: 0; color: var(--text); }
.ofa-mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; }

.ofa-readonly { font-size: 12px; color: var(--text-soft); font-style: italic; margin: 6px 2px 0; }
.ofa-scope { font-size: 12px; color: var(--text-soft); margin: 6px 2px 0; line-height: 1.5; max-width: 84ch; }

/* ---- Toast ---- */
.ofa-toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-elev); color: var(--text); padding: 12px 18px; border-radius: 12px;
  border: 1px solid var(--border); font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 70; box-shadow: var(--shadow-lg); max-width: 90vw;
}
.ofa-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ofa-toast.err { border-color: color-mix(in srgb, var(--office-powerpoint) 60%, var(--border)); color: var(--office-powerpoint); }

/* drag & drop highlight */
.ofa.droplit { outline: 2px dashed var(--brand); outline-offset: -10px; border-radius: 18px; }

/* ---- Deep (server) analysis ---- */
.ofa-deep { padding: 8px 20px 18px; margin-bottom: 16px; border-left: 4px solid var(--brand); }
.ofa-deep-intro { margin: 6px 0 12px; font-size: 13.5px; color: var(--text); line-height: 1.55; max-width: 84ch; }
.ofa-deep-warn {
  display: flex; gap: 10px; align-items: flex-start;
  background: color-mix(in srgb, var(--brand-2) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-2) 50%, var(--border));
  border-radius: 10px; padding: 11px 14px; margin-bottom: 14px;
  font-size: 12.5px; color: var(--text); line-height: 1.5; max-width: 84ch;
}
.ofa-deep-warn-ico { font-size: 15px; line-height: 1.3; flex: 0 0 auto; }
.ofa-deep-nl { color: var(--text-soft); }
.ofa-deep-run { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-soft); padding: 4px 0; }
.ofa-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--brand); animation: ofa-spin .8s linear infinite; flex: 0 0 auto; }
@keyframes ofa-spin { to { transform: rotate(360deg); } }
.ofa-deep-err { margin: 0 0 12px; font-size: 13px; color: var(--office-powerpoint); line-height: 1.5; max-width: 84ch; }
.ofa-deep-results { margin-top: 14px; }
.ofa-deep-banner { margin-bottom: 10px; }

/* legal note */
.ofa-legal { margin-top: 36px; font-size: 11.5px; color: var(--text-soft); line-height: 1.55; }
.ofa-legal p { margin: 0 0 8px; max-width: 84ch; }
