/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #ffffff;
  color: #111827;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Typography */
h1 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  color: #4b5563;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  font-size: 0.875rem;
}

/* Header */
.header {
  margin-bottom: 2.5rem;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.badge-green {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.description {
  font-size: 1.125rem;
  color: #4b5563;
}

/* Sections */
.section {
  margin-bottom: 2.5rem;
}

.section-description {
  margin-bottom: 1rem;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover {
  color: #374151;
}

.tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

/* Tab content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Install button */
.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  background-color: #16a34a;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s;
  margin-bottom: 1rem;
}

.install-btn:hover {
  background-color: #15803d;
  text-decoration: none;
}

.install-btn svg {
  width: 1rem;
  height: 1rem;
}

/* Inline code */
.inline-code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

/* Code blocks */
.code-block {
  background-color: #1e293b;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  position: relative;
}

.code-block pre {
  margin: 0;
}

.code-block code {
  color: #e2e8f0;
  font-size: 0.875rem;
  line-height: 1.7;
  white-space: pre;
}

.code-block .key { color: #7dd3fc; }
.code-block .string { color: #86efac; }
.code-block .number { color: #fcd34d; }
.code-block .comment { color: #94a3b8; }

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.code-block-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
  background: transparent;
  border: 1px solid #475569;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.copy-btn:hover {
  color: #e2e8f0;
  border-color: #64748b;
}

.copy-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* Command line blocks */
.command-block {
  background-color: #1e293b;
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
}

.command-block code {
  color: #e2e8f0;
  font-size: 0.875rem;
}

/* Tool card */
.tool-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.tool-card:last-child {
  margin-bottom: 0;
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.tool-icon {
  width: 2rem;
  height: 2rem;
  background-color: #dbeafe;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-icon svg {
  width: 1rem;
  height: 1rem;
  color: #2563eb;
}

.tool-content {
  flex: 1;
}

.tool-name {
  font-weight: 600;
  color: #111827;
}

.tool-description {
  color: #4b5563;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Parameters */
.params-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.params-list {
  list-style: none;
}

.param-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.375rem 0;
}

.param-name {
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-family: 'SF Mono', Monaco, monospace;
  flex-shrink: 0;
}

.param-description {
  color: #4b5563;
  font-size: 0.875rem;
}

.param-name .optional {
  color: #9ca3af;
  font-weight: 400;
  font-size: 0.625rem;
}

.param-item-enum {
  flex-direction: column;
  align-items: flex-start;
}

/* Collections */
.products-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-tag {
  padding: 0.175rem 0.45rem;
  background-color: #f3f4f6;
  color: #374151;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Endpoints */
.endpoints-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.endpoint-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
}

.endpoint-method {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.25rem;
}

.endpoint-method.post {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.endpoint-method.get {
  background-color: #dcfce7;
  color: #166534;
}

.endpoint-path {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.875rem;
}

.endpoint-description {
  color: #6b7280;
  font-size: 0.875rem;
  margin-left: auto;
}

/* Footer */
.footer {
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Helper text */
.helper-text {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* Info box */
.info-box {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
}

.info-box p {
  color: #0369a1;
  font-size: 0.875rem;
}

/* Collapsible output sample */
.output-sample {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0;
  margin: 1rem 0;
}

.output-sample summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 500;
  color: #374151;
  user-select: none;
  transition: background-color 0.15s;
}

.output-sample summary:hover {
  background-color: #f9fafb;
}

.output-sample summary::-webkit-details-marker {
  display: none;
}

.output-sample .chevron-icon {
  width: 1rem;
  height: 1rem;
  color: #6b7280;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.output-sample[open] .chevron-icon {
  transform: rotate(180deg);
}

.output-sample > div {
  padding: 0 1rem 1rem 1rem;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 2rem 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .endpoint-item {
    flex-wrap: wrap;
  }

  .endpoint-description {
    margin-left: 0;
    width: 100%;
    margin-top: 0.5rem;
  }
}
