/* API v2 — layout Popular (marca Seguidor) */
.api-page {
  --api-p: #6D28D9;
  --api-p2: #7C3AED;
  --api-p3: #4C1D95;
  --api-bg: #F5F3FF;
  --api-text: #2A3F54;
  --api-muted: #73879C;
  --api-border: #E8EDF2;
  --api-code: #1E1B4B;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-style: italic;
}
.body .wrapper-content.api-page,
.api-page.wrapper-content,
.api-page .wrapper-content__body,
.api-page .wrapper-content__header {
  background: var(--api-bg) !important;
}
.api-page .wrapper-content__header { display: none !important; }
.api-page .wrapper-content__body {
  padding: 14px 18px 40px !important;
  margin-top: 0 !important;
}
.api-wrap { width: 100%; margin: 0; }

.api-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, #3B0764 0%, #5B21B6 40%, #7C3AED 78%, #A78BFA 100%);
  border-radius: 14px;
  padding: 24px 26px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 10px 28px rgba(76, 29, 149, .18);
}
.api-hero h1 {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}
.api-hero p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  opacity: .95;
  max-width: 560px;
  line-height: 1.4;
}
.api-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
}
.api-hero__btn:hover {
  background: rgba(255,255,255,.24);
  color: #fff !important;
}

.api-card {
  background: #fff;
  border: 1px solid var(--api-border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: 0 3px 12px rgba(0,0,0,.04);
}
.api-card h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: var(--api-text);
}
.api-card > p {
  margin: 0 0 14px;
  color: var(--api-muted);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

.api-key-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.api-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
}
.api-status--off { background: #FEE2E2; color: #991B1B; }
.api-status--on { background: #DCFCE7; color: #166534; }
.api-key-value {
  flex: 1 1 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: var(--api-p3);
  background: #F5F3FF;
  border: 1px solid #E9E0FF;
  border-radius: 10px;
  padding: 10px 12px;
  word-break: break-all;
}
.api-gen {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #5B21B6, #7C3AED);
  color: #fff !important;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(109, 40, 217, .25);
}
.api-gen:hover { filter: brightness(1.05); color: #fff !important; }
.api-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #EEF2FF;
  color: #3730A3;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.api-meta-table,
.api-param-table {
  width: 100%;
  border-collapse: collapse;
}
.api-meta-table th,
.api-meta-table td,
.api-param-table th,
.api-param-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--api-border);
  font-size: 13.5px;
  font-weight: 600;
  vertical-align: top;
}
.api-meta-table th,
.api-param-table th {
  width: 28%;
  color: var(--api-muted);
  font-size: 12.5px;
  font-weight: 700;
}
.api-meta-table td,
.api-param-table td {
  color: var(--api-text);
  font-style: normal;
}
.api-meta-table tr:last-child th,
.api-meta-table tr:last-child td,
.api-param-table tr:last-child th,
.api-param-table tr:last-child td { border-bottom: 0; }
.api-meta-table a { color: var(--api-p2); font-weight: 700; }
.api-param-table code,
.api-meta-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: #F5F3FF;
  color: var(--api-p3);
  padding: 2px 7px;
  border-radius: 6px;
}

.api-select-wrap { margin-bottom: 12px; }
.api-select-wrap label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--api-text);
}
.api-select-wrap select {
  width: 100%;
  max-width: 360px;
  height: 42px;
  border: 1px solid #D9E2EC;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 600;
  font-style: normal;
  color: var(--api-text);
  background: #fff;
}

.api-type { display: none; }
.api-type.is-active { display: block; }

.api-code {
  margin: 12px 0 0;
  background: var(--api-code);
  color: #E2E8F0;
  border-radius: 12px;
  padding: 14px 16px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-style: normal;
  line-height: 1.55;
}
.api-code-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--api-muted);
  font-size: 12px;
  font-weight: 700;
}
.api-copy {
  border: 1px solid var(--api-border);
  background: #fff;
  color: var(--api-p2);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.api-copy:hover { background: #F5F3FF; }

.api-alert { margin-bottom: 14px; border-radius: 10px; }

@media (max-width: 768px) {
  .api-hero { padding: 18px; }
  .api-hero h1 { font-size: 22px; }
  .api-meta-table th,
  .api-param-table th { width: 36%; }
}
