/* ==========================================================================
   RankPulse SEO Tools - Dedicated Stylesheet
   ========================================================================== */

/* Tools Hub Layout */
.tools-hub-hero {
  text-align: center;
  padding: 4rem 0 2.5rem;
}

.tool-search-bar-wrap {
  max-width: 680px;
  margin: 2rem auto 2.5rem;
  position: relative;
}

.tool-search-input {
  width: 100%;
  padding: 1.1rem 1.5rem 1.1rem 3.25rem;
  font-size: 1.05rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.tool-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.tool-search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1.2rem;
  pointer-events: none;
}

.tool-category-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.category-pill {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.category-pill:hover, .category-pill.active {
  background: var(--primary);
  color: #FFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   Tool Single Page Workbench Layout
   ========================================================================== */
.tool-page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 2.5rem;
}

.tool-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.tool-breadcrumbs a {
  color: var(--text-muted);
}

.tool-breadcrumbs a:hover {
  color: var(--secondary);
}

.tool-workbench {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 4rem;
}

.workbench-panel {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Progress / Meter Bars */
.meter-wrap {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  color: var(--text-dim);
}

.meter-bar-bg {
  width: 100%;
  height: 6px;
  background: #1E293B;
  border-radius: 3px;
  overflow: hidden;
}

.meter-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-emerald);
  transition: width 0.25s ease, background-color 0.25s ease;
}

.meter-bar-fill.warning {
  background: var(--accent-amber);
}

.meter-bar-fill.danger {
  background: var(--accent-rose);
}

/* Code Output Area */
.code-output-container {
  position: relative;
  background: #060911;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  margin-top: 1.25rem;
}

.code-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.code-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.code-action-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFF;
}

.code-snippet {
  margin: 0;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #E2E8F0;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 420px;
  overflow-y: auto;
}

/* ==========================================================================
   Google SERP Preview Simulation Card
   ========================================================================== */
.serp-preview-card {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: Arial, sans-serif;
  color: #202124;
  margin-bottom: 1.5rem;
}

.serp-device-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.serp-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.serp-tab-btn.active {
  background: var(--primary);
  color: #FFF;
  border-color: var(--primary);
}

.serp-header-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.serp-favicon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #E8EAED;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #5F6368;
}

.serp-site-info {
  display: flex;
  flex-direction: column;
}

.serp-site-name {
  font-size: 14px;
  line-height: 16px;
  color: #202124;
  font-weight: 400;
}

.serp-url-breadcrumb {
  font-size: 12px;
  line-height: 16px;
  color: #4D5156;
}

.serp-title {
  font-size: 20px;
  line-height: 1.3;
  color: #1A0DAB;
  text-decoration: none;
  font-weight: 400;
  display: block;
  margin: 4px 0;
  cursor: pointer;
  word-wrap: break-word;
}

.serp-title:hover {
  text-decoration: underline;
}

.serp-snippet {
  font-size: 14px;
  line-height: 1.58;
  color: #4D5156;
  word-wrap: break-word;
}

.serp-rich-snippet {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #5F6368;
  margin: 4px 0;
}

.serp-stars {
  color: #F4B400;
  letter-spacing: 1px;
}

/* ==========================================================================
   Social Card Previews (Facebook / Twitter)
   ========================================================================== */
.social-preview-card {
  background: #242526;
  border: 1px solid #3E4042;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1.25rem;
}

.social-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #1E293B, #0F172A);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  border-bottom: 1px solid #3E4042;
}

.social-meta-info {
  padding: 1rem;
}

.social-site-domain {
  font-size: 0.75rem;
  color: #B0B3B8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.social-title {
  font-size: 1rem;
  font-weight: 600;
  color: #E4E6EB;
  margin-bottom: 0.4rem;
}

.social-desc {
  font-size: 0.85rem;
  color: #B0B3B8;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Keyword Density Analysis Table & Stats
   ========================================================================== */
.density-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.density-stat-box {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.density-stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--secondary);
}

.density-stat-lbl {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.density-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.density-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.density-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.density-badge {
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.density-badge.safe {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.density-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.density-badge.danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

/* In-Tool Agency CTA Promotion Banner */
.tool-agency-cta {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin: 3.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.tool-agency-cta h3 {
  margin-bottom: 0.5rem;
}

/* Tool FAQ Accordion Section */
.tool-faq-section {
  max-width: 850px;
  margin: 4rem auto;
}

.faq-accordion-item {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-header {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-header:hover {
  color: var(--secondary);
}

.faq-body {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: none;
}

.faq-accordion-item.open .faq-body {
  display: block;
}

/* Responsive Workbench */
@media (max-width: 1024px) {
  .tool-workbench {
    grid-template-columns: 1fr;
  }
  .density-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tool-agency-cta {
    flex-direction: column;
    text-align: center;
  }
}
