/* BuildKitly TOOLS (agent tl): loop-tool-card 355, /tools/ page 157, section template 429 (tools grid),
   single-bk_tool 347 and the tool workbench mounted by bk-tl-tools.js into .bk-tool-app.
   Scoped to .bk-tl-* classes. Only what controls cannot express: status-driven visibility (ACF tool_status via
   data-bk-status + bk_tool_group term class), the ↗ glyph after card titles, alternating card icons, and the
   workbench form (JS-rendered). No transitions / hover motion here: bk-motion.css utilities do that. */

.bk-tl-list, .bk-tl-single, .bk-tl-card, .bk-tl-cards {
  --bk-tl-arrow-ne: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E");
}

/* ---------- loop-tool-card (355) ---------- */
.bk-tl-card { color: inherit; text-decoration: none; height: 100%; }
.bk-tl-cards .e-loop-item { height: 100%; }
.bk-tl-card-title .elementor-heading-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.bk-tl-card-title .elementor-heading-title::after {
  content: ""; flex: none; width: 17px; height: 17px; margin-top: 1px; background: currentColor;
  -webkit-mask: var(--bk-tl-arrow-ne) center / contain no-repeat; mask: var(--bk-tl-arrow-ne) center / contain no-repeat;
}
.bk-tl-card-excerpt p { margin: 0; }
.bk-tl-card-icon .elementor-icon-wrapper { line-height: 0; }
.bk-tl-card-icon .elementor-icon { display: inline-grid; place-items: center; }
.bk-tl-card-icon .elementor-icon svg { width: 1em; height: 1em; }
.bk-tl-pill .elementor-heading-title { display: block; white-space: nowrap; }
/* reference alternates wrench / code icons by position */
.bk-tl-cards .e-loop-item:nth-of-type(odd) .bk-tl-ico-b,
.bk-tl-cards .e-loop-item:nth-of-type(even) .bk-tl-ico-a { display: none; }
/* status pill: live = Free, soon = Setup pending (website inspection) or Planned (AI group) */
.bk-tl-card[data-bk-status="live"] :is(.bk-tl-pill-remote, .bk-tl-pill-planned),
.bk-tl-card:not([data-bk-status="live"]) .bk-tl-pill-live,
.bk_tool_group-ai .bk-tl-card .bk-tl-pill-remote,
.e-loop-item:not(.bk_tool_group-ai) .bk-tl-card:not([data-bk-status="live"]) .bk-tl-pill-planned { display: none; }

