/* SnappyFreeTools.com — shared styles */

:root {
  --teal-dark: #0f766e;
  --teal: #0d9488;
  --teal-light: #14b8a6;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --ink: #1e293b;
  --slate: #475569;
  --slate-light: #94a3b8;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  color: var(--ink);
}

.logo:hover { text-decoration: none; }

.logo-img {
  height: 34px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  font-weight: 600;
}

.site-nav a { color: var(--slate); }
.site-nav a:hover { color: var(--teal-dark); text-decoration: none; }

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

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 32px 24px;
  text-align: center;
  color: var(--slate-light);
  font-size: 14px;
}

.site-footer a { color: var(--slate); }

.site-footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* ---------- Homepage: hero ---------- */

.hero {
  max-width: 1400px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 12px;
}

.hero h1 .accent { color: var(--accent); }

.hero p {
  color: var(--slate);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Homepage: tool directory grid ---------- */

.tool-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  color: var(--ink);
}

.tool-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-icon svg { width: 28px; height: 28px; }

.tool-card h3 {
  margin: 0;
  font-size: 17px;
}

.tool-card p {
  margin: 0;
  font-size: 14px;
  color: var(--slate);
}

.tool-card.is-coming-soon {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.badge-soon {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--border);
  color: var(--slate);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ---------- Tool page layout: header / center widget / ad rails ---------- */

.tool-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.ad-slot {
  display: none;
}

.ad-slot-inner {
  width: 160px;
  min-height: 600px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-light);
  font-size: 12px;
  text-align: center;
  position: sticky;
  top: 84px;
  background: #fff;
}

.ad-slot .adsbygoogle {
  position: sticky;
  top: 84px;
}

.ad-slot-mobile {
  margin: 24px auto 0;
  text-align: center;
  overflow: hidden;
}

@media (min-width: 1100px) {
  .tool-layout {
    grid-template-columns: 160px minmax(0, 800px) 160px;
    justify-content: center;
  }
  .ad-slot {
    display: flex;
    justify-content: center;
  }
  .ad-slot-mobile {
    display: none;
  }
}

.tool-main {
  min-width: 0;
}

.tool-header {
  text-align: center;
  margin-bottom: 24px;
}

.tool-header h1 {
  font-size: clamp(24px, 3.5vw, 32px);
  margin: 0 0 10px;
}

.tool-header p {
  color: var(--slate);
  font-size: 16px;
  max-width: 620px;
  margin: 0 auto;
}

.tool-widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
}

.tool-content {
  margin-top: 40px;
  color: var(--slate);
}

.tool-content h2 {
  color: var(--ink);
  font-size: 20px;
  margin-top: 32px;
}

.tool-content h2:first-child { margin-top: 0; }

/* ---------- Legal / info pages (privacy, terms, contact) ---------- */

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 64px;
  color: var(--slate);
}

.legal-page h1 {
  color: var(--ink);
  font-size: clamp(26px, 4vw, 34px);
  margin: 0 0 8px;
}

.legal-page .updated {
  color: var(--slate-light);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal-page h2 {
  color: var(--ink);
  font-size: 20px;
  margin-top: 32px;
}

.legal-page h2:first-of-type {
  margin-top: 0;
}

.legal-page ul,
.legal-page ol {
  padding-left: 20px;
}

.legal-page a {
  color: var(--teal-dark);
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.contact-card h2 {
  margin-top: 0;
  font-size: 17px;
}

/* ---------- Form fields (QR generator, password generator, etc.) ---------- */

.field-group {
  margin-bottom: 20px;
}

.field-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

.text-input:focus {
  outline: none;
  border-color: var(--teal);
}

.qr-preview {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.qr-preview canvas {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

/* ---------- Password generator ---------- */

.password-output {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.password-output input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.password-output input:focus {
  outline: none;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.option-row:last-of-type {
  border-bottom: none;
}

.option-row label {
  font-size: 15px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.option-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.option-row input[type="range"] {
  width: 140px;
  accent-color: var(--teal);
}

.strength-meter {
  margin-top: 4px;
  margin-bottom: 24px;
}

.strength-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.15s ease, background-color 0.15s ease;
}

.strength-label {
  font-size: 13px;
  color: var(--slate);
  margin-top: 6px;
}

.breadcrumb {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 0 16px;
  font-size: 13px;
  color: var(--slate-light);
}

.breadcrumb a { color: var(--slate-light); }

/* ---------- Dropzone (HEIC converter & future upload tools) ---------- */

.dropzone {
  border: 2px dashed var(--teal-light);
  border-radius: 12px;
  background: #f0fdfa;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  background: #ccfbf1;
  border-color: var(--teal);
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  color: var(--teal);
}

.dropzone h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.dropzone p {
  margin: 0;
  color: var(--slate);
  font-size: 14px;
}

.dropzone-browse {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: underline;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.file-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.file-row-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}

.file-row-info {
  flex: 1;
  min-width: 0;
}

.file-row-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-row-status {
  font-size: 13px;
  color: var(--slate);
}

.file-row-status.is-error { color: #dc2626; }
.file-row-status.is-done { color: var(--teal-dark); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn:hover { background: var(--teal-dark); text-decoration: none; color: #fff; }

.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); }

.btn-sm { padding: 7px 14px; font-size: 13px; }

.tool-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tool-actions[hidden] {
  display: none;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.privacy-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--slate-light);
  text-align: center;
}
