/* QuickToolz — site styles (supplements Tailwind CDN) */

/* Ad slots: fixed reserved space = zero CLS. Hidden entirely when no ad network configured. */
.ad-slot {
  display: block;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
}
.ad-slot[aria-hidden="true"] { display: none; } /* no AdSense ID configured → collapse */
.ad-slot ins.adsbygoogle { border-radius: 0.75rem; }

/* Honeypot field — visually removed, still in DOM for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* FAQ details marker removal */
details.faq-item summary::-webkit-details-marker { display: none; }

/* Blog body typography */
.blog-body h2 {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 1.5rem; font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: #0f172a;
}
.dark .blog-body h2 { color: #fff; }
.blog-body h3 {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 1.15rem; font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: #0f172a;
}
.dark .blog-body h3 { color: #f1f5f9; }
.blog-body p { margin: 0 0 1rem; line-height: 1.75; }
.blog-body ul, .blog-body ol { margin: 0 0 1rem 1.25rem; line-height: 1.7; }
.blog-body ul { list-style: disc; }
.blog-body ol { list-style: decimal; }
.blog-body li { margin-bottom: 0.35rem; }
.blog-body a { color: #0891b2; text-decoration: underline; text-underline-offset: 2px; }
.dark .blog-body a { color: #22d3ee; }
.blog-body a:hover { color: #06b6d4; }
.blog-body strong { font-weight: 600; color: #0f172a; }
.dark .blog-body strong { color: #fff; }
.blog-body table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.875rem; }
.blog-body th, .blog-body td { border: 1px solid #e2e8f0; padding: 0.5rem 0.75rem; text-align: left; }
.dark .blog-body th, .dark .blog-body td { border-color: #334155; }
.blog-body th { background: #f1f5f9; font-weight: 600; }
.dark .blog-body th { background: #1e293b; }
.blog-body blockquote {
  border-left: 3px solid #06b6d4;
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1rem 0;
  color: #475569;
  font-style: italic;
}
.dark .blog-body blockquote { color: #94a3b8; }
.blog-body code {
  background: #f1f5f9; padding: 0.15rem 0.4rem; border-radius: 0.3rem;
  font-size: 0.85em;
}
.dark .blog-body code { background: #1e293b; }

/* ---- Tool widget shared UI ---- */
.tw-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dark .tw-dropzone { border-color: #475569; }
.tw-dropzone:hover, .tw-dropzone.dragover {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.05);
}
.tw-label { display:block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.3rem; color: #334155; }
.dark .tw-label { color: #cbd5e1; }
.tw-input, .tw-select, .tw-textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.9rem;
}
.dark .tw-input, .dark .tw-select, .dark .tw-textarea {
  background: #0f172a; border-color: #475569; color: #f1f5f9;
}
.tw-input:focus, .tw-select:focus, .tw-textarea:focus {
  outline: 2px solid #06b6d4; outline-offset: 1px; border-color: #06b6d4;
}
.tw-textarea { min-height: 10rem; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.85rem; line-height: 1.5; resize: vertical; }
.tw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: 0.6rem;
  font-weight: 600; font-size: 0.9rem;
  background: #06b6d4; color: #fff;
  cursor: pointer; border: none;
  transition: background .15s;
}
.tw-btn:hover { background: #0891b2; }
.tw-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tw-btn-amber { background: #f59e0b; }
.tw-btn-amber:hover { background: #d97706; }
.tw-btn-ghost { background: transparent; color: #0891b2; border: 1px solid #06b6d4; }
.tw-btn-ghost:hover { background: rgba(6,182,212,.08); }
.dark .tw-btn-ghost { color: #22d3ee; }
.tw-result {
  margin-top: 1rem;
  border-radius: 0.75rem;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  padding: 1rem;
}
.dark .tw-result { background: rgba(8, 51, 68, .5); border-color: #155e75; }
.tw-result-big { font-size: 1.6rem; font-weight: 700; color: #0e7490; font-family: 'Space Grotesk', sans-serif; }
.dark .tw-result-big { color: #22d3ee; }
.tw-error {
  margin-top: 0.75rem;
  border-radius: 0.6rem;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  padding: 0.6rem 0.9rem; font-size: 0.85rem;
}
.dark .tw-error { background: rgba(69,10,10,.4); border-color: #7f1d1d; color: #fca5a5; }
.tw-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.tw-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
@media (max-width: 640px) { .tw-grid3 { grid-template-columns: 1fr; } .tw-grid2 { grid-template-columns: 1fr; } }
.tw-stat { text-align: center; padding: 0.75rem 0.5rem; border-radius: 0.6rem; background: #f8fafc; border: 1px solid #e2e8f0; }
.dark .tw-stat { background: #1e293b; border-color: #334155; }
.tw-stat b { display: block; font-size: 1.25rem; color: #0891b2; font-family: 'Space Grotesk', sans-serif; }
.dark .tw-stat b { color: #22d3ee; }
.tw-stat span { font-size: 0.7rem; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.tw-file-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.75rem; border-radius: 0.5rem;
  background: #f8fafc; border: 1px solid #e2e8f0;
  font-size: 0.82rem; margin-top: 0.4rem;
}
.dark .tw-file-item { background: #1e293b; border-color: #334155; }
.tw-thumb { max-width: 100%; border-radius: 0.6rem; border: 1px solid #e2e8f0; }
.dark .tw-thumb { border-color: #334155; }
.tw-range { width: 100%; accent-color: #06b6d4; }
.tw-copy-ok { color: #059669 !important; }

/* range table rows for pdf page grids */
.tw-pagegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.tw-pagegrid canvas { width: 100%; border: 2px solid #e2e8f0; border-radius: 0.4rem; cursor: pointer; }
.tw-pagegrid .sel canvas { border-color: #06b6d4; }

/* search result item */
.search-hit {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  color: #334155;
}
.dark .search-hit { color: #e2e8f0; }
.search-hit:hover, .search-hit.active { background: rgba(6,182,212,.1); color: #0891b2; }

/* skip link */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 100; background: #06b6d4; color: #fff; padding: 8px 14px; border-radius: 8px; }

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
