:root {
  --primary-color: #0C59C7;
  --header-height: 70px;
  --header-bg: #0C59C7;
  --body-bg: #ffffff;

  /* Scalar Color Overrides */
  --scalar-color-primary: #0C59C7;
  --scalar-color-accent: #0C59C7;
  --scalar-button-1: #0C59C7;
  --scalar-button-1-hover: #0a4da8;
  --scalar-link-color: #0C59C7;
  --scalar-link-hover: #0a4da8;
  --scalar-sidebar-item-active-color: #0C59C7;
}

[data-theme="dark"],
.dark-mode {
  --header-bg: #0b1426;
  --body-bg: #0f172a;
  --scalar-color-1: #f8fafc !important;
  --scalar-color-2: #94a3b8 !important;
}

[data-theme="light"],
.light-mode {
  --header-bg: #0C59C7;
  --body-bg: #ffffff;
  --scalar-color-1: #0f172a !important;
  --scalar-color-2: #475569 !important;
}

/* High-specificity overrides to enforce correct theme colors on the Scalar sidebar */
.dark-mode #scalar-app {
  --scalar-sidebar-background-1: #0b1426 !important;
  --scalar-sidebar-color-1: #f8fafc !important;
  --scalar-sidebar-color-2: #94a3b8 !important;
  --scalar-sidebar-color-active: #38bdf8 !important;
  --scalar-sidebar-item-hover-color: #ffffff !important;
  --scalar-sidebar-item-hover-background: #1e293b !important;
  --scalar-sidebar-item-active-background: rgba(12, 89, 199, 0.2) !important;
  --scalar-sidebar-item-active-color: #38bdf8 !important;
}

.light-mode #scalar-app {
  --scalar-sidebar-background-1: #ffffff !important;
  --scalar-sidebar-color-1: #0f172a !important;
  --scalar-sidebar-color-2: #475569 !important;
  --scalar-sidebar-color-active: #0C59C7 !important;
  --scalar-sidebar-item-hover-color: #0C59C7 !important;
  --scalar-sidebar-item-hover-background: #f1f5f9 !important;
  --scalar-sidebar-item-active-background: rgba(12, 89, 199, 0.1) !important;
  --scalar-sidebar-item-active-color: #0C59C7 !important;
}

/* Explicit high-specificity overrides for hover state text and icon colors in the sidebar */
.dark-mode #scalar-app .group\/button:hover .group\/button-label,
.dark-mode #scalar-app .group\/button:hover svg {
  color: #ffffff !important;
  fill: currentColor !important;
  z-index: 1;
}

.light-mode #scalar-app .group\/button:hover .group\/button-label,
.light-mode #scalar-app .group\/button:hover svg {
  color: #0C59C7 !important;
  fill: currentColor !important;
  z-index: 1;
}

.flex.items-stretch.rounded.p-2 {
  z-index: 2;
}

html {
  overflow: hidden;
  height: 100%;
  width: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  height: 100%;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--body-bg);
}

.custom-header {
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  /* Reduced from 1000 to allow modals to stack above it */
  flex-shrink: 0;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 24px;
  width: auto;
  max-width: 250px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-right: 24px;
}

/* Hamburger Menu Button */
.header-hamburger {
  display: none;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  margin-right: 16px;
  align-items: center;
  justify-content: center;
  z-index: 101;
  /* Relative to header */
  transition: opacity 0.2s ease;
}

.header-hamburger:hover {
  opacity: 0.8;
}

.header-hamburger svg {
  width: 24px;
  height: 24px;
}

.custom-header[data-theme="light"] .header-hamburger {
  color: white;
}

.custom-header[data-theme="dark"] .header-hamburger {
  color: #cbd5e1;
}

.header-hamburger .close-icon {
  display: none !important;
}

.header-hamburger.open .hamburger-icon {
  display: none !important;
}

