/* API Documentation Styles */

/* Hero Section */
.hero {
  padding: 60px 40px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-yellow), var(--yellow-light));
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 15px;
}

.hero p {
  font-size: 18px;
  color: var(--gray-dark);
  max-width: 800px;
  margin: 0 auto;
}

/* API Documentation Container */
.api-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px;
}

.api-section {
  margin-bottom: 60px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary-yellow);
}

.section-description {
  font-size: 16px;
  color: var(--gray);
  margin-bottom: 30px;
}

.endpoint-card {
  background: var(--white);
  border: 2px solid var(--gray-light);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.endpoint-card:hover {
  border-color: var(--primary-yellow);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.method-badge {
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  min-width: 80px;
  text-align: center;
}

.method-get { background: var(--info); color: var(--white); }
.method-post { background: var(--success); color: var(--white); }
.method-put { background: var(--warning); color: var(--black); }
.method-delete { background: var(--error); color: var(--white); }

.endpoint-path {
  font-family: 'Courier New', monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--black);
  flex: 1;
}

.endpoint-description {
  color: var(--gray-dark);
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.6;
}

.auth-badge {
  display: inline-block;
  background: var(--primary-yellow);
  color: var(--black);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 10px;
}

.code-block {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 15px 0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.8;
  position: relative;
  white-space: pre;
  word-wrap: break-word;
  tab-size: 2;
  -moz-tab-size: 2;
}

.code-block * {
  white-space: pre;
}

.code-block code {
  color: var(--code-text);
}

/* JSON Syntax Highlighting */
.code-block .json-key {
  color: var(--json-key);
}

.code-block .json-string {
  color: var(--json-string);
}

.code-block .json-number {
  color: var(--json-number);
}

.code-block .json-boolean {
  color: var(--json-boolean);
}

.code-block .json-null {
  color: var(--json-null);
}

.code-block .json-punctuation {
  color: var(--json-punctuation);
}

.code-block .json-comment {
  color: var(--json-comment);
  font-style: italic;
}

.code-label {
  font-weight: 600;
  color: var(--gray-dark);
  margin-top: 15px;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  background: var(--gray-light);
  border-radius: 8px;
  overflow: hidden;
}

.param-table th {
  background: var(--primary-yellow);
  color: var(--black);
  padding: 12px;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
}

.param-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  font-size: 14px;
}

.param-table tr:last-child td {
  border-bottom: none;
}

.param-name {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--black);
}

.param-type {
  color: var(--info);
  font-weight: 600;
}

.param-required {
  color: var(--error);
  font-weight: 600;
}

.param-optional {
  color: var(--gray);
}

.response-example {
  background: var(--gray-light);
  padding: 15px;
  border-radius: 8px;
  margin-top: 10px;
  border-left: 4px solid var(--success);
}

.error-example {
  border-left-color: var(--error);
}

/* Tab Layout */
.api-wrapper {
  display: flex;
  min-height: calc(100vh - 200px);
  max-width: 1600px;
  margin: 0 auto;
}

.tabs-sidebar {
  width: 280px;
  background: var(--gray-light);
  padding: 20px 0;
  position: sticky;
  top: 100px;
  height: calc(100vh - 100px);
  overflow-y: auto;
  border-right: 2px solid var(--primary-yellow);
}

.tabs-sidebar h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 20px 20px 20px;
  color: var(--black);
  padding-bottom: 15px;
  border-bottom: 2px solid var(--primary-yellow);
}

.tab-button {
  width: 100%;
  padding: 15px 20px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-dark);
  font-size: 15px;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  border-left: 3px solid transparent;
}

.tab-button:hover {
  background: rgba(255, 212, 77, 0.1);
  color: var(--black);
}

.tab-button.active {
  background: var(--primary-yellow);
  color: var(--black);
  font-weight: 700;
  border-left-color: var(--black);
}

.tab-button i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.content-area {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}

.tab-content {
  display: none;
  width: 100%;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.copy-btn {
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
  transition: all 0.3s;
}

.copy-btn:hover {
  background: var(--gray-dark);
  transform: translateY(-2px);
}

.base-url {
  background: var(--primary-yellow);
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
  }

  .api-wrapper {
    flex-direction: column;
  }

  .tabs-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 2px solid var(--primary-yellow);
    max-height: 300px;
    overflow-y: auto;
  }

  .content-area {
    padding: 20px;
  }

  .api-container {
    padding: 20px;
  }

  .endpoint-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .endpoint-path {
    font-size: 16px;
    word-break: break-all;
  }

  .code-block {
    font-size: 12px;
    padding: 15px;
  }

  .param-table {
    font-size: 12px;
  }

  .param-table th,
  .param-table td {
    padding: 8px;
  }
}

