/*
Theme Name: Tools Elite
Theme URI: https://toolselite.com/
Author: Tools Elite
Author URI: https://toolselite.com/
Description: Google-clean search-first theme for Tools Elite — every tool own-built. Minimal white homepage with a giant search bar, category chips and a tool grid. Mobile-first.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tools-elite
Tags: custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   Tools Elite — Design 1 "Google Clean" (approved 19 Nov 2026)
   Tokens derived from the mockup description; eyeball-compare
   against the shared mockup link before deploy (see BUILD-SPEC).
   ============================================================ */

:root {
  --te-bg: #ffffff;
  --te-surface: #f8f9fa;
  --te-ink: #202124;
  --te-muted: #5f6368;
  --te-line: #dfe1e5;
  --te-line-soft: #e8eaed;
  --te-accent: #1a73e8;
  --te-accent-dark: #1765cc;
  --te-accent-soft: #e8f0fe;
  --te-success: #188038;
  --te-warning: #e37400;
  --te-danger: #d93025;
  --te-radius-card: 16px;
  --te-radius-input: 8px;
  --te-radius-pill: 999px;
  --te-shadow-search: 0 1px 6px rgba(32, 33, 36, .28);
  --te-shadow-card-hover: 0 1px 3px rgba(60, 64, 67, .30), 0 4px 8px rgba(60, 64, 67, .15);
  --te-max-home: 1200px;
  --te-max-tool: 780px;
  --te-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--te-bg);
  color: var(--te-ink);
  font-family: var(--te-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--te-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 12px; font-weight: 600; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
h2 { font-size: 22px; margin-top: 32px; }
h3 { font-size: 18px; margin-top: 24px; }
p { margin: 0 0 16px; }

:focus-visible {
  outline: 2px solid var(--te-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.te-wrap { max-width: var(--te-max-home); margin: 0 auto; padding: 0 16px; }
.te-wrap-narrow { max-width: var(--te-max-tool); margin: 0 auto; padding: 0 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */

.te-header {
  background: var(--te-bg);
  border-bottom: 1px solid var(--te-line-soft);
}
@media (min-width: 769px) {
  .te-header { position: sticky; top: 0; z-index: 50; }
}
.te-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 60px;
}
.te-logo {
  font-size: 22px; font-weight: 700; letter-spacing: -.5px;
  color: var(--te-ink); text-decoration: none; white-space: nowrap;
}
.te-logo:hover { text-decoration: none; }
.te-logo span { color: var(--te-accent); }
.te-nav { display: flex; align-items: center; gap: 4px; }
.te-nav a {
  color: var(--te-muted); font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
.te-nav a:hover { color: var(--te-ink); background: var(--te-surface); text-decoration: none; }
.te-nav .current-menu-item a { color: var(--te-accent); }
@media (max-width: 560px) {
  .te-nav a { padding: 8px 8px; font-size: 14px; }
  .te-nav .te-nav-hide-mobile { display: none; }
}

/* ---------- Homepage hero + search ---------- */

.te-hero { text-align: center; padding: 48px 16px 8px; }
.te-hero-logo {
  font-size: 52px; font-weight: 700; letter-spacing: -1px;
  line-height: 1.1; margin: 0 0 8px; color: var(--te-ink);
}
.te-hero-logo span { color: var(--te-accent); }
.te-tagline { color: var(--te-muted); font-size: 18px; margin: 0 0 28px; }
@media (max-width: 560px) {
  .te-hero { padding: 32px 16px 4px; }
  .te-hero-logo { font-size: 40px; }
  .te-tagline { font-size: 16px; margin-bottom: 20px; }
}

.te-search { max-width: 640px; margin: 0 auto; position: relative; }
.te-search-input {
  width: 100%; height: 56px;
  padding: 0 52px 0 52px;
  font-family: inherit; font-size: 17px; color: var(--te-ink);
  background: var(--te-bg);
  border: 1px solid var(--te-line);
  border-radius: var(--te-radius-pill);
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
  -webkit-appearance: none; appearance: none;
}
.te-search-input:hover { box-shadow: var(--te-shadow-search); }
.te-search-input:focus { box-shadow: var(--te-shadow-search); border-color: transparent; }
.te-search-input::placeholder { color: var(--te-muted); }
.te-search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--te-muted); pointer-events: none;
}
.te-search-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--te-muted); font-size: 20px;
  line-height: 1; cursor: pointer; display: none;
}
.te-search-clear:hover { background: var(--te-surface); color: var(--te-ink); }
.te-search-clear.te-visible { display: block; }
@media (max-width: 560px) {
  .te-search-input { height: 52px; font-size: 16px; }
}