/* ---------- /tools/ page (157) ---------- */
.bk-tl-search { width: 100%; }
.bk-tl-search .e-search-input { min-height: 48px; }
.bk-tl-filter .e-filter { flex-wrap: nowrap; }
.bk-tl-noresults { display: none; }
.bk-tl-list.bk-tl-is-empty .bk-tl-noresults { display: block; }
.bk-tl-callout-text .elementor-heading-title { margin: 0; }
.bk-tl-textlink .elementor-heading-title a, a.bk-tl-textlink { color: inherit; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.bk-tl-lead p { margin: 0; }
.bk-tl-grid-embed, .bk-tl-grid-embed > .elementor-widget-container { width: 100%; }

/* ---------- single tool (347): which blocks show for which status ---------- */
/* live: workbench + local notes · soon (not AI): website-inspection form (setup pending) · soon + AI: roadmap panel */
.bk-tl-single[data-bk-status="live"] :is(.bk-tl-when-remote, .bk-tl-when-planned),
.bk-tl-single:not([data-bk-status="live"]) .bk-tl-when-live,
.bk_tool_group-ai .bk-tl-single :is(.bk-tl-when-remote, .bk-tl-when-app),
:not(.bk_tool_group-ai) > .bk-tl-single:not([data-bk-status="live"]) .bk-tl-when-planned,
.bk-tl-single:not([data-bk-status="live"]) .bk-tl-when-local { display: none; }
.bk_tool_group-ai .bk-tl-single .bk-tl-when-local { display: block; }
.bk-tool-key { display: none; }
.bk-tl-crumb .elementor-heading-title a { color: inherit; }
.bk-tl-notes-body p { margin: 0; }
.bk-tl-acc .e-n-accordion-item-title-text { font-size: 16px; }
.bk-tl-acc .e-n-accordion-item-title { border: 0; }
.bk-tl-next-ico .elementor-heading-title { display: block; line-height: 1; }
.bk-tl-soon .elementor-button { min-height: 48px; display: inline-flex; align-items: center; }

/* ---------- workbench (rendered by bk-tl-tools.js inside .bk-tool-app) ---------- */
.bk-tl-wb { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; width: 100%; }
.bk-tl-form {
  display: grid; gap: 20px; align-content: start; padding: 30px; border: 1px solid var(--e-global-color-border, #DCE0E5);
  border-radius: 7px; background: var(--e-global-color-surface, #fff); min-width: 0;
}
.bk-tl-field { display: grid; gap: 8px; }
.bk-tl-label { display: block; font-size: 14px; font-weight: 500; line-height: 1.6; color: var(--e-global-color-primary, #20252B); margin: 0; }
.bk-tl-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.bk-tl-wb.bk-tl-wb .bk-tl-field.bk-tl-field :is(input, textarea, select) {
  width: 100%; min-height: 45px; box-sizing: border-box; padding: 12px 14px; margin: 0;
  font-family: inherit; font-size: 14px; font-weight: 400; line-height: 1.6; color: var(--e-global-color-primary, #20252B);
  background: var(--e-global-color-surface, #fff); border: 1px solid var(--e-global-color-border, #DCE0E5); border-radius: 5px; box-shadow: none;
}
.bk-tl-wb.bk-tl-wb .bk-tl-field.bk-tl-field textarea { min-height: 128px; resize: vertical; }
.bk-tl-wb.bk-tl-wb .bk-tl-field.bk-tl-field select {
  -webkit-appearance: none; appearance: none; padding-right: 36px;
  background: var(--e-global-color-surface, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23656D77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 14px no-repeat;
}
.bk-tl-fine { font-size: 12px; line-height: 1.6; margin: 0; color: var(--e-global-color-text, #656D77); }
.bk-tl-form a.bk-tl-textlink { font-size: 14px; justify-self: start; color: var(--e-global-color-primary, #20252B); }
.bk-tl-wb button.bk-tl-btn, .bk-tl-wb button.bk-tl-btn:is(:hover, :focus, :active) {
  justify-self: start; display: inline-flex; align-items: center; gap: 14px; min-height: 48px; padding: 13px 20px;
  font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--e-global-color-ondark, #F7F8FA);
  background: var(--e-global-color-primary, #20252B); border: 0; border-radius: 5px; cursor: pointer;
}
.bk-tl-notice {
  margin: 0; padding: 15px; font-size: 14px; line-height: 1.6; color: var(--e-global-color-primary, #20252B);
  background: var(--e-global-color-secondary, #EEF0F2); border-left: 3px solid #987737;
}
.bk-tl-sample { min-height: 120px; border-radius: 5px; display: grid; place-items: center; padding: 25px; font-size: 25px; border: 1px solid var(--e-global-color-border, #DCE0E5); }
.bk-tl-result { padding: 30px; border-radius: 7px; background: var(--e-global-color-secondary, #EEF0F2); min-width: 0; }
.bk-tl-result-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 25px; font-size: 21px; font-weight: 500;
  line-height: 1.12; letter-spacing: -0.025em; color: var(--e-global-color-primary, #20252B);
}
.bk-tl-result-title > span:first-child { flex: 1; }
.bk-tl-status { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--e-global-color-text, #656D77); }
.bk-tl-wb button.bk-tl-copy, .bk-tl-wb button.bk-tl-copy:is(:hover, :focus, :active),
.bk-tl-wb button.bk-tl-download, .bk-tl-wb button.bk-tl-download:is(:hover, :focus, :active) {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px; margin: 0; border: 0; background: none;
  color: var(--e-global-color-primary, #20252B); font-family: inherit; font-size: 14px; line-height: 1.4; cursor: pointer; border-radius: 4px;
}
.bk-tl-wb button.bk-tl-copy:disabled { color: var(--e-global-color-text, #656D77); cursor: default; }
.bk-tl-wb button.bk-tl-download:is(*, :hover, :focus, :active) { margin-top: 18px; padding: 4px 0; }
.bk-tl-empty { margin: 0; font-size: 16px; line-height: 1.7; color: var(--e-global-color-text, #656D77); }
.bk-tl-out pre {
  margin: 0; padding: 0; background: none; border: 0; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 14px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--e-global-color-primary, #20252B);
  max-height: 500px; overflow: auto;
}
.bk-tl-og { border: 1px solid var(--e-global-color-border, #DCE0E5); border-radius: 6px; overflow: hidden; background: var(--e-global-color-surface, #fff); margin-bottom: 20px; }
.bk-tl-og img { display: block; width: 100%; aspect-ratio: 1.91; object-fit: cover; }
.bk-tl-og > div { padding: 20px; }
.bk-tl-og small { font-size: 12px; color: var(--e-global-color-text, #656D77); }
.bk-tl-og h4 { font-size: 20px; font-weight: 500; margin: 6px 0; color: var(--e-global-color-primary, #20252B); }
.bk-tl-og p { font-size: 14px; margin: 0; color: var(--e-global-color-text, #656D77); }

@media (max-width: 900px) {
  .bk-tl-wb { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 767px) {
  .bk-tl-form, .bk-tl-result { padding: 24px; }
  .bk-tl-card-title .elementor-heading-title::after { width: 14px; height: 14px; }
  .bk-tl-callout .bk-tl-textlink { flex-basis: 100%; }
}
