/**
 * Minimal portal shell for static Redoc HTML only (topnav + design tokens).
 * Mirrors src/styles/globals.css nav/button rules (lines 5–47). Do NOT import full
 * globals — the global * reset and doc-page rules break Redoc layout.
 */
@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@400;600;700;800&display=swap');

:root {
  --gf: #00B588; --gf-dark: #007a5c; --gf-light: #E6F9F4;
  --abc: #231F20; --slate: #4D6992; --slate-dark: #214377;
  --page: #F4F6F8; --card: #fff; --border: #E2E5EA; --border-s: #C8CDD6;
  --t1: #1A1D23; --t2: #5A6275; --t3: #667085;
  --font-mulish: "Mulish", Arial, sans-serif;
  --font: var(--font-mulish);
}

html, body { min-height: 100%; }

body {
  font-family: var(--font) !important;
  background: var(--page);
  color: var(--t1);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── NAV (must match redoc-template.hbs: .topnav.portal-topnav) ── */
.topnav {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

.topnav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-mark i { color: #fff; font-size: 15px; }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li { list-style: none; margin: 0; padding: 0; }

.nav-links a {
  padding: 6px 12px;
  border-radius: 7px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--t2);
  text-decoration: none;
  transition: all .15s;
}

.nav-links a:hover { background: #EEF0F4; color: var(--t1); }

.nav-right { display: flex; align-items: center; gap: 8px; }

.portal-topnav.topnav {
  z-index: 200;
  gap: 1rem;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

.portal-topnav,
.portal-topnav * {
  box-sizing: border-box;
}

.portal-topnav__left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
  flex: 1 1 auto;
}

.portal-topnav .portal-topnav__right.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  margin-left: auto;
}

.portal-topnav .portal-topnav__auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.portal-topnav #gf-nav-search {
  position: relative;
  flex: 0 0 auto;
  width: 212px;
  min-width: 212px;
  max-width: 212px;
  height: 36px;
  z-index: 1;
}

.gf-redoc-search__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  padding: 0 10px 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.gf-redoc-search__trigger:hover,
.gf-redoc-search__trigger:focus-visible,
#gf-nav-search[data-expanded="true"] .gf-redoc-search__trigger {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gf);
  color: #fff;
  outline: none;
}

.gf-redoc-search__trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 181, 136, 0.18);
}

.gf-redoc-search__trigger > .ti {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.gf-redoc-search__trigger-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 255, 255, 0.48);
}

.gf-redoc-search__trigger:hover .gf-redoc-search__trigger-label,
.gf-redoc-search__trigger:focus-visible .gf-redoc-search__trigger-label,
#gf-nav-search[data-expanded="true"] .gf-redoc-search__trigger-label {
  color: rgba(255, 255, 255, 0.82);
}

.gf-redoc-search__hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.user-menu-trigger:hover { opacity: .86; }
.user-menu-item:hover { background: var(--page); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity .15s, background .15s, border-color .15s;
  text-decoration: none;
}

.btn:hover { opacity: .86; }
.btn-primary { background: var(--gf); color: #fff; border-color: var(--gf); }
.btn-outline { background: var(--card); color: var(--t1); border-color: var(--border); }

.portal-topnav { z-index: 200; }
.portal-topnav .nav-links a:hover { background: rgba(255,255,255,.1); color: #fff; }
.portal-topnav .btn-outline { background: rgba(255,255,255,.06); color: rgba(255,255,255,.92); border-color: rgba(255,255,255,.22); }
.portal-topnav .btn-outline:hover { opacity: 1; background: rgba(255,255,255,.1); }
.portal-topnav .btn-outline i { font-size: 14px; }
.portal-topnav .portal-topnav__auth .btn-outline,
.portal-topnav .portal-topnav__auth-btn,
.portal-topnav .btn-outline {
  height: 36px;
  padding-top: 0;
  padding-bottom: 0;
}

.portal-topnav__menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-family: var(--font);
  font-size: 20px;
  line-height: 1;
}

.portal-topnav__menu-toggle:hover,
.portal-topnav__menu-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.portal-topnav__menu-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 181, 136, 0.18);
}

/* Mobile nav drawer — mirrors SPA globals.css (open only ≤760px) */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
}

