/* Blog-owned styling for the interactive-tool widget (```tool``` blocks).
   The single source of truth for how every tool panel looks, so a restyle is one file and no
   post can drift its own look (same contract as query-widget.css). Light-theme, self-contained
   (no Tailwind/token dependency) so it can't break the page it sits on. */

.strasmore-tool {
  margin: 2rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  font-family: "Inter", system-ui, sans-serif;
}
.strasmore-tool-cap {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #eef2f6;
  background: #f8fafc;
}
.strasmore-tool-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2563eb;
}
.strasmore-tool-title { font-size: 0.9rem; font-weight: 600; color: #0f172a; }
.blog-tool-notice, .blog-tool-fallback, .sr-tool-error {
  margin: 1.5rem 0; padding: 0.75rem 1rem;
  border: 1px dashed #cbd5e1; border-radius: 6px;
  color: #64748b; font-size: 0.85rem;
}

.sr-tool { padding: 1rem; }

/* permission grid */
.sr-tool-grid { border-collapse: collapse; margin-bottom: 0.75rem; }
.sr-tool-grid th, .sr-tool-grid td {
  padding: 0.35rem 0.75rem;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #334155;
}
.sr-tool-grid thead th { color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; }
.sr-tool-rowlabel { text-align: left !important; color: #0f172a !important; font-weight: 600; }
.sr-tool-grid input[type="checkbox"] { width: 15px; height: 15px; accent-color: #2563eb; cursor: pointer; }

/* special bits */
.sr-tool-special { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0.25rem 0 0.9rem; }
.sr-tool-chk { display: inline-flex; align-items: center; gap: 0.35rem; font-family: "JetBrains Mono", monospace; font-size: 12px; color: #475569; cursor: pointer; }
.sr-tool-chk input { accent-color: #2563eb; cursor: pointer; }

/* outputs */
.sr-tool-out { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.sr-tool-val { display: flex; flex-direction: column; gap: 0.2rem; }
.sr-tool-k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: #94a3b8; }
.sr-tool-code { font-family: "JetBrains Mono", monospace; font-size: 1.15rem; font-weight: 700; color: #0f172a; }

/* command + copy */
.sr-tool-cmd {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden;
}
.sr-tool-cmdcode {
  flex: 1; padding: 0.6rem 0.85rem;
  background: #0f172a; color: #e2e8f0;
  font-family: "JetBrains Mono", monospace; font-size: 13px;
  white-space: nowrap; overflow-x: auto;
}
.sr-tool-copy {
  border: 0; padding: 0 1rem;
  background: #2563eb; color: #fff;
  font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  cursor: pointer;
}
.sr-tool-copy:hover { background: #1d4ed8; }

/* ---- form-style tools (systemd generator, and future config generators) ---- */
.sr-tool-systemd { padding: 1rem; }
.sr-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem 1.5rem; align-items: start; }
.sr-form-section { display: flex; flex-direction: column; gap: 0.45rem; }
.sr-form-h {
  font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: #2563eb; border-bottom: 1px solid #eef2f6;
  padding-bottom: 0.25rem; margin-top: 0.15rem;
}
.sr-form-row { display: flex; flex-direction: column; gap: 0.15rem; }
.sr-form-label { font-size: 11px; font-weight: 600; color: #334155; }
.sr-form-input {
  width: 100%; box-sizing: border-box; padding: 0.35rem 0.5rem;
  border: 1px solid #cbd5e1; border-radius: 5px;
  font-family: "JetBrains Mono", monospace; font-size: 12px; color: #0f172a; background: #fff;
}
.sr-form-input:focus { outline: 2px solid #93c5fd; outline-offset: 0; border-color: #2563eb; }
.sr-form-input:disabled { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.sr-form-ta { resize: vertical; line-height: 1.4; }
.sr-form-hint { font-size: 10px; color: #94a3b8; }
.sr-form-chk { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; flex-wrap: wrap; }
.sr-form-chk input { accent-color: #2563eb; cursor: pointer; }
.sr-form-chk-label { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #334155; }
.sr-form-chk-hint { font-size: 10px; color: #94a3b8; }
.sr-form-timerfields { display: flex; flex-direction: column; gap: 0.45rem; }
.sr-form-presets { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.sr-form-preset {
  border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 4px; padding: 0.2rem 0.5rem;
  font-family: "JetBrains Mono", monospace; font-size: 10px; color: #475569; cursor: pointer;
}
.sr-form-preset:hover { background: #e2e8f0; }

.sr-tool-outputs { display: flex; flex-direction: column; gap: 0.75rem; padding: 0 1rem 1rem; }
.sr-out-block { border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden; }
.sr-out-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.35rem 0.4rem 0.35rem 0.75rem; background: #f8fafc; border-bottom: 1px solid #eef2f6;
}
.sr-out-title { font-family: "JetBrains Mono", monospace; font-size: 11px; color: #2563eb; }
.sr-out-pre {
  margin: 0; padding: 0.75rem; background: #0f172a; color: #e2e8f0;
  font-family: "JetBrains Mono", monospace; font-size: 12px; line-height: 1.5;
  white-space: pre; overflow-x: auto;
}

@media (max-width: 640px) { .sr-form { grid-template-columns: 1fr; } }

/* "email me this config" opt-in on a tool */
.sr-tool-email { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #D6D3D1; }
.sr-tool-emailbtn { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid #CBD5E1;
  background: #F8FAFC; color: #0F172A; border-radius: 6px; cursor: pointer; }
.sr-tool-emailbtn:hover { background: #F1F5F9; }
.sr-tool-emailform { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.sr-tool-emailform .sr-form-input { flex: 1 1 200px; min-width: 0; }
.sr-tool-emailmsg { font-size: 13px; color: #57534E; flex-basis: 100%; }
@media (max-width: 640px) { .sr-tool-emailform { flex-direction: column; align-items: stretch; } }