.header-hamburger.open .close-icon {
  display: block !important;
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.header-right a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.header-right a:hover {
  color: white;
}

.btn-key {
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700 !important;
  transition: all 0.2s ease-in-out;
}

/* Dark theme button styles */
.custom-header[data-theme="dark"] .btn-key {
  background: #0C59C7;
  color: white !important;
  box-shadow: 0 4px 12px rgba(12, 89, 199, 0.3);
}

.custom-header[data-theme="dark"] .btn-key:hover {
  background: #1d72eb;
  box-shadow: 0 4px 16px rgba(12, 89, 199, 0.5);
  transform: translateY(-1px);
}

.custom-header[data-theme="dark"] .btn-postman {
  background: rgba(255, 108, 55, 0.08);
  border: 1px solid rgba(255, 108, 55, 0.6);
  padding: 7px 17px;
  border-radius: 8px;
  color: #FF6C37 !important;
  font-weight: 700 !important;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.custom-header[data-theme="dark"] .btn-postman:hover {
  background: #FF6C37;
  color: white !important;
  box-shadow: 0 4px 16px rgba(255, 108, 55, 0.4);
  transform: translateY(-1px);
}

.custom-header[data-theme="dark"] .btn-postman:active,
.custom-header[data-theme="dark"] .btn-key:active {
  transform: translateY(1px);
}

/* Light theme button styles (Blue Header background) */
.custom-header[data-theme="light"] .btn-key {
  background: white;
  color: #0C59C7 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-header[data-theme="light"] .btn-key:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.custom-header[data-theme="light"] .btn-postman {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 7px 17px;
  border-radius: 8px;
  color: white !important;
  font-weight: 700 !important;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.custom-header[data-theme="light"] .btn-postman:hover {
  background: #FF6C37;
  color: white !important;
  border-color: #FF6C37;
  box-shadow: 0 4px 16px rgba(255, 108, 55, 0.3);
  transform: translateY(-1px);
}

.custom-header[data-theme="light"] .btn-postman:active,
.custom-header[data-theme="light"] .btn-key:active {
  transform: translateY(1px);
}

/* Contrast fix for Support Link on Light (Blue) Header */
.custom-header[data-theme="light"] .header-right a:not(.btn-key):not(.btn-postman) {
  color: rgba(255, 255, 255, 0.9);
}

.custom-header[data-theme="light"] .header-right a:not(.btn-key):not(.btn-postman):hover {
  color: white;
}




.custom-header img {
  height: 55px;
  width: auto;
}

#scalar-app,
elements-api,
#stoplight-app {
  flex: 1;
  overflow: auto;
  --scalar-header-height: 0px;
}

/* Premium Radio Group Styling */
.theme-radio-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  margin-right: 15px;
}

.theme-radio-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-radio-btn svg {
  width: 14px;
  height: 14px;
}

.theme-radio-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.theme-radio-btn.active {
  background: #0C59C7;
  color: white;
  box-shadow: 0 2px 8px rgba(12, 89, 199, 0.4);
}

/* Contrast fix for Light Mode (Blue Header) */
.custom-header[data-theme="light"] .theme-radio-btn.active {
  background: white;
  color: #0C59C7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-header[data-theme="light"] .theme-radio-btn:not(.active) {
  color: rgba(255, 255, 255, 0.7);
}

.custom-header[data-theme="light"] .theme-radio-btn:not(.active):hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* Custom API Endpoint Badge Styling */
.custom-endpoint-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  margin-top: 8px;
  margin-bottom: 18px;
  width: 100%;
  box-sizing: border-box;
  color: #334155;
}

/* Light/Dark mode adjustments */
[data-theme="dark"] .custom-endpoint-badge,
.dark-mode .custom-endpoint-badge,
.sl-theme-dark .custom-endpoint-badge {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.badge-method {
  color: white !important;
  font-weight: 700 !important;
  padding: 5px 10px !important;
  border-radius: 5px !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  display: inline-block !important;
  line-height: 1.2 !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.badge-get {
  background-color: #10b981 !important;
}

.badge-post {
  background-color: #0c59c7 !important;
}

.badge-put {
  background-color: #f59e0b !important;
}

.badge-delete {
  background-color: #ef4444 !important;
}

.badge-patch {
  background-color: #8b5cf6 !important;
}

.badge-url {
  word-break: break-all;
  font-weight: 600;
}

[data-theme="dark"] .badge-url,
.dark-mode .badge-url,
.sl-theme-dark .badge-url {
  color: #e2e8f0;
}

/* Hide the internal Scalar header/tools */
.references-header,
.references-header-actions,
[class*="references-header"],
.ml-auto.flex.items-center.gap-1 {
  display: none !important;
}

/* ==========================================================================
   Scalar Schema Tree Layout (Stoplight Design)
   ========================================================================== */

/* Reset schema card border, background, and padding for nested object schemas */
#scalar-app .schema-properties .children .schema-card,
#scalar-app .schema-properties .children .schema-properties {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* Ensure no border or background for nested disclosure panels */
#scalar-app .schema-properties .children .schema-properties-open>.schema-properties {
  border: none !important;
  background: transparent !important;
}

/* Align and indent nested list containers (ul) */
#scalar-app .schema-properties .children ul {
  list-style: none !important;
  padding: 0 0 0 24px !important;
  /* Left indentation for next level */
  margin: 0 !important;
}

