/* ==========================================================================
   DEVELOPERS DOCUMENTATION STYLESHEET (2-COLUMN SOTA LAYOUT)
   Location: front/static/css/developers_docs.css
   Used by front/templates/developers/docs.html
   ========================================================================== */

@import url('developers/_subnav.css');

.docs-wrapper {
  background: #F8FAFC;
  min-height: calc(100vh - 120px);
}

.docs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem 1.5rem;
}

/* Breadcrumb Navigation */
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #64748B;
  margin-bottom: 1.5rem;
}

.docs-breadcrumb a {
  color: #64748B;
  text-decoration: none;
  transition: color 0.15s ease;
}

.docs-breadcrumb a:hover {
  color: #0052FF;
}

.docs-breadcrumb__current {
  color: #0F172A;
  font-weight: 600;
}

/* Main 2-Column Grid Layout */
.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

/* Left Sticky Sidebar */
.docs-sidebar {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding-right: 1rem;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
}

.docs-sidebar__group {
  margin-bottom: 2rem;
}

.docs-sidebar__group-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94A3B8;
  margin-bottom: 0.75rem;
}

.docs-sidebar__nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.docs-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: #475569;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s ease;
  min-height: 40px;
}

.docs-sidebar__link:hover {
  color: #0052FF;
  background: #EEF2FF;
}

.docs-sidebar__link.active {
  color: #0052FF;
  background: #EEF2FF;
  font-weight: 700;
  border-left: 3px solid #0052FF;
  border-radius: 0 8px 8px 0;
}

/* Main Content Area */
.docs-content {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 2.75rem 3rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.docs-header {
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 1.75rem;
  margin-bottom: 2.5rem;
}

.docs-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #EEF2FF;
  color: #4F46E5;
  border: 1px solid #C7D2FE;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.docs-header__title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.02em;
}

.docs-header__desc {
  color: #64748B;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

/* Section Styling */
.docs-section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 80px;
}

.docs-section__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.docs-section p {
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.docs-section ul, .docs-section ol {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.docs-section li {
  margin-bottom: 0.5rem;
}

/* Callouts / Alerts (GitHub Flavored Style) */
.docs-alert {
  border-left: 4px solid #0052FF;
  background: #F0F5FF;
  padding: 1.15rem 1.25rem;
  border-radius: 0 10px 10px 0;
  margin-bottom: 1.5rem;
}

.docs-alert__title {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.docs-alert p {
  font-size: 0.9rem;
  color: #334155;
  margin: 0;
  line-height: 1.55;
}

.docs-alert--info {
  border-left-color: #0052FF;
  background: #EFF6FF;
}
.docs-alert--info .docs-alert__title { color: #1D4ED8; }

.docs-alert--tip {
  border-left-color: #10B981;
  background: #ECFDF5;
}
.docs-alert--tip .docs-alert__title { color: #047857; }

.docs-alert--warning {
  border-left-color: #F59E0B;
  background: #FFFBEB;
}
.docs-alert--warning .docs-alert__title { color: #B45309; }

.docs-alert--hitl {
  border-left-color: #0284C7;
  background: #F0F9FF;
}
.docs-alert--hitl .docs-alert__title { color: #0369A1; }

/* Interactive Code Card with Tabs & Copy Button */
.docs-code-card {
  background: #0F172A;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.75rem;
  border: 1px solid #1E293B;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.docs-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #020617;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid #1E293B;
}

.docs-code-tabs {
  display: flex;
  gap: 0.25rem;
}

.docs-code-tab {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  min-height: 38px;
  transition: all 0.15s ease;
}

.docs-code-tab:hover {
  color: #F8FAFC;
}

.docs-code-tab.active {
  background: #1E293B;
  color: #38BDF8;
  font-weight: 700;
}

.docs-code-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #CBD5E1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.docs-code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.docs-code-panel {
  display: none;
  padding: 1.25rem;
  margin: 0;
  background: #0F172A;
  overflow-x: auto;
}

.docs-code-panel.active {
  display: block;
}

.docs-code-panel pre {
  margin: 0;
}

.docs-code-panel code {
  color: #38BDF8;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Tables in Docs */
.docs-table-wrapper {
  overflow-x: auto;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.docs-table th {
  background: #F8FAFC;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid #E2E8F0;
}

.docs-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #F1F5F9;
  color: #475569;
}

.docs-table tr:last-child td {
  border-bottom: none;
}

/* Pagination Footer */
.docs-pagination {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #E2E8F0;
  padding-top: 2rem;
  margin-top: 3.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.docs-pagination__card {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  text-decoration: none;
  min-width: 220px;
  transition: all 0.2s ease;
  min-height: 48px;
}

.docs-pagination__card:hover {
  border-color: #0052FF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.08);
}

.docs-pagination__label {
  font-size: 0.75rem;
  color: #94A3B8;
  font-weight: 600;
  text-transform: uppercase;
}

.docs-pagination__title {
  font-size: 1rem;
  color: #0F172A;
  font-weight: 700;
  margin-top: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .docs-content {
    padding: 1.75rem 1.5rem;
  }
}
