/*
 * Copyright (c) 2024-2026 Luca Vitiello. All rights reserved.
 * SPDX-License-Identifier: LicenseRef-Proprietary
 */

/* Free tools: form controls and output panels. Extends main.css and docs.css. */
.tool { margin: 1.5rem 0 2.5rem; padding: 1.25rem; border: 1px solid var(--border-2); border-radius: var(--r); background: var(--surface-1); }
.tool-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; align-items: flex-end; }
.tool-field { display: grid; gap: .35rem; min-width: 0; font-size: .8rem; color: var(--text-2); }
.tool-field.grow { flex: 1 1 14rem; }
.tool-check { display: flex; gap: .5rem; align-items: center; font-size: .9rem; color: var(--text-2); }
.tool-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .5rem 1rem; margin-bottom: 1rem; }
.tool input[type=text], .tool input[type=number], .tool select, .tool textarea {
  width: 100%; padding: .5rem .6rem; font: inherit; font-size: .88rem; color: var(--text-1);
  background: var(--bg); border: 1px solid var(--border-3); border-radius: var(--r);
}
.tool textarea { font-family: var(--f-mon); font-size: .82rem; min-height: 9rem; resize: vertical; }
.tool input:focus-visible, .tool select:focus-visible, .tool textarea:focus-visible, .tool button:focus-visible, .tool-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tool-btn { display: inline-block; padding: .5rem 1rem; font: inherit; font-size: .85rem; font-weight: 600; color: var(--text-1); background: var(--surface-3); border: 1px solid var(--border-3); border-radius: var(--r); cursor: pointer; text-decoration: none; }
.tool-btn:hover { border-color: var(--blue); color: var(--blue-hi); }
.tool-btn.primary { background: var(--blue); border-color: var(--blue); color: var(--bg); }
.tool-btn.primary:hover { color: var(--bg); background: var(--blue-hi); }
.docs-content a.tool-btn { text-decoration: none; color: var(--text-1); }
.tool-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.tool-summary { margin: 1rem 0 .5rem; font-family: var(--f-mon); font-size: .85rem; color: var(--text-1); }
.tool-pass { color: var(--green); font-weight: 600; }
.tool-fail { color: var(--red); font-weight: 600; }
.tool-scroll { max-width: 100%; overflow-x: auto; }
.tool-scroll table { min-width: 34rem; margin: .5rem 0; }
.docs-content .tool table { table-layout: auto; }
.tool .tool-prefixes input { padding: .3rem .4rem; }
.tool-out { margin: .5rem 0; max-height: 26rem; overflow: auto; }
.tool-status { font-size: .8rem; color: var(--text-3); min-height: 1.2em; }
@media (max-width: 600px) { .tool { padding: .85rem; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Featured tool card on the tools index: full width, with a screenshot. */
.doc-guide-grid .tool-featured { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); }
.doc-guide-grid .tool-featured img { width: 100%; height: auto; border: 1px solid var(--border-2); border-radius: var(--r); margin-bottom: .5rem; }
.doc-guide-grid .tool-featured strong { font-size: 1.15rem; }
.doc-guide-grid .tool-featured em { color: var(--blue-hi); font-style: normal; }
.tool-head-btn { flex: none; white-space: nowrap; padding: .6rem 1.3rem; font-size: .95rem; }
.docs-content a.tool-btn.primary { color: var(--bg); }
.tool-dl-row { display: flex; justify-content: flex-end; margin: 1.25rem 0 1.5rem; }
.toc-dl-btn { display: block; text-align: center; margin-bottom: 1.5rem; }
@media (min-width: 1300px) { .tool-dl-row { display: none; } }
