/* Local Directory — wpdirectoryplugin.com supplemental styles */

/* Scroll offset for sticky header */
html {
  scroll-padding-top: 5rem;
}

/* Code blocks */
pre {
  position: relative;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
}

pre code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  background: transparent;
  padding: 0;
}

code:not(pre code) {
  background: #f1f5f9;
  color: #6366f1;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

/* Copy button */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #94a3b8;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #e2e8f0;
}

.copy-btn.copied {
  color: #34d399;
  border-color: #34d399;
}

/* Doc layout */
.doc-layout {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 2rem;
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding-right: 1rem;
}

.doc-sidebar a {
  display: block;
  padding: 0.375rem 0.75rem;
  border-left: 2px solid transparent;
  color: #64748b;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.15s;
}

.doc-sidebar a:hover {
  color: #4f46e5;
}

.doc-sidebar a.active {
  color: #4f46e5;
  border-left-color: #4f46e5;
  font-weight: 600;
  background: #eef2ff;
  border-radius: 0 0.25rem 0.25rem 0;
}

.doc-sidebar .sidebar-group {
  margin-bottom: 1.25rem;
}

.doc-sidebar .sidebar-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #334155;
  padding: 0.375rem 0.75rem;
  margin-bottom: 0.25rem;
}

/* Responsive doc layout */
@media (max-width: 768px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }
  .doc-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    padding-right: 0;
  }
}

/* Table styling for docs */
.doc-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}

.doc-content thead th {
  background: #f8fafc;
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #334155;
  border-bottom: 2px solid #e2e8f0;
}

.doc-content tbody td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
}

.doc-content tbody tr:hover {
  background: #f8fafc;
}

/* Anchor links */
.doc-content h2,
.doc-content h3 {
  scroll-margin-top: 5rem;
}

.doc-content h2 {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
}

/* Pro badge */
.badge-pro {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  vertical-align: middle;
  margin-left: 0.375rem;
}

/* Feature card icon */
.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Gradient hero */
.hero-gradient {
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #6366f1 100%);
}

/* Pricing toggle */
.pricing-check {
  color: #4f46e5;
}

.pricing-check-pro {
  color: #059669;
}

.pricing-dash {
  color: #cbd5e1;
}

/* Mobile hamburger */
#mobile-menu {
  transition: max-height 0.3s ease, opacity 0.2s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu.open {
  max-height: 24rem;
  opacity: 1;
}

/* Smooth transition for nav */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #4f46e5;
  transition: width 0.2s;
}

.nav-link:hover::after {
  width: 100%;
}

/* Stats counter animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-item {
  animation: countUp 0.5s ease forwards;
}

/* Changelog version badge */
.version-badge {
  display: inline-block;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
}

/* Search filter in docs */
#doc-search {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  width: 100%;
  font-size: 0.875rem;
  transition: border-color 0.15s;
}

#doc-search:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
