/* RPM PRO API Documentation — supplemental styles */

/* --- Inner pages: header + hero (fixes white-on-white nav) --- */
.api-page-inner .header.header-over {
  position: absolute;
  width: 100%;
  z-index: 100;
  background: transparent;
}
.api-page-inner .header .menu.sf-menu > li > a {
  color: #fff !important;
}
.api-page-inner .header .menu.sf-menu > li > a:hover,
.api-page-inner .header .menu.sf-menu > li > a.active {
  color: #48cacc !important;
}
.api-page-inner .header .sf-arrows .sf-with-ul:after {
  border-color: #fff transparent transparent !important;
}

.api-page-hero {
  position: relative;
  background: #161c2d url('../img/api-hero-bg.png') center center / cover no-repeat;
  color: #fff;
  padding: 110px 0 48px;
  margin-bottom: 0;
}
.api-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(22, 28, 45, 0.88);
}
.api-page-hero .container { position: relative; z-index: 1; }
.api-page-hero-title {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 10px;
  color: #fff;
}
.api-page-hero-desc {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  margin: 0;
  max-width: 720px;
}
.api-page-hero-desc code {
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Home page keeps dark logo on hero; inner uses light logo via header */
.api-page-home .api-logo { }

/* Sidebar scroll-spy active state */
.menu-vertical.js-menu-vertical a.active {
  color: #2288cc !important;
  font-weight: 600;
  border-left: 3px solid #2288cc;
  padding-left: 9px;
  margin-left: -12px;
}

.category-info[id],
.api-endpoint-card[id] {
  scroll-margin-top: 110px;
}

/* --- Hero (RPM-Website inspired) --- */
.api-hero {
  position: relative;
  background: #161c2d url('../img/api-hero-bg.png') center center / cover no-repeat;
  color: #fff;
  padding: 80px 0 60px;
  margin-bottom: 0;
}
.api-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(22, 28, 45, 0.82);
}
.api-hero .container { position: relative; z-index: 1; }
.api-hero h1 {
  font-size: 42px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #fff;
}
.api-hero .lead {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  max-width: 820px;
  margin: 0 auto 28px;
}
.api-hero-buttons .button { margin: 0 8px 8px; }

/* Feature cards row */
.api-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin: 40px 0;
}
.api-feature-card {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}
.api-feature-card:hover { transform: translateY(-3px); }
.api-feature-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #1a2744;
}
.api-feature-card .card-head {
  background: #2288cc;
  color: #fff;
  text-align: center;
  padding: 12px;
  font-weight: 600;
  font-size: 15px;
}
.api-feature-card .card-body {
  padding: 18px;
  text-align: center;
}
.api-feature-card .card-body p {
  font-size: 13px;
  color: #666;
  margin: 0 0 14px;
  min-height: 60px;
}
.api-feature-card .button {
  font-size: 12px;
  padding: 8px 16px;
}

/* Stats bar */
.api-stats-bar {
  background: #f0f4f8;
  padding: 40px 0;
  text-align: center;
}
.api-stats-bar .stat-num {
  font-size: 36px;
  font-weight: 700;
  color: #2288cc;
  display: block;
}
.api-stats-bar .stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  font-weight: 600;
}

