/* PermaShip.ai — Documentation Styles
   Colors: body-bg #FFFFFF | light-section #f8f9fb | wake-teal #12B3B3
           body-text #6a6d77 | heading-text #222326 | border #e3e6ec      */

/* ===== Sidebar ===== */
.docs-sidebar {
  scrollbar-width: thin;
  scrollbar-color: #e3e6ec transparent;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: #e3e6ec; border-radius: 2px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }

.docs-nav-link {
  display: block;
  padding: 6px 16px;
  font-size: 0.875rem;
  color: #6a6d77;
  border-left: 2px solid transparent;
  transition: color 200ms, border-color 200ms;
}
.docs-nav-link:hover { color: #222326; }
.docs-nav-link.active { color: #12B3B3; border-left-color: #12B3B3; }

.docs-nav-group {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6a6d77;
  padding: 0 16px;
  margin-top: 24px;
  margin-bottom: 8px;
}

/* ===== Content Typography ===== */
.docs-content h2 { scroll-margin-top: 96px; }
.docs-content h3 { scroll-margin-top: 96px; }
.docs-content p  { color: #6a6d77; line-height: 1.75; }
.docs-content strong { color: #222326; }

.docs-content ul { list-style: none; padding: 0; }
.docs-content li {
  position: relative;
  padding-left: 20px;
  color: #6a6d77;
  line-height: 1.75;
}
.docs-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #12B3B3;
}

/* Inline code */
.docs-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  background: #f8f9fb;
  border: 1px solid #e3e6ec;
  border-radius: 4px;
  padding: 2px 6px;
  color: #12B3B3;
}

/* Code blocks */
.docs-content pre {
  background: #f8f9fb;
  border: 1px solid #e3e6ec;
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 16px 0;
}
.docs-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: #222326;
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* ===== Tables ===== */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.docs-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6a6d77;
  padding: 10px 16px;
  border-bottom: 1px solid #e3e6ec;
}
.docs-table td {
  font-size: 0.875rem;
  color: #6a6d77;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(227, 230, 236, 0.5);
}
.docs-table td strong { color: #222326; }

/* ===== Callouts ===== */
.docs-callout {
  background: rgba(18, 179, 179, 0.06);
  border-left: 3px solid #12B3B3;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.docs-callout p {
  color: #222326;
  font-size: 0.875rem;
}
.docs-callout code {
  background: rgba(18, 179, 179, 0.08);
  border-color: rgba(18, 179, 179, 0.2);
}

/* ===== Step Numbers ===== */
.docs-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(18, 179, 179, 0.15);
  color: #12B3B3;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== Section Nav (horizontal pill bar) ===== */
.docs-section-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 16px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.docs-section-nav::-webkit-scrollbar { display: none; }

@media (min-width: 1024px) {
  .docs-section-nav {
    justify-content: center;
    gap: 8px;
    overflow-x: visible;
    padding: 10px 0;
  }
}

.docs-section-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 5px 14px;
  font-size: 0.8125rem;
  color: #6a6d77;
  border-radius: 9999px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: color 200ms, background-color 200ms, border-color 200ms;
  flex-shrink: 0;
}
.docs-section-pill:hover {
  color: #222326;
  background-color: rgba(34, 35, 38, 0.05);
}
.docs-section-pill.active {
  color: #222326;
  background-color: rgba(18, 179, 179, 0.1);
  border-color: #12B3B3;
}

/* ===== Right-side Table of Contents ===== */
.docs-toc {
  position: sticky;
  top: 140px;             /* below fixed nav + section nav */
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-left: 16px;
  border-left: 1px solid #e3e6ec;
  scrollbar-width: thin;
  scrollbar-color: #e3e6ec transparent;
}
.docs-toc::-webkit-scrollbar { width: 3px; }
.docs-toc::-webkit-scrollbar-thumb { background: #e3e6ec; border-radius: 2px; }
.docs-toc::-webkit-scrollbar-track { background: transparent; }

.docs-toc-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6a6d77;
  margin-bottom: 12px;
}

.docs-toc-link {
  display: block;
  padding: 3px 0;
  font-size: 0.8125rem;
  color: #6a6d77;
  text-decoration: none;
  transition: color 200ms;
  line-height: 1.4;
}
.docs-toc-link:hover { color: #222326; }
.docs-toc-link.active { color: #12B3B3; }

/* Indent h3 entries */
.docs-toc-link[data-level="3"] {
  margin-left: 0.75rem;
  font-size: 0.75rem;
}

/* ===== Breadcrumb ===== */
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: #6a6d77;
  margin-bottom: 8px;
}
.docs-breadcrumb a {
  color: #6a6d77;
  text-decoration: none;
  transition: color 200ms;
}
.docs-breadcrumb a:hover { color: #222326; }
.docs-breadcrumb .breadcrumb-separator {
  color: rgba(227, 230, 236, 0.6);
  user-select: none;
}
.docs-breadcrumb .breadcrumb-current {
  color: #222326;
}

/* ===== Prev / Next Navigation ===== */
.docs-prev-next {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #e3e6ec;
}

.docs-prev-next a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px;
  border: 1px solid #e3e6ec;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 200ms, background-color 200ms;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 48%;
}
.docs-prev-next a:hover {
  border-color: #12B3B3;
  background-color: rgba(18, 179, 179, 0.04);
}

.docs-prev-next .pn-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6a6d77;
}
.docs-prev-next .pn-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #222326;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-prev-next .pn-next { margin-left: auto; text-align: right; }

/* ===== Mobile TOC (collapsible) ===== */
.docs-mobile-toc {
  display: none;             /* hidden on desktop by default */
  margin-bottom: 20px;
}
.docs-mobile-toc-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  background: #f8f9fb;
  border: 1px solid #e3e6ec;
  border-radius: 8px;
  color: #6a6d77;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 200ms;
}
.docs-mobile-toc-btn:hover { border-color: #12B3B3; }

.docs-mobile-toc-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 200ms;
}
.docs-mobile-toc-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.docs-mobile-toc-list {
  display: none;
  padding: 8px 14px 4px;
  background: #f8f9fb;
  border: 1px solid #e3e6ec;
  border-top: none;
  border-radius: 0 0 8px 8px;
}
.docs-mobile-toc-list.open { display: block; }

.docs-mobile-toc-list .docs-toc-link {
  padding: 5px 0;
}

@media (max-width: 1023px) {
  .docs-mobile-toc { display: block; }
}

/* ===== Docs Layout (main + right TOC grid) ===== */
.docs-layout {
  display: block;
}

@media (min-width: 1024px) {
  .docs-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 32px;
    align-items: start;
  }
}