/* Reset property item styling inside nested lists */
#scalar-app .schema-properties .children li.property {
  position: relative !important;
  background: transparent !important;
  border: none !important;
  padding: 6px 0 6px 16px !important;
  /* Space for labels and tree lines */
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Vertical connector line for tree */
#scalar-app .schema-properties .children li.property::before {
  content: "" !important;
  position: absolute !important;
  left: -8px !important;
  /* Shift left to meet the parent's boundary */
  top: 0 !important;
  width: 1px !important;
  height: 100% !important;
  background-color: var(--scalar-border-color, #e2e8f0) !important;
}

/* Stop the vertical connector line at the last child branch */
#scalar-app .schema-properties .children li.property:last-child::before {
  height: 18px !important;
  /* Cut off vertical line at the horizontal branch level */
}

/* Horizontal branch line */
#scalar-app .schema-properties .children li.property::after {
  content: "" !important;
  position: absolute !important;
  left: -8px !important;
  top: 18px !important;
  /* Align with the vertical center of property name/heading */
  width: 18px !important;
  /* Length to connect the vertical line to the property name */
  height: 1px !important;
  background-color: var(--scalar-border-color, #e2e8f0) !important;
}

/* Make toggle title (Show/Hide additional properties, etc.) look like a premium highlighted pill button */
#scalar-app .schema-properties .schema-card-title {
  background: rgba(12, 89, 199, 0.06) !important;
  border: 1px dashed rgba(12, 89, 199, 0.3) !important;
  padding: 5px 12px !important;
  height: auto !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: var(--scalar-color-primary, #0c59c7) !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  border-radius: 6px !important;
  width: fit-content !important;
  margin-top: 6px !important;
  margin-bottom: 6px !important;
  transition: all 0.2s ease-in-out !important;
}

#scalar-app .schema-properties .schema-card-title:hover {
  background: var(--scalar-color-primary, #0c59c7) !important;
  border-color: var(--scalar-color-primary, #0c59c7) !important;
  color: white !important;
}

#scalar-app .schema-properties .schema-card-title:hover .schema-card-title-icon {
  color: white !important;
}

/* Dark mode adjustment for the toggle button */
[data-theme="dark"] #scalar-app .schema-properties .schema-card-title {
  background: rgba(56, 139, 253, 0.1) !important;
  border-color: rgba(56, 139, 253, 0.3) !important;
  color: #58a6ff !important;
}

[data-theme="dark"] #scalar-app .schema-properties .schema-card-title:hover {
  background: #0c59c7 !important;
  border-color: #0c59c7 !important;
  color: white !important;
}

/* Keep the expand/collapse icon neat */
#scalar-app .schema-properties .schema-card-title-icon {
  margin: 0 !important;
  color: var(--scalar-color-primary, #0c59c7) !important;
  transition: color 0.2s ease-in-out !important;
}

[data-theme="dark"] #scalar-app .schema-properties .schema-card-title-icon {
  color: #58a6ff !important;
}

/* ==========================================================================
   Separate Section Card Layouts (Stoplight Elements style)
   ========================================================================== */

