/* Title & Meta Preview — Tool Styles */
/* Extends /style.css — only visual overrides here */

:root {
  --primary: #22c55e;
  --primary-light: #f0fdf4;
}

[data-theme="dark"] {
  --primary-light: #052e16;
}

/* ── Page hero ── */
.tool-hero {
  background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  color: #fff;
}
.tool-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff !important;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.tool-hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  color: #fff;
  margin-bottom: 1rem;
}

/* ── Main layout ── */
.tool-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── Card Base ── */
.calc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.calc-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.calc-card h2 i {
  color: var(--primary);
}

/* ── Form fields ── */
.form-field {
  margin-bottom: 1.25rem;
}
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.char-count {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.25rem;
}
.char-count.warning { color: #f59e0b; }
.char-count.error { color: #ef4444; }

/* ── SERP Preview ── */
.serp-preview {
    background: var(--bg);
    padding: 1rem;
    border-radius: 8px;
}
.serp-url {
    color: #006621;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    word-break: break-all;
}
.serp-title {
    color: #1a0dab;
    font-size: 1.125rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.serp-desc {
    color: #545454;
    font-size: 0.875rem;
    line-height: 1.4;
    word-break: break-word;
}
[data-theme="dark"] .serp-title { color: #8ab4f8; }
[data-theme="dark"] .serp-url { color: #b7e1cd; }
[data-theme="dark"] .serp-desc { color: #bdc1c6; }

/* ── Mobile Preview ── */
.mobile-preview-frame {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
    max-width: 375px;
    margin: 0 auto;
}
.mobile-url-bar {
    background: #f1f3f4;
    padding: 0.5rem;
    font-size: 0.75rem;
    text-align: center;
    color: #5f6368;
}
.mobile-snippet {
    padding: 1rem;
}
.mobile-url-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.mobile-site-icon {
    width: 18px;
    height: 18px;
    background: #f1f3f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
}
.mobile-site-name {
    font-size: 0.75rem;
    color: #202124;
}
.mobile-title {
    color: #1a0dab;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}
.mobile-desc {
    color: #4d5156;
    font-size: 0.875rem;
    line-height: 1.4;
}
[data-theme="dark"] .mobile-site-name { color: #e8eaed; }
[data-theme="dark"] .mobile-title { color: #8ab4f8; }
[data-theme="dark"] .mobile-desc { color: #bdc1c6; }
[data-theme="dark"] .mobile-url-bar, 
[data-theme="dark"] .mobile-site-icon { background: #303134; color: #9aa0a6; }

/* ── Calculate/Copy button ── */
.calc-btn {
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.calc-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.25);
}

/* ── Content Section ── */
.content-section h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin: 2rem 0 0.75rem;
  border-left: 3px solid var(--primary);
  padding-left: 0.75rem;
}
.content-section p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.975rem;
  margin-bottom: 1rem;
}
.steps-box {
  background: var(--primary-light);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.5rem 2.5rem;
  margin: 1.5rem 0;
}
.steps-box li {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-pill {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.feature-pill strong {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.feature-pill p {
  font-size: 0.875rem;
  margin: 0;
}

/* ── Related Tools ── */
.related-tools-section {
  margin: 3rem 0;
}
.related-tools-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none !important;
  transition: all 0.2s;
}
.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.tool-card .icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.tool-card .tool-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.tool-card .tool-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.faq-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}