/* ---------- Category chips (homepage only — scoped under .te-home so
   these rules can never leak into tool pages, whose tools may reuse
   generic names like .te-grid / .te-card / .te-chip) ---------- */

.te-home .te-chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 20px 16px 4px; margin: 0 auto; max-width: var(--te-max-home);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.te-home .te-chips::-webkit-scrollbar { display: none; }
.te-home .te-chip {
  flex: 0 0 auto;
  padding: 8px 16px;
  font-family: inherit; font-size: 14px; font-weight: 500; color: var(--te-ink);
  background: var(--te-bg);
  border: 1px solid var(--te-line);
  border-radius: var(--te-radius-pill);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.te-home .te-chip:hover { background: var(--te-surface); }
.te-home .te-chip.te-chip-active {
  background: var(--te-accent-soft);
  border-color: var(--te-accent);
  color: var(--te-accent-dark);
}
.te-home .te-chip:disabled {
  color: var(--te-muted); cursor: default; opacity: .65;
}
.te-home .te-chip:disabled:hover { background: var(--te-bg); }

/* ---------- Tool grid ---------- */

.te-home .te-count {
  max-width: var(--te-max-home); margin: 0 auto; padding: 12px 16px 0;
  color: var(--te-muted); font-size: 14px;
}
.te-home .te-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  max-width: var(--te-max-home); margin: 0 auto; padding: 16px;
}
@media (min-width: 600px) { .te-home .te-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .te-home .te-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .te-home .te-grid { grid-template-columns: repeat(4, 1fr); } }

.te-home .te-card {
  display: block;
  background: var(--te-bg);
  border: 1px solid var(--te-line-soft);
  border-radius: var(--te-radius-card);
  padding: 20px;
  color: var(--te-ink);
  transition: box-shadow .15s ease, transform .15s ease;
}
.te-home a.te-card:hover { text-decoration: none; box-shadow: var(--te-shadow-card-hover); transform: translateY(-2px); }
.te-home .te-card-title { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.te-home .te-card-desc { color: var(--te-muted); font-size: 14px; line-height: 1.5; margin: 0 0 12px; }
.te-home .te-card-tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--te-accent-dark); background: var(--te-accent-soft);
  padding: 3px 10px; border-radius: var(--te-radius-pill);
}
.te-home .te-card-soon {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--te-muted); background: var(--te-surface);
  padding: 3px 10px; border-radius: var(--te-radius-pill);
  margin-left: 6px;
}
.te-home .te-card.te-card-disabled { cursor: default; opacity: .75; }
.te-home .te-empty {
  max-width: var(--te-max-home); margin: 0 auto; padding: 32px 16px;
  text-align: center; color: var(--te-muted); display: none;
}
.te-home .te-empty.te-visible { display: block; }
.te-home .te-empty button {
  margin-top: 12px; padding: 10px 20px;
  font-family: inherit; font-size: 15px; font-weight: 500;
  color: var(--te-bg); background: var(--te-accent); border: 0;
  border-radius: var(--te-radius-pill); cursor: pointer;
}
.te-home .te-empty button:hover { background: var(--te-accent-dark); }

/* ---------- How it works strip ---------- */

.te-how {
  background: var(--te-surface);
  border-top: 1px solid var(--te-line-soft);
  border-bottom: 1px solid var(--te-line-soft);
  margin-top: 32px; padding: 32px 0;
}
.te-how-grid {
  display: grid; grid-template-columns: 1fr; gap: 20px;
  max-width: var(--te-max-home); margin: 0 auto; padding: 0 16px;
}
@media (min-width: 700px) { .te-how-grid { grid-template-columns: repeat(3, 1fr); } }
.te-how h2 { font-size: 18px; margin: 0 0 6px; }
.te-how p { color: var(--te-muted); font-size: 15px; margin: 0; }