/* Card container for Parameter lists (Path, Query, Headers) */
#scalar-app div:has(> ul > .parameter-item) {
  border: 1px solid var(--scalar-border-color, #e2e8f0) !important;
  border-radius: 8px !important;
  background: var(--scalar-background-1, #ffffff) !important;
  margin: 28px 0 !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

/* Card header for Parameter lists */
#scalar-app div:has(> ul > .parameter-item)>div:first-child {
  background: rgba(15, 23, 42, 0.02) !important;
  border-bottom: 1px solid var(--scalar-border-color, #e2e8f0) !important;
  padding: 14px 16px !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: var(--scalar-color-1, #0f172a) !important;
}

[data-theme="dark"] #scalar-app div:has(> ul > .parameter-item)>div:first-child,
.dark-mode #scalar-app div:has(> ul > .parameter-item)>div:first-child {
  background: rgba(255, 255, 255, 0.02) !important;
  color: var(--scalar-color-1, #f8fafc) !important;
}

/* Parameter list items inside the card */
#scalar-app .parameter-item {
  border-bottom: 1px solid var(--scalar-border-color, #e2e8f0) !important;
  padding: 5px 16px !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Specially pad response items so the chevron arrow does not touch the vertical guide line */
#scalar-app ul[aria-label="Responses"] .parameter-item {
  padding-left: 32px !important;
}

#scalar-app .parameter-item:last-child {
  border-bottom: none !important;
}

/* Card container for Request Body */
#scalar-app .request-body {
  border: 1px solid var(--scalar-border-color, #e2e8f0) !important;
  border-radius: 8px !important;
  background: var(--scalar-background-1, #ffffff) !important;
  margin: 28px 0 !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

/* Card header for Request Body */
#scalar-app .request-body-header {
  background: rgba(15, 23, 42, 0.02) !important;
  border-bottom: 1px solid var(--scalar-border-color, #e2e8f0) !important;
  padding: 14px 16px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

[data-theme="dark"] #scalar-app .request-body-header,
.dark-mode #scalar-app .request-body-header {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* Style the Request Body title text */
#scalar-app .request-body-title {
  color: var(--scalar-color-1, #0f172a) !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

[data-theme="dark"] #scalar-app .request-body-title,
.dark-mode #scalar-app .request-body-title {
  color: var(--scalar-color-1, #f8fafc) !important;
}

/* Style the Request Body content container (which has the schema) */
#scalar-app .request-body>div:not(.request-body-header) {
  padding: 16px !important;
  background: transparent !important;
}

/* Prevent content-type/mime-type selector pill (e.g. application/json) from touching the right border of parameter-item cards */
#scalar-app .parameter-item>div.absolute.right-0 {
  right: 16px !important;
}

/* Prevent the "Copy Link" anchor button from touching/overlapping the left card borders */
/* #scalar-app .relative>button.absolute {
  left: -14px !important;
}*/
/* .scalar-app .gap-1\.5 {
  display: none !important;
} */

/* Responsive adjustments */
@media (max-width: 850px) {
  .header-hamburger {
    display: flex;
  }

  .header-left {
    padding-left: 16px;
  }

  .custom-header img {
    height: 40px;
  }

  .header-right {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 24px;
    gap: 16px;
    z-index: 999;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
  }

  .custom-header[data-theme="light"] .header-right {
    background: var(--header-bg);
  }

  .custom-header[data-theme="dark"] .header-right {
    background: var(--header-bg);
    border-color: rgba(255, 255, 255, 0.05);
  }

  .header-right.open {
    display: flex;
    animation: slideDown 0.25s ease-out forwards;
  }

  .theme-radio-group {
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .theme-radio-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
  }

  .header-right a {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
  }

  .custom-header[data-theme="dark"] .header-right a.btn-key {
    background: #0C59C7 !important;
    color: white !important;
    border: none;
  }

  .custom-header[data-theme="dark"] .header-right a.btn-postman {
    background: rgba(255, 108, 55, 0.08) !important;
    border: 1px solid rgba(255, 108, 55, 0.6) !important;
    color: #FF6C37 !important;
    justify-content: center;
  }

  .custom-header[data-theme="dark"] .header-right a.btn-postman:active {
    background: #FF6C37 !important;
    color: white !important;
  }

  .custom-header[data-theme="light"] .header-right a:not(.btn-key):not(.btn-postman) {
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .custom-header[data-theme="light"] .header-right a.btn-key {
    background: white !important;
    color: #0C59C7 !important;
    border: none;
  }

  .custom-header[data-theme="light"] .header-right a.btn-postman {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    justify-content: center;
  }

  .custom-header[data-theme="light"] .header-right a.btn-postman:active {
    background: #FF6C37 !important;
    color: white !important;
    border-color: #FF6C37 !important;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ensure all Scalar modal and client overlays render on top of our custom header */
.scalar-client-modal,
.scalar-modal,
.scalar-api-client-modal,
.scalar-client-modal-container,
[role="dialog"],
.modal-client-container,
#scalar-client-modal,
#scalar-modal,
.teleport-target {
  z-index: 99999 !important;
}

.group\/item.group\/sidebar-section.contents ul.flex.flex-col.gap-px {
  margin-left: 10px;
}

header.api-reference-toolbar.bg-b-1.relative.z-1.flex.h-10.justify-center.border-b.px-15.references-developer-tools {
  display: none;
}