/* Hide right-side TOC on mobile */
@media (max-width: 1023px) {
  .docs-toc { display: none; }
}

/* ===== Light-theme body + content overrides ===== */
body[data-page] {
  background-color: #FFFFFF;
  color: #6a6d77;
  font-family: 'Jost', sans-serif;
}

/* Headings in content */
body[data-page] h1,
body[data-page] h2,
body[data-page] h3,
body[data-page] h4 {
  color: #222326;
}

/* Override Tailwind color classes for light theme */
body[data-page] .text-dock-white { color: #222326; }
body[data-page] .text-fog-gray { color: #6a6d77; }
body[data-page] .bg-steel-gray { background-color: #f8f9fb; }
body[data-page] .bg-harbor-navy { background-color: #FFFFFF; }
body[data-page] .border-fog-gray\/10 { border-color: #e3e6ec; }
body[data-page] .border-fog-gray\/20 { border-color: #e3e6ec; }
body[data-page] .border-steel-gray\/50 { border-color: #e3e6ec; }

/* Sticky docs section nav - light */
body[data-page] .sticky.top-16 {
  background-color: rgba(255, 255, 255, 0.97) !important;
  border-bottom-color: #e3e6ec !important;
}

/* ===== Site Navigation ===== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Jost', sans-serif;
}

.site-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-nav__logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.site-nav__logo span {
  font-weight: 700;
  font-size: 1.125rem;
  color: #F7FAFC;
}
.site-nav__logo-tld {
  font-weight: 400 !important;
  font-size: 0.875rem !important;
  color: #94A3B8 !important;
}

.site-nav__links {
  display: none;
  align-items: center;
  gap: 28px;
}
@media (min-width: 768px) {
  .site-nav__links { display: flex; }
}

.nav-link {
  font-size: 0.875rem;
  color: #94A3B8;
  text-decoration: none;
  transition: color 200ms;
  white-space: nowrap;
}
.nav-link:hover { color: #F7FAFC; }
.nav-link--active { color: #12B3B3; font-weight: 600; }

/* Dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown__trigger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.nav-dropdown__chevron {
  transition: transform 200ms;
}
.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #0B1220;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 60;
}
.nav-dropdown:hover .nav-dropdown__menu { display: block; }
.nav-dropdown:hover .nav-dropdown__chevron { transform: rotate(180deg); }
.nav-dropdown__item {
  display: block;
  padding: 8px 20px;
  font-size: 0.875rem;
  color: #94A3B8;
  text-decoration: none;
  transition: color 200ms, background 200ms;
}
.nav-dropdown__item:hover {
  color: #F7FAFC;
  background: rgba(255,255,255,0.05);
}

/* Auth buttons */
.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 999px;
  text-decoration: none;
  transition: background 200ms, border-color 200ms, color 200ms;
  white-space: nowrap;
}
.nav-btn--outline {
  color: #F7FAFC;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
}
.nav-btn--outline:hover {
  border-color: rgba(255,255,255,0.4);
}
.nav-btn--fill {
  color: #0B1220;
  background: linear-gradient(135deg, #12B3B3, #76E7C7);
  border: 1px solid transparent;
}
.nav-btn--fill:hover {
  filter: brightness(1.1);
}

/* Hide auth buttons on small screens, show hamburger */
.nav-btn--outline, .nav-btn--fill {
  display: none;
}
@media (min-width: 768px) {
  .nav-btn--outline, .nav-btn--fill { display: inline-flex; }
  .site-nav__hamburger { display: none !important; }
}

.site-nav__hamburger {
  background: none;
  border: none;
  color: #F7FAFC;
  padding: 8px;
  cursor: pointer;
}

/* Mobile menu */
.site-nav__mobile {
  background: #0B1220;
  border-top: 1px solid rgba(255,255,255,0.08);
  transition: opacity 200ms, transform 200ms;
}
.site-nav__mobile.hidden {
  display: none;
}
.site-nav__mobile-inner {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== Site Footer ===== */
.site-footer {
  background: #202A37;
  color: #94A3B8;
  font-family: 'Jost', sans-serif;
}

.site-footer__main {
  padding: 60px 0 48px;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 48px;
}
@media (max-width: 767px) {
  .site-footer__inner {
    flex-direction: column;
    gap: 32px;
  }
}

.site-footer__about {
  max-width: 320px;
  flex-shrink: 0;
}
.site-footer__heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: #F7FAFC;
  margin: 0 0 12px;
}
.site-footer__text {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #94A3B8;
  margin: 0 0 20px;
}
.site-footer__social {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-footer__social-link {
  color: #12B3B3;
  transition: color 200ms;
}
.site-footer__social-link:hover {
  color: #76E7C7;
}

.site-footer__nav {
  display: flex;
  gap: 48px;
  flex: 1;
}
@media (max-width: 767px) {
  .site-footer__nav { gap: 32px; flex-wrap: wrap; }
}
.site-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer__col li {
  margin-bottom: 10px;
}
.site-footer__col li::before { display: none; }
.site-footer__col a {
  font-size: 0.875rem;
  color: #94A3B8;
  text-decoration: none;
  transition: color 200ms;
}
.site-footer__col a:hover {
  color: #F7FAFC;
}

/* Footer bottom bar */
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
}
.site-footer__bottom .site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer__copyright {
  font-size: 0.8125rem;
  color: #94A3B8;
  margin: 0;
}
.site-footer__legal {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-footer__legal a {
  font-size: 0.8125rem;
  color: #F7FAFC;
  text-decoration: none;
  transition: color 200ms;
}
.site-footer__legal a:hover {
  color: #12B3B3;
}