/* ---------- Footer ---------- */

.te-footer {
  padding: 32px 0 40px; color: var(--te-muted); font-size: 14px;
}
.te-footer-inner {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  align-items: center; justify-content: space-between;
}
.te-footer a { color: var(--te-muted); }
.te-footer a:hover { color: var(--te-ink); }
.te-footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- Tool pages ---------- */

.te-page { padding: 32px 0 48px; }
.te-page h1 { margin-bottom: 8px; }
.te-page-meta { color: var(--te-muted); font-size: 14px; margin-bottom: 24px; }

/* The tool block itself ships its own scoped CSS inside the page
   content (tool.html). These rules style the shared page chrome. */

.te-quick-answer {
  background: var(--te-accent-soft);
  border: 1px solid #c2dbff;
  border-left: 4px solid var(--te-accent);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
}
.te-quick-answer p { margin: 0; }
.te-quick-answer strong { color: var(--te-ink); }

.te-last-reviewed {
  color: var(--te-muted); font-size: 14px;
  margin: 0 0 8px;
}

.te-disclaimer {
  font-size: 14px; color: var(--te-muted);
  border: 1px solid var(--te-line-soft);
  border-radius: 12px; padding: 12px 16px;
  margin: 16px 0 0;
}
.te-disclaimer p { margin: 0; }

/* FAQ accordions */
.te-faq details {
  border: 1px solid var(--te-line-soft);
  border-radius: 12px;
  margin: 0 0 12px;
  padding: 0;
  overflow: hidden;
}
.te-faq summary {
  cursor: pointer; font-weight: 600; font-size: 16px;
  padding: 14px 18px; list-style: none;
}
.te-faq summary::-webkit-details-marker { display: none; }
.te-faq summary::after {
  content: "+"; float: right; color: var(--te-muted); font-weight: 400;
}
.te-faq details[open ] summary::after { content: "–"; }
.te-faq details p { padding: 0 18px 14px; margin: 0; color: var(--te-ink); }

/* Content tables (comparison tables) */
.te-content table {
  width: 100%; border-collapse: collapse;
  margin: 16px 0 24px; font-size: 15px;
}
.te-content th, .te-content td {
  text-align: left; padding: 10px 12px;
  border: 1px solid var(--te-line-soft);
  vertical-align: top;
}
.te-content th { background: var(--te-surface); font-weight: 600; }
.te-content tr:nth-child(even) td { background: #fcfcfd; }

.te-sources { font-size: 15px; }
.te-sources li { margin-bottom: 6px; }

/* Stacked-card tables under 768px (TM Tool 01 pattern) */
@media (max-width: 767px) {
  .te-content table.te-stack,
  .te-content table.te-stack tbody,
  .te-content table.te-stack tr,
  .te-content table.te-stack td { display: block; width: 100%; }
  .te-content table.te-stack thead { display: none; }
  .te-content table.te-stack tr {
    border: 1px solid var(--te-line-soft);
    border-radius: 12px; margin-bottom: 12px; padding: 4px 0;
  }
  .te-content table.te-stack td {
    border: 0; border-bottom: 1px solid var(--te-line-soft);
    padding: 10px 14px;
  }
  .te-content table.te-stack td:last-child { border-bottom: 0; }
  .te-content table.te-stack td::before {
    content: attr(data-label);
    display: block; font-size: 12px; font-weight: 600;
    color: var(--te-muted); margin-bottom: 2px;
  }
}

/* ---------- Generic content pages ---------- */

.te-content img { border-radius: 12px; }
.te-content ul, .te-content ol { margin: 0 0 16px; padding-left: 24px; }
.te-content li { margin-bottom: 6px; }
.te-content blockquote {
  margin: 16px 0; padding: 12px 20px;
  border-left: 4px solid var(--te-line);
  color: var(--te-muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  .te-page { padding: 24px 0 40px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
