/* GRMAPdb BLAST tool — every rule is scoped under .blast-tool so nothing leaks into the site theme. */
.blast-tool { padding: 40px 0 60px; color: #222; font-size: 14px; line-height: 1.5; }
.blast-tool *, .blast-tool *::before, .blast-tool *::after { box-sizing: border-box; }
.blast-tool [hidden] { display: none !important; }
.blast-tool h3 { font-size: 16px; font-weight: 700; color: #0f172a; margin: 0; }

/* ── Program tabs ─────────────────────────────────────────────────── */
.blast-tool .program-tab-bar { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 2px solid #00897b; overflow-x: auto; }
.blast-tool .program-tab-btn { padding: 8px 26px; background: #e9ecef; border: 1px solid #cbd5e1; border-bottom: 0; border-radius: 4px 4px 0 0;
  font-weight: 600; font-size: 15px; color: #1e293b; cursor: pointer; }
.blast-tool .program-tab-btn:hover { background: #cbd5e1; }
.blast-tool .program-tab-btn.active { background: #00897b; border-color: #00897b; color: #fff; }

/* ── Form layout ──────────────────────────────────────────────────── */
.blast-tool .tool-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; }
.blast-tool .tool-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 20px; }
@media (max-width: 820px) { .blast-tool .tool-grid { grid-template-columns: 1fr; } }
.blast-tool .section-box { background: #f8fafc; border: 1px solid #eef2f6; border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.blast-tool .section-full-height { height: 100%; margin-bottom: 0; }
.blast-tool .section-head { margin-bottom: 12px; }
.blast-tool .section-title-wrap { display: flex; align-items: center; gap: 10px; }
.blast-tool .step-num { width: 26px; height: 26px; border-radius: 50%; background: #00897b; color: #fff; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; flex: none; }

.blast-tool textarea { width: 100%; height: 130px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px 12px;
  font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; background: #fff; color: #1e293b; resize: vertical; }
.blast-tool textarea:focus, .blast-tool select:focus { outline: 2px solid rgba(0, 137, 123, .25); border-color: #00897b; }
.blast-tool .textarea-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: #64748b; margin: 6px 0 12px; }

.blast-tool .upload-box { border: 1.5px dashed #99f6e4; background: #f0fdfa; border-radius: 10px; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.blast-tool .upload-title { font-weight: 700; font-size: 13.5px; }
.blast-tool .upload-sub { font-size: 12px; color: #64748b; }
.blast-tool .choose-file-btn { background: #fff; border: 1.5px solid #5eead4; color: #0d9488; font-weight: 600; font-size: 13px;
  padding: 6px 14px; border-radius: 6px; cursor: pointer; margin: 0; flex: none; }
.blast-tool .file-name-display { font-size: 12.5px; color: #0d9488; font-weight: 600; margin-top: 8px; }

.blast-tool .params-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.blast-tool .form-group { display: flex; flex-direction: column; margin-bottom: 0; }
.blast-tool .form-group label { font-weight: 700; font-size: 13.5px; color: #0f172a; margin-bottom: 6px; }
.blast-tool .margin-top-lg { margin-top: 18px; }
.blast-tool select { width: 100%; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; font-size: 13.5px; color: #0f172a; height: auto; }
.blast-tool .db-cite { font-size: 12.5px; color: #475569; margin: 8px 0 0; white-space: pre-line; }
.blast-tool .bt-hint { font-size: 13px; color: #64748b; margin: 8px 0 0; }

.blast-tool .form-actions { display: flex; gap: 14px; margin-top: 4px; }
.blast-tool .bt-btn-primary, .blast-tool .bt-btn-secondary { flex: 1; display: inline-block; text-align: center; border-radius: 8px;
  padding: 11px 22px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.blast-tool .bt-btn-primary { background: #00897b; color: #fff; border: 0; }
.blast-tool .bt-btn-primary:hover { background: #00796b; color: #fff; }
.blast-tool .bt-btn-primary:disabled { opacity: .7; cursor: progress; }
.blast-tool .bt-btn-secondary { background: #fff; color: #00897b; border: 1.5px solid #00897b; }
.blast-tool .bt-btn-secondary:hover { background: #f0fdfa; }
.blast-tool .bt-notice { background: #fff8e6; border: 1px solid #f3d27a; border-radius: 8px; padding: 20px; text-align: center; }
.blast-tool .bt-notice .bt-btn-primary { flex: none; }

/* ── Error dialog ─────────────────────────────────────────────────── */
.blast-tool .blast-dialog { border: 0; border-top: 4px solid #c0392b; border-radius: 10px; padding: 22px 24px 18px; max-width: 440px;
  width: calc(100% - 32px); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.blast-tool .blast-dialog::backdrop { background: rgba(20, 24, 30, .55); }
.blast-tool .dlg-head { display: flex; align-items: center; gap: 12px; }
.blast-tool .dlg-icon { width: 30px; height: 30px; border-radius: 50%; background: #fdecea; color: #c0392b; font-weight: 700; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.blast-tool .blast-dialog p { margin: 14px 0 18px 42px; color: #444; white-space: pre-line; }
.blast-tool .blast-dialog .bt-btn-primary { flex: none; float: right; padding: 8px 22px; }

/* ── Results report ───────────────────────────────────────────────── */
.blast-tool .bl table { border-collapse: collapse; width: 100%; }
.blast-tool .bl th, .blast-tool .bl td { border: 1px solid #d5dde0; padding: 6px 10px; text-align: left; vertical-align: top; }
.blast-tool .bl th { background: #e4f1f2; color: #1e293b; font-weight: 600; cursor: pointer; white-space: nowrap; user-select: none; }
.blast-tool .bl tbody tr:nth-child(even) td { background: #f7fafa; }
.blast-tool .bl a { color: #00796b; }
.blast-tool .bl-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.blast-tool .bl .btn, .blast-tool .bl summary { cursor: pointer; padding: 6px 14px; border: 1px solid #008080; background: #fff; color: #008080;
  text-decoration: none; font-size: 14px; border-radius: 4px; display: inline-block; line-height: 1.4; }
.blast-tool .bl .btn.primary { background: #008080; color: #fff; }
.blast-tool .bl details.pop { position: relative; display: inline-block; }
.blast-tool .bl .popbody { position: absolute; z-index: 20; background: #fff; border: 1px solid #ccc; padding: 10px 14px; min-width: 16em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15); border-radius: 4px; top: 100%; left: 0; margin-top: 4px; }
.blast-tool .bl .popbody a { display: block; padding: 4px 0; }
.blast-tool .bl-queries { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.blast-tool .bl-queries a, .blast-tool .bl-queries .on { padding: 3px 10px; border: 1px solid #008080; border-radius: 4px; }
.blast-tool .bl-queries .on { background: #008080; color: #fff; }
.blast-tool .bl-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
@media (max-width: 800px) { .blast-tool .bl-top { grid-template-columns: 1fr; } }
.blast-tool .bl .bl-meta td { border: 0; border-bottom: 1px solid #e6e6e6; padding: 6px 4px; background: none; }
.blast-tool .bl .bl-meta td:first-child { color: #666; width: 9em; white-space: nowrap; font-weight: 600; }
.blast-tool .bl-filter { background: #f4f7f8; border: 1px solid #d8e2e5; border-radius: 6px; padding: 14px; }
.blast-tool .bl-filter-title { font-size: 15px; color: #008080; display: block; margin-bottom: 8px; }
.blast-tool .bl-filter label { font-weight: 600; display: block; margin: 0; }
.blast-tool .bl-filter .bl-ex { font-weight: 400; margin-top: 6px; }
.blast-tool .bl-filter #f-org { width: 100%; margin-top: 4px; }
.blast-tool .bl-filter input[type="text"], .blast-tool .bl-filter input[size] { padding: 3px 6px; border: 1px solid #ccc; border-radius: 3px; }
.blast-tool .bl-filter .g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.blast-tool .bl-filter .g3 input { width: 4.2em; }
.blast-tool .bl-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 3px solid #008080; margin-top: 20px; }
.blast-tool .bl-tabs button { padding: 10px 20px; border: 0; background: #e6f0f0; color: #008080; cursor: pointer; font-weight: 600; border-radius: 4px 4px 0 0; }
.blast-tool .bl-tabs button.on { background: #008080; color: #fff; }
.blast-tool .bl-pane { padding: 16px 0; }
.blast-tool .bl-bar { background: #e4f1f2; border: 1px solid #c2dbde; border-radius: 4px; padding: 8px 12px; display: flex; gap: 14px;
  align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.blast-tool .bl-bar .grow { flex: 1; }
.blast-tool .bl-bar select { width: auto; padding: 4px 8px; }
.blast-tool .bl-sub { display: flex; margin: 10px 0; }
.blast-tool .bl-sub button { padding: 6px 14px; border: 1px solid #008080; background: #fff; color: #008080; cursor: pointer; }
.blast-tool .bl-sub button:first-child { border-radius: 4px 0 0 4px; }
.blast-tool .bl-sub button:last-child { border-radius: 0 4px 4px 0; }
.blast-tool .bl-sub button.on { background: #008080; color: #fff; }
.blast-tool .aln { margin: 22px 0; border-top: 2px solid #008080; padding-top: 10px; }
.blast-tool .aln-head { display: flex; justify-content: space-between; gap: 12px; background: #e4f1f2; padding: 8px 12px; border-radius: 4px; }
.blast-tool .aln pre { font: 13px/1.4 ui-monospace, Menlo, Consolas, "Courier New", monospace; overflow-x: auto; background: #f9fbfb;
  padding: 10px; border: 1px solid #d8e2e5; border-radius: 4px; margin-top: 6px; white-space: pre; }
.blast-tool .hsp-info { margin-top: 10px; font-weight: 600; font-size: 13px; color: #333; }
.blast-tool .muted { color: #666; }
.blast-tool .trunc { max-width: 34em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blast-tool .sw { display: inline-block; width: 12px; height: 12px; margin: 0 4px 0 12px; vertical-align: -1px; border-radius: 2px; }
.blast-tool .bar { height: 10px; background: #008080; border-radius: 2px; }
