/* Documentation page */

.docs-page {
  min-height: 70vh;
  overflow: visible;
}

.docs-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  max-width: 1280px;
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.docs-sidebar {
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.docs-sidebar-inner {
  position: sticky;
  top: 0;
  display: flex;
  max-height: 100vh;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.docs-sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--heading);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.docs-sidebar-brand .logo-mark {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.docs-sidebar-brand .logo-mark img {
  display: block;
  width: 28px;
  height: 28px;
}

.docs-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 42px;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 54%, var(--surface));
  color: var(--text-muted);
}

.docs-search-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 21-4.34-4.34'/%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 21-4.34-4.34'/%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.docs-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--heading);
  outline: 0;
}

.docs-search input::placeholder {
  color: var(--text-muted);
}

.docs-nav {
  overflow: auto;
  min-height: 0;
  padding: 0.25rem 0 1rem;
}

.docs-nav-group {
  margin-top: 1.25rem;
}

.docs-nav-group:first-child {
  margin-top: 0;
}

.docs-nav-group p {
  margin: 0 0 0.35rem;
  padding: 0 0.5rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
}

.docs-nav-group ul {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav-group a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.25;
  text-decoration: none;
}

.docs-nav-group a:hover {
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  color: var(--heading);
}

.docs-nav-group a.active {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: #7db7ff;
}

.docs-search-empty {
  margin: 0;
  padding: 0.75rem 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.docs-content {
  width: 100%;

  padding: 5rem var(--pad3) 6rem;
}

.docs-content-header {
  margin-bottom: 2rem;
}

.docs-integration-detail-header {
  display: grid;
  justify-items: start;
}

.docs-path {
  margin-bottom: 0.9rem;
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-content h1 {
  max-width: none;
  margin: 0 0 1rem;
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  line-height: 0.96;
}

.docs-module {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.docs-prose {

  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.docs-prose p {
  margin-bottom: 1.1rem;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.75;
}

.docs-prose p:last-child {
  margin-bottom: 0;
}

.docs-integration-detail-icon {
  display: flex;
  width: 128px;
  height: 72px;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.25rem;
}

.docs-integration-detail-icon img {
  display: block;
  width: auto;
  height: auto;
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
}

.docs-integration-detail-icon img.docs-logo-horizontal {
  width: 112px;
  height: 30px;
  max-width: 112px;
  max-height: 30px;
}

.docs-integration-detail-prices {
  justify-content: flex-start;
  margin-top: 0.25rem;
}

.docs-integrations {
  padding-top: 3rem;
}

.docs-linked-services {
  padding-top: 3rem;
}

.docs-section-heading {
  max-width: 620px;
  margin-bottom: 1.5rem;
}

.docs-section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.docs-integration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.docs-integration-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: center;
  padding: 1.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.docs-integration-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.docs-integration-icon {
  display: flex;
  width: 112px;
  height: 56px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.docs-integration-icon img {
  display: block;
  width: auto;
  height: auto;
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
}

.docs-integration-icon img.docs-logo-horizontal {
  width: 96px;
  height: 24px;
  max-width: 96px;
  max-height: 24px;
}

.docs-integration-card h3 {
  margin-bottom: 0.4rem;
  color: var(--heading);
  font-size: 1.1rem;
}

.docs-price-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.docs-price-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.docs-service-list {
  border-top: 1px solid var(--border);
}

.docs-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.docs-service-row:hover {
  color: var(--heading);
}

.docs-service-row span {
  display: grid;
  gap: 0.25rem;

}

.docs-service-row strong {
  color: var(--heading);
  font-size: 1.05rem;
  font-weight: 500;
}

.docs-service-row small {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.docs-service-row em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 0.95rem;
  font-style: normal;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.docs-service-empty {
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.docs-empty-state {
  max-width: 1280px;
  min-height: 60vh;
  margin: 0 auto;
  padding: 6rem var(--pad3);
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  text-align: center;
}

.docs-empty-state h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .docs-sidebar-inner {
    position: static;
    max-height: none;
  }

  .docs-nav {
    overflow: visible;
    padding-bottom: 0;
  }

  .docs-content {
    max-width: none;
    padding: 4rem var(--pad2);
  }

  .docs-integration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .docs-integration-grid {
    grid-template-columns: 1fr;
  }

  .docs-content h1 {
    font-size: clamp(2.25rem, 14vw, 3.25rem);
  }
}
