/* API Docs-specific styles */

.api-docs-body {
  background: #f5f7fa;
}

.api-section {
  margin-bottom: 40px;
}

.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.api-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.api-card h4 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--dark-color);
}

.endpoint-list {
  list-style: none;
  padding: 0;
}

.endpoint-item {
  margin-bottom: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.endpoint-method {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 10px;
}

.endpoint-method.get { background: #d4edda; color: #155724; }
.endpoint-method.post { background: #d1ecf1; color: #0c5460; }
.endpoint-method.put { background: #fff3cd; color: #856404; }
.endpoint-method.delete { background: #f8d7da; color: #721c24; }
.endpoint-method.patch { background: #e8d5f5; color: #6f2da8; }

.method {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-right: 10px;
  flex-shrink: 0;
}
.method.get    { background: #d4edda; color: #155724; }
.method.post   { background: #d1ecf1; color: #0c5460; }
.method.put    { background: #fff3cd; color: #856404; }
.method.delete { background: #f8d7da; color: #721c24; }
.method.patch  { background: #e8d5f5; color: #6f2da8; }

.endpoint-path {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--primary-color);
}

.endpoint-description {
  font-size: 14px;
  color: var(--secondary-color);
  margin-top: 5px;
}

.api-endpoint {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-bottom: 30px;
}

.endpoint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--border-color);
}

.endpoint-method-label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.endpoint-method-label.get { background: #d4edda; color: #155724; }
.endpoint-method-label.post { background: #d1ecf1; color: #0c5460; }
.endpoint-method-label.put { background: #fff3cd; color: #856404; }
.endpoint-method-label.delete { background: #f8d7da; color: #721c24; }

.endpoint-title {
  font-size: 18px;
  margin: 0;
  color: var(--dark-color);
}

.endpoint-content {
  padding: 20px;
}

.endpoint-section {
  margin-bottom: 25px;
}

.endpoint-section h4 {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.endpoint-description p {
  font-size: 14px;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.request-example {
  background: #1e1e1e;
  border-radius: 8px;
  padding: 20px;
  color: #f8f8f2;
  font-family: 'Courier New', monospace;
  margin-bottom: 20px;
}

.response-example {
  background: #1e1e1e;
  border-radius: 8px;
  padding: 20px;
  color: #f8f8f2;
  font-family: 'Courier New', monospace;
  margin-bottom: 20px;
}

.code-block {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.parameters-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.parameters-table th,
.parameters-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.parameters-table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.parameters-table tr:last-child td {
  border-bottom: none;
}

.parameter-name {
  font-weight: 600;
  color: var(--primary-color);
}

.parameter-required {
  display: inline-block;
  padding: 2px 6px;
  background: #e9ecef;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 5px;
}

.parameter-type {
  color: var(--secondary-color);
  font-style: italic;
}

.interactive-console {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-bottom: 30px;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--border-color);
}

.console-tabs {
  display: flex;
  gap: 10px;
}

.console-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.console-tab.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

.console-tab:hover:not(.active) {
  background: #f8f9fa;
}

.console-content {
  padding: 20px;
}

.console-panel {
  display: none;
}

.console-panel.active {
  display: block;
}

.request-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 20px;
}

.response-output {
  background: #1e1e1e;
  border-radius: 8px;
  padding: 20px;
  color: #f8f8f2;
  font-family: 'Courier New', monospace;
  max-height: 300px;
  overflow-y: auto;
}

.response-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.status-code {
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.status-code.success { background: #d4edda; color: #155724; }
.status-code.error { background: #f8d7da; color: #721c24; }
.status-code.warning { background: #fff3cd; color: #856404; }

/* ── Endpoint groups & cards (real endpoint sections) ── */
.endpoint-group {
  margin-bottom: 36px;
}

.endpoint-group > h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #e2e8f0);
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--border-color, #2d3148);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.endpoint-card {
  background: var(--card-bg, #1a1d27);
  border: 1px solid var(--border-color, #2d3148);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.endpoint-card .endpoint-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--card-header-bg, #13151f);
  border-bottom: 1px solid var(--border-color, #2d3148);
  justify-content: flex-start;
}

.endpoint-card .endpoint-path {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #a5b4fc;
}

.endpoint-card .endpoint-description {
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.7;
}

.endpoint-card .endpoint-description p {
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 10px;
}

.endpoint-card .endpoint-description p strong {
  color: var(--text-primary, #e2e8f0);
}

.endpoint-card .endpoint-description ul {
  color: var(--text-secondary, #94a3b8);
  padding-left: 20px;
  margin-bottom: 10px;
}

.endpoint-card .endpoint-description code {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.endpoint-card pre {
  margin: 6px 0 12px;
  border-radius: 8px;
  overflow: hidden;
}

.endpoint-card pre code.api-code {
  display: block;
  background: #0d0f17;
  color: #a9d7a9;
  padding: 14px 16px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
  border-radius: 8px;
}

/* api-overview info cards */
.api-info code.api-url {
  display: inline-block;
  background: #0d0f17;
  color: #a5b4fc;
  padding: 6px 14px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  margin: 8px 0;
}

.api-info pre code.api-code {
  display: block;
  background: #0d0f17;
  color: #a9d7a9;
  padding: 14px 16px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
  border-radius: 8px;
  margin: 8px 0;
}

.api-info code {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* Responsive design */
@media (max-width: 768px) {
  .api-grid {
    grid-template-columns: 1fr;
  }
  
  .console-tabs {
    flex-wrap: wrap;
  }
  
  .console-tab {
    padding: 10px 15px;
  }
}

@media (max-width: 480px) {
  .endpoint-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}