/* =============================================================
   Tools Ninja — Tool Theme (contemporary, home-matching layer)
   Loaded LAST (via header.php) so it upgrades the shared shell
   classes across every tool page at once. Uses common.css vars,
   so light/dark themes keep working.
   ============================================================= */

:root {
    --tk-display: 'Bricolage Grotesque', 'Inter', -apple-system, sans-serif;
    --tk-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

/* ---- Hero (shared .header-section) ---------------------------------- */
.header-section {
    position: relative;
    padding: 1.1rem 1.25rem 0.85rem;
    margin-bottom: 0.9rem;
    overflow: hidden;
}
.header-section::before {
    content: "";
    position: absolute; inset: 0; z-index: 0;
    background: radial-gradient(ellipse 45% 130% at 50% 0%, rgba(99,91,255,.11), transparent 72%);
    pointer-events: none;
}
.header-section > * { position: relative; z-index: 1; }
.header-section h1 {
    font-family: var(--tk-display);
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text-primary);
    display: inline-flex; align-items: center; gap: 0.5rem; justify-content: center;
    flex-wrap: wrap;
}
.header-section h1 svg,
.header-section h1 .tool-icon {
    width: 1em; height: 1em;
    color: var(--accent-primary); stroke: var(--accent-primary);
    flex-shrink: 0;
}
.header-section p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0.28rem auto 0;
    line-height: 1.45;
}

/* ---- Cards / input shell -------------------------------------------- */
.input-section,
.tool-card,
.result-section,
.results-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(5, 10, 30, 0.05);
}
.input-section { padding: 1.05rem 1.2rem; margin-bottom: 1rem; }

/* ---- Compact vertical rhythm so results sit above the fold ---------- */
.container { padding-top: 0; }
.input-section .export-buttons { margin-top: 0.75rem !important; }
.input-section .input-group label { margin-bottom: 0.3rem; }
.results-section, .result-section, #results, #resultsContainer { margin-top: 1rem; }
.progress-bar-container { padding: 0.9rem 1.1rem; }

/* ---- Inputs --------------------------------------------------------- */
.input-section input[type="text"],
.input-section input[type="url"],
.input-section input[type="search"],
.input-section input[type="number"],
.input-group input,
.input-group textarea,
.input-group select,
.tool-card input[type="text"],
.tool-card textarea {
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group input:focus,
.input-section input:focus,
.input-group textarea:focus,
.tool-card input:focus,
.tool-card textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.14);
}
.input-group label,
.tb-label {
    font-family: var(--tk-mono);
    letter-spacing: 0.02em;
}

/* ---- Buttons -------------------------------------------------------- */
.btn { border-radius: 9px; font-weight: 600; }
.btn-primary,
.btn-run-all {
    background: var(--accent-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 91, 255, 0.28);
}
.btn-primary:hover,
.btn-run-all:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 91, 255, 0.36);
}
.btn-run-all {
    height: 44px; padding: 0 1.5rem; font-size: 0.92rem; font-weight: 700;
}
.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(99, 91, 255, 0.06);
}

/* ---- Section / result headings ------------------------------------- */
.result-section h2,
.results-section h2,
.section-title {
    font-family: var(--tk-display);
    letter-spacing: -0.015em;
}

/* ---- Tabs / pills accent ------------------------------------------- */
.tab-btn.active,
.filter-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}