/* Content sections */
.api-section-alt { background: #f7f9fc; padding: 50px 0; }
.api-section-white { background: #fff; padding: 50px 0; }
.api-two-col { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.api-two-col .col-text { flex: 1; min-width: 280px; }
.api-two-col .col-img { flex: 1; min-width: 280px; }
.api-two-col img { max-width: 100%; border-radius: 4px; }
.api-blockquote {
  border-left: 4px solid #2288cc;
  padding: 16px 20px;
  margin: 24px 0;
  background: #f7f9fc;
  font-style: italic;
}
.api-blockquote footer {
  font-style: normal;
  font-weight: 600;
  margin-top: 10px;
  color: #666;
}

/* CTA band */
.api-cta-band {
  background: #161c2d url('../img/api-cta-bg.png') center center / cover;
  color: #fff;
  padding: 50px 0;
  text-align: center;
  position: relative;
}
.api-cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(34, 136, 204, 0.88);
}
.api-cta-band .container { position: relative; z-index: 1; }
.api-cta-band h3 { color: #fff; margin-bottom: 12px; }

/* --- Endpoint reference --- */
.api-method {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-right: 8px;
  vertical-align: middle;
}
.api-method-get { background: #e8f4fc; color: #2288cc; }
.api-method-post { background: #e8f8ea; color: #44bb55; }
.api-method-put { background: #fff4e6; color: #ff530d; }
.api-method-delete { background: #fdecea; color: #ff3625; }

.api-endpoint-path {
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 14px;
  word-break: break-all;
}

.api-endpoint-card {
  border: 1px solid #e4e9f0;
  border-radius: 4px;
  padding: 20px 22px;
  margin-bottom: 32px;
  background: #fff;
}
.api-endpoint-card h5 { margin: 0 0 8px; }
.api-endpoint-card .endpoint-desc { margin-bottom: 16px; color: #555; }

.api-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}
.api-badge-public { background: #e8f8ea; color: #2d8a3e; }
.api-badge-session { background: #f3ecff; color: #6b3fc4; }
.api-badge-admin { background: #fff4e6; color: #c45d00; }
.api-badge-webhook { background: #fdecea; color: #c0392b; }

.api-table {
  width: 100%;
  margin: 12px 0 18px;
  border-collapse: collapse;
  font-size: 13px;
}
.api-table th, .api-table td {
  border: 1px solid #e4e9f0;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.api-table th { background: #f7f9fc; font-weight: 600; }
.api-table code {
  font-size: 12px;
  background: #f0f4f8;
  padding: 1px 5px;
  border-radius: 2px;
}

.api-field-section { margin: 18px 0 8px; }
.api-field-section h6 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2288cc;
  margin: 0 0 8px;
}

.api-code-pair { margin: 16px 0; }
.api-code-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 6px;
}

.api-search { margin-bottom: 20px; }
.api-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd3dd;
  border-radius: 4px;
  font-size: 14px;
}

.api-note {
  background: #f7f9fc;
  border-left: 4px solid #2288cc;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 13px;
}
.api-warning {
  background: #fff8f0;
  border-left: 4px solid #ff530d;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 13px;
}

.menu-vertical a.active { color: #2288cc; font-weight: 600; }

/* --- AI agent documentation --- */
.api-nav-agents { font-weight: 600 !important; }
.api-agent-banner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: linear-gradient(135deg, #1a2744 0%, #2288cc 100%);
  color: #fff;
  border-radius: 6px;
  padding: 24px 28px;
  margin: 30px 0;
}
.api-agent-banner-compact {
  padding: 14px 20px;
  margin: 24px 0 0;
  background: #1a2744;
  font-size: 14px;
}
.api-agent-banner-compact a { color: #48cacc; text-decoration: underline; }
.api-agent-banner-icon { font-size: 36px; line-height: 1; flex-shrink: 0; }
.api-agent-banner h3 { margin: 0 0 10px; color: #fff; font-size: 20px; }
.api-agent-banner p { margin: 0 0 16px; color: rgba(255,255,255,0.9); font-size: 14px; line-height: 1.6; }
.api-agent-banner-links .button { margin-right: 8px; margin-bottom: 8px; }
.api-agent-raw { border: 1px solid #e4e9f0; border-radius: 4px; margin: 20px 0 40px; overflow: hidden; }
.api-agent-raw-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0f4f8;
  padding: 10px 16px;
  font-size: 12px;
  color: #666;
  border-bottom: 1px solid #e4e9f0;
}
.api-agent-raw-toolbar a { color: #2288cc; font-weight: 600; }
.api-agent-markdown {
  margin: 0;
  padding: 20px;
  max-height: 600px;
  overflow: auto;
  background: #fafbfc;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 767px) {
  .api-hero h1 { font-size: 28px; }
  .api-endpoint-path { font-size: 12px; }
}