.mobile-nav-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(16, 24, 40, 0.55);
  cursor: pointer;
}

.mobile-nav-drawer__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(320px, 88vw);
  max-width: 100%;
  height: 100%;
  background: var(--abc);
  color: #fff;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.28);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
}

.mobile-nav-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-drawer__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mobile-nav-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.mobile-nav-drawer__close:hover,
.mobile-nav-drawer__close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.mobile-nav-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 0 1.5rem;
}

.mobile-nav-drawer__footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow: visible;
}

.mobile-nav-drawer__links {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-drawer__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-left: 2px solid transparent;
}

.mobile-nav-drawer__link:hover,
.mobile-nav-drawer__link.is-active {
  color: var(--gf);
  background: rgba(0, 181, 136, 0.1);
  border-left-color: var(--gf);
}

.mobile-nav-drawer__docs {
  padding: 0.75rem 1.25rem;
}

.mobile-nav-drawer__docs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
}

.mobile-nav-drawer__docs-btn:hover,
.mobile-nav-drawer__docs-btn:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.mobile-nav-drawer__auth {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 1rem 1.25rem;
  overflow: visible;
}

.mobile-nav-drawer__auth .btn-outline {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.22);
}

.mobile-nav-drawer__auth .user-menu-trigger {
  width: 100%;
  justify-content: flex-start;
}

.mobile-nav-drawer__auth .user-menu-dropdown {
  top: auto !important;
  bottom: calc(100% + 8px) !important;
}

.gf-redoc-api-nav-toggle {
  display: none;
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 300;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--t1);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.18);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
}

.gf-redoc-api-nav-toggle:hover,
.gf-redoc-api-nav-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 181, 136, 0.18), 0 8px 24px rgba(16, 24, 40, 0.18);
}

.gf-redoc-api-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 340;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(16, 24, 40, 0.45);
  cursor: pointer;
}

@media (max-width: 900px) {
  .portal-topnav {
    padding: 0 1rem;
    gap: 0.75rem;
  }

  .portal-topnav__left {
    gap: 0.75rem;
  }

  .portal-topnav .portal-topnav__right.nav-right {
    gap: 10px;
  }

  .portal-topnav #gf-nav-search {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
  }

  .gf-redoc-search__trigger {
    justify-content: center;
    padding: 0;
  }

  .gf-redoc-search__trigger-label,
  .gf-redoc-search__hint {
    display: none;
  }

  .portal-topnav .nav-links a {
    padding: 6px 8px;
  }

  .portal-topnav .btn-outline {
    padding-left: 10px;
    padding-right: 10px;
  }

  .portal-topnav .glofox-brand-logo__label {
    display: none;
  }
}

@media (max-width: 760px) {
  .portal-topnav {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }

  .portal-topnav__left {
    gap: 0.5rem;
  }

  .portal-topnav__menu-toggle {
    display: inline-flex;
  }

  .portal-topnav__desktop-links,
  .portal-topnav__desktop-auth,
  .portal-topnav__sep,
  .portal-topnav .glofox-brand-logo {
    display: none !important;
  }

  .portal-topnav .abc-brand-logo--on-dark .abc-brand-logo__img {
    height: 22px;
    max-width: 120px;
  }

  .portal-topnav .portal-topnav__right.nav-right {
    gap: 8px;
  }

  .gf-redoc-api-nav-toggle {
    display: inline-flex;
  }

  .mobile-nav-drawer[data-open="true"] {
    display: flex;
  }

  .gf-redoc-api-nav-backdrop[data-open="true"] {
    display: block;
  }
}

/* Brand row — scoped to topnav only (matches SPA GlofoxNav) */
.portal-topnav .portal-topnav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
}

.portal-topnav .portal-topnav__sep {
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.portal-topnav .abc-brand-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.portal-topnav .abc-brand-logo__img {
  display: block;
  object-fit: contain;
}

.portal-topnav .abc-brand-logo--on-dark .abc-brand-logo__img {
  height: 26px;
  width: auto;
  max-width: none;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.portal-topnav .glofox-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}

.portal-topnav .glofox-brand-logo__img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.portal-topnav .glofox-brand-logo__label {
  color: var(--gf);
  font-family: var(--font);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
}
