/* ==============================
   Payment API components
   GitBook-like clean version
   ============================== */

/* Scope all API component styling so it does not affect the site header, footer, nav, or normal docs. */
.md-typeset .api-doc,
.md-typeset .api-doc * {
  box-sizing: border-box;
}

.md-typeset .api-doc {
  --api-border: #e5e7eb;
  --api-text: #262626;
  --api-muted: #737373;
  --api-code-bg: #f4f4f5;
  --api-required: #f59e0b;
  --api-success-bg: #dcfce7;
  --api-success-text: #15803d;
  --api-error-bg: #fee2e2;
  --api-error-text: #dc2626;
  --api-radius: 8px;
  --api-toggle-width: 8.8rem;

  color: var(--api-text);
  font-size: 0.8rem;
  line-height: 1.48;
}

/* ==============================
   Schema container
   ============================== */

.md-typeset .api-schema {
  margin: 1.6rem 0;
}

.md-typeset .api-schema__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--api-border);
}

.md-typeset .api-schema__title {
  margin: 0;
  color: var(--api-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.md-typeset .api-schema__content-type {
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--api-border);
  border-radius: 6px;
  background: #fff;
  color: var(--api-text);
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
}

.md-typeset .api-schema__description {
  margin: 0.65rem 0 1rem;
  color: var(--api-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ==============================
   Simple field rows
   ============================== */

.md-typeset .api-field {
  margin: 0;
  padding: 0.54rem 0;
  border-top: 1px solid var(--api-border);
}

.md-typeset .api-field:first-child {
  border-top: 0;
}

.md-typeset .api-field__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
}

.md-typeset .api-field__name {
  color: var(--api-text);
  font-family: var(--md-code-font-family);
  font-size: 0.76rem;
  font-weight: 700;
}

.md-typeset .api-field__type,
.md-typeset .api-field__format {
  color: var(--api-muted);
  font-family: var(--md-code-font-family);
  font-size: 0.7rem;
  font-weight: 400;
}

.md-typeset .api-field__requirement {
  color: var(--api-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.md-typeset .api-field__requirement--required {
  color: var(--api-required);
}

.md-typeset .api-field__description {
  margin: 0.3rem 0 0;
  color: var(--api-muted);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.48;
}

.md-typeset .api-field__meta {
  margin: 0.3rem 0 0;
  color: var(--api-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.md-typeset .api-field__meta code,
.md-typeset .api-field__enum code {
  padding: 0.05rem 0.24rem;
  border: 1px solid var(--api-border);
  border-radius: 4px;
  background: var(--api-code-bg);
  color: var(--api-text);
  font-size: 0.68rem;
}

.md-typeset .api-field__enum {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.3rem;
}

/* ==============================
   Object / array rows
   ============================== */

/* Reset Material details/admonition styling only for API objects. */
.md-typeset details.api-object {
  display: block;
  margin: 0 !important;
  padding: 0.58rem 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--api-border) !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.md-typeset details.api-object:first-child {
  border-top: 0 !important;
}

.md-typeset details.api-object::before,
.md-typeset details.api-object::after,
.md-typeset details.api-object > summary::before,
.md-typeset details.api-object > summary::after {
  display: none !important;
  content: none !important;
}

.md-typeset details.api-object > summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--api-toggle-width);
  gap: 0.8rem;
  align-items: start;
  min-height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-left: 0 !important;
  cursor: pointer;
  list-style: none;
  background: transparent !important;
  outline: none;
}

.md-typeset details.api-object > summary::-webkit-details-marker {
  display: none;
}

.md-typeset details.api-object > summary:focus,
.md-typeset details.api-object > summary:focus-visible {
  outline: none;
}

.md-typeset .api-object__main {
  min-width: 0;
}

/*
  Toggle behavior:
  - Collapsed default: only + is visible.
  - Collapsed hover: Show properties +.
  - Expanded: Hide properties × is always visible.
  - Button is right-aligned inside a reserved column, so text does not shift.
*/
.md-typeset .api-object__toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;

  width: auto;
  min-width: 0;
  height: auto;

  padding: 0.18rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--api-muted);

  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.md-typeset .api-object__toggle::before {
  display: none;
  content: "Show properties";
}

.md-typeset .api-object__toggle::after {
  content: "+";
  display: inline-block;
  width: 0.7rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

/* Collapsed on hover: show full button without changing field text position. */
.md-typeset details.api-object:not([open]) > summary:hover .api-object__toggle,
.md-typeset details.api-object:not([open]) > summary:focus-visible .api-object__toggle {
  border-color: var(--api-border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.md-typeset details.api-object:not([open]) > summary:hover .api-object__toggle::before,
.md-typeset details.api-object:not([open]) > summary:focus-visible .api-object__toggle::before {
  display: inline;
}

/* Expanded state: Hide properties × is always visible. */
.md-typeset details.api-object[open] > summary .api-object__toggle {
  border-color: var(--api-border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.md-typeset details.api-object[open] > summary .api-object__toggle::before {
  display: inline;
  content: "Hide properties";
}

.md-typeset details.api-object[open] > summary .api-object__toggle::after {
  content: "×";
  font-size: 0.9rem;
}

.md-typeset .api-object__nested {
  margin: 0.64rem 0 0 1rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--api-border);
}

.md-typeset .api-object__nested .api-field,
.md-typeset .api-object__nested details.api-object {
  padding-top: 0.48rem !important;
  padding-bottom: 0.48rem !important;
}

/* ==============================
   Responses block
   ============================== */

.md-typeset .api-responses {
  max-width: 760px;
  margin: 1.8rem 0;
}

.md-typeset .api-responses__title {
  margin: 0 0 0.72rem;
  color: var(--api-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.md-typeset .api-responses__list {
  overflow: hidden;
  border: 1px solid var(--api-border);
  border-radius: var(--api-radius);
  background: #fff;
}

/* Reset Material details/admonition styling only for API responses. */
.md-typeset details.api-response {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.md-typeset details.api-response::before,
.md-typeset details.api-response::after,
.md-typeset details.api-response > summary::before,
.md-typeset details.api-response > summary::after {
  display: none !important;
  content: none !important;
}

.md-typeset details.api-response + details.api-response {
  border-top: 1px solid var(--api-border) !important;
}

.md-typeset details.api-response > summary {
  display: grid !important;
  grid-template-columns: 0.7rem auto minmax(0, 1fr) auto;
  gap: 0.62rem;
  align-items: center;
  min-height: auto !important;
  margin: 0 !important;
  padding: 0.62rem 0.8rem !important;
  cursor: pointer;
  list-style: none;
  background: #fff !important;
  outline: none;
}

.md-typeset details.api-response > summary::-webkit-details-marker {
  display: none;
}

.md-typeset .api-response__chevron {
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--api-muted);
  border-bottom: 2px solid var(--api-muted);
  transform: rotate(-45deg);
}

.md-typeset details.api-response[open] > summary .api-response__chevron {
  transform: rotate(45deg);
}

.md-typeset .api-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  padding: 0.05rem 0.28rem;
  border-radius: 5px;
  font-family: var(--md-code-font-family);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
}

.md-typeset .api-status--success {
  background: var(--api-success-bg);
  color: var(--api-success-text);
}

.md-typeset .api-status--error {
  background: var(--api-error-bg);
  color: var(--api-error-text);
}

.md-typeset .api-response__summary-text {
  overflow: hidden;
  color: var(--api-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.md-typeset .api-response__content-type {
  color: var(--api-muted);
  font-family: var(--md-code-font-family);
  font-size: 0.68rem;
  white-space: nowrap;
}

.md-typeset .api-response__body {
  padding: 0.05rem 0.8rem 0.82rem 0.8rem;
}

.md-typeset .api-response__description {
  margin: 0.28rem 0 0.75rem;
  color: var(--api-muted);
  font-size: 0.78rem;
  line-height: 1.48;
}

/* ==============================
   GitBook-like reference layout
   ============================== */

@media screen and (min-width: 76.25em) {
  body:has(.api-reference-page) .md-sidebar--secondary,
  body:has(.api-code-card--aside) .md-sidebar--secondary {
    display: none;
  }

  body:has(.api-reference-page) .md-content,
  body:has(.api-code-card--aside) .md-content {
    min-width: 0;
  }
}

.md-typeset .api-reference-clear {
  display: block;
  clear: both;
}

@media screen and (min-width: 1100px) {
  .md-typeset:has(.api-code-card--aside) {
    --api-reference-gap: clamp(1.35rem, 2vw, 2rem);
    --api-reference-aside-width: min(46%, 42rem);
    --api-reference-main-width: calc(
      100% - var(--api-reference-aside-width) - var(--api-reference-gap)
    );
    --api-reference-intro-width: calc(
      var(--api-reference-main-width) + clamp(14rem, 23%, 21rem)
    );
  }

  .md-typeset:has(.api-code-card--aside)
    > :is(h1, p, blockquote, ul, ol, .admonition):has(~ .api-code-card--aside) {
    width: var(--api-reference-intro-width);
    max-width: var(--api-reference-intro-width);
  }

  .md-typeset .api-code-card--aside {
    float: right;
    clear: right;
    width: var(--api-reference-aside-width);
    margin: 0.1rem 0 1.6rem var(--api-reference-gap);
  }

  .md-typeset .api-code-card--aside .api-code-card__header {
    padding: 0.52rem 0.65rem;
  }

  .md-typeset .api-code-card--aside .api-code-card__endpoint {
    gap: 0.45rem;
    font-size: 0.72rem;
  }

  .md-typeset .api-code-card--aside .api-code-card__endpoint code {
    font-size: 0.68rem;
  }

  .md-typeset .api-code-card--aside .highlight pre {
    max-height: min(35rem, calc(100vh - 9rem));
    font-size: 0.66rem !important;
    line-height: 1.5 !important;
  }

  .md-typeset:has(.api-code-card--aside) .api-doc {
    width: var(--api-reference-main-width);
    max-width: var(--api-reference-main-width);
  }

  .md-typeset:has(.api-code-card--aside) .api-page-link {
    width: var(--api-reference-main-width) !important;
    max-width: var(--api-reference-main-width) !important;
  }

  .md-typeset:has(.api-code-card--aside) .api-responses {
    max-width: var(--api-reference-main-width);
  }

  .md-typeset:has(.api-code-card--aside) .api-doc + .admonition,
  .md-typeset:has(.api-code-card--aside) .api-doc + p,
  .md-typeset:has(.api-code-card--aside) .api-doc + .api-page-link,
  .md-typeset:has(.api-code-card--aside) .api-page-link + .api-doc,
  .md-typeset:has(.api-code-card--aside) .admonition:has(+ .api-doc),
  .md-typeset:has(.api-code-card--aside) p:has(+ .api-doc) {
    width: var(--api-reference-main-width);
    max-width: var(--api-reference-main-width);
  }

  .md-typeset:has(.api-code-card--aside) .api-doc + .admonition {
    margin-top: 1.15rem;
    margin-bottom: 1.65rem;
  }

  .md-typeset:has(.api-code-card--aside) .admonition + .api-doc {
    margin-top: 1.55rem;
  }

  .md-typeset:has(.api-code-card--aside) .api-section,
  .md-typeset:has(.api-code-card--aside) .api-schema,
  .md-typeset:has(.api-code-card--aside) .api-responses {
    margin-top: 1.35rem;
    margin-bottom: 1.55rem;
  }

  .md-typeset:has(.api-code-card--aside) .api-field {
    padding-top: 0.48rem;
    padding-bottom: 0.48rem;
  }

  .md-typeset:has(.api-code-card--aside) .api-schema__title,
  .md-typeset:has(.api-code-card--aside) .api-section__title,
  .md-typeset:has(.api-code-card--aside) .api-responses__title {
    font-size: 0.94rem;
  }

  .md-typeset:has(.api-code-card--aside) .api-field__name {
    font-size: 0.72rem;
  }

  .md-typeset:has(.api-code-card--aside) .api-field__type,
  .md-typeset:has(.api-code-card--aside) .api-field__format,
  .md-typeset:has(.api-code-card--aside) .api-field__requirement {
    font-size: 0.67rem;
  }

  .md-typeset:has(.api-code-card--aside) .api-field__description,
  .md-typeset:has(.api-code-card--aside) .api-schema__description,
  .md-typeset:has(.api-code-card--aside) .api-response__description {
    font-size: 0.74rem;
    line-height: 1.45;
  }
}

/* Response schema inside an opened response.
   Remove the first top divider only when the response schema starts directly with an object. */
.md-typeset .api-response__body > .api-response__description + details.api-object {
  border-top: 0 !important;
}

/* Keep dividers between normal fields and expandable object rows inside response schemas. */
.md-typeset .api-response__body > .api-field + details.api-object,
.md-typeset .api-response__body > details.api-object + .api-field,
.md-typeset .api-response__body > details.api-object + details.api-object {
  border-top: 1px solid var(--api-border) !important;
}

/* ==============================
   Mobile
   ============================== */

@media screen and (max-width: 768px) {
  .md-typeset .api-doc {
    --api-toggle-width: 1.4rem;
    font-size: 0.78rem;
  }

  .md-typeset .api-responses {
    max-width: 100%;
  }

  .md-typeset .api-schema__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }

  .md-typeset details.api-response > summary {
    grid-template-columns: 0.7rem auto minmax(0, 1fr);
  }

  .md-typeset .api-response__content-type {
    grid-column: 3;
  }

  .md-typeset details.api-object > summary {
    grid-template-columns: minmax(0, 1fr) var(--api-toggle-width);
  }

  .md-typeset .api-object__toggle {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .md-typeset .api-object__toggle::before,
  .md-typeset details.api-object:not([open]) > summary:hover .api-object__toggle::before,
  .md-typeset details.api-object:not([open]) > summary:focus-visible .api-object__toggle::before {
    display: none;
  }

  .md-typeset .api-object__nested {
    margin-left: 0.45rem;
    padding-left: 0.7rem;
  }
}




/* ==============================
   Authorization and parameters
   ============================== */

.md-typeset .api-section {
  margin: 1.6rem 0;
}

.md-typeset .api-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--api-border);
}

.md-typeset .api-section__title {
  margin: 0;
  color: var(--api-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.md-typeset .api-section__label {
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--api-border);
  border-radius: 6px;
  background: #fff;
  color: var(--api-text);
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
}

.md-typeset .api-section__body {
  margin-top: 0.1rem;
}

.md-typeset .api-section__body > .api-field:first-child {
  border-top: 0;
}

@media screen and (max-width: 768px) {
  .md-typeset .api-section__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }
}

/* ==============================
   Authorization dropdown
   ============================== */

.md-typeset .api-auth-dropdown {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.md-typeset .api-auth-dropdown::before,
.md-typeset .api-auth-dropdown::after,
.md-typeset .api-auth-dropdown > summary::before,
.md-typeset .api-auth-dropdown > summary::after {
  display: none !important;
  content: none !important;
}

.md-typeset .api-auth-dropdown > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: auto !important;
  margin: 0 !important;
  padding: 0.26rem 0.5rem !important;
  padding-left: 0.5rem !important;
  border: 1px solid var(--api-border);
  border-radius: 6px;
  background: #fff !important;
  color: var(--api-text);
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1.2;
  list-style: none;
  outline: none;
}

.md-typeset .api-auth-dropdown > summary::-webkit-details-marker {
  display: none;
}

.md-typeset .api-auth-dropdown > summary::after {
  display: inline-block !important;
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  margin-left: 0.2rem;
  border-right: 1.5px solid var(--api-text);
  border-bottom: 1.5px solid var(--api-text);
  transform: rotate(45deg) translateY(-1px);
}

.md-typeset .api-auth-dropdown[open] > summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.md-typeset .api-auth-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 20;
  min-width: 8.2rem;
  padding: 0.45rem;
  border: 1px solid var(--api-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.md-typeset .api-auth-dropdown__option {
  display: block;
  padding: 0.42rem 0.55rem;
  border-radius: 6px;
  color: #14995f;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.md-typeset .api-auth-dropdown__option:hover {
  background: #dcf7e8;
}

/* Smooth auth dropdown open/close */

.md-typeset .api-auth-dropdown__menu {
  transform: translateY(-0.15rem);
  opacity: 1;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
}

.md-typeset .api-auth-dropdown.is-closing .api-auth-dropdown__menu {
  transform: translateY(-0.35rem);
  opacity: 0;
}

/* ==============================
   Content type dropdown
   ============================== */

.md-typeset .api-content-type-dropdown {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.md-typeset .api-content-type-dropdown::before,
.md-typeset .api-content-type-dropdown::after,
.md-typeset .api-content-type-dropdown > summary::before,
.md-typeset .api-content-type-dropdown > summary::after {
  display: none !important;
  content: none !important;
}

.md-typeset .api-content-type-dropdown > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: auto !important;
  margin: 0 !important;
  padding: 0.26rem 0.5rem !important;
  padding-left: 0.5rem !important;
  border: 1px solid var(--api-border);
  border-radius: 6px;
  background: #fff !important;
  color: var(--api-text);
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1.2;
  list-style: none;
  outline: none;
  white-space: nowrap;
}

.md-typeset .api-content-type-dropdown > summary::-webkit-details-marker {
  display: none;
}

.md-typeset .api-content-type-dropdown > summary::after {
  display: inline-block !important;
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  margin-left: 0.2rem;
  border-right: 1.5px solid var(--api-text);
  border-bottom: 1.5px solid var(--api-text);
  transform: rotate(45deg) translateY(-1px);
}

.md-typeset .api-content-type-dropdown[open] > summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.md-typeset .api-content-type-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 20;
  min-width: 9.5rem;
  padding: 0.45rem;
  border: 1px solid var(--api-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.md-typeset .api-content-type-dropdown__option {
  display: block;
  padding: 0.42rem 0.55rem;
  border-radius: 6px;
  color: var(--api-text);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
}

.md-typeset .api-content-type-dropdown__option:hover {
  background: #f3f4f6;
}

/* ==============================
   GitBook-like API code cards
   ============================== */

.md-typeset .api-code-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 1.4rem 0;
  border: 1px solid var(--api-border, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.1),
    0 1px 2px rgba(15, 23, 42, 0.06);
}

.md-typeset .api-code-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.62rem 0.75rem;
  border-bottom: 1px solid var(--api-border, #e5e7eb);
  background: #fff;
}

.md-typeset .api-code-card__endpoint {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: #262626;
  font-size: 0.78rem;
}

.md-typeset .api-code-card__endpoint code {
  overflow: hidden;
  padding: 0;
  background: transparent;
  color: #262626;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.md-typeset .api-code-method,
.md-typeset .api-code-status {
  display: inline-flex;
  align-items: center;
  padding: 0.11rem 0.34rem;
  border-radius: 5px;
  font-family: var(--md-code-font-family);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
}

.md-typeset .api-code-method--post {
  background: #fff3d6;
  color: #b45309;
}

.md-typeset .api-code-method--get {
  background: #e0f2fe;
  color: #0369a1;
}

.md-typeset .api-code-method--put,
.md-typeset .api-code-method--patch {
  background: #fef3c7;
  color: #92400e;
}

.md-typeset .api-code-method--delete {
  background: #fee2e2;
  color: #b91c1c;
}

.md-typeset .api-code-status--success {
  background: #dcfce7;
  color: #15803d;
}

.md-typeset .api-code-status--error {
  background: #fee2e2;
  color: #dc2626;
}

/* Dropdown */

.md-typeset .api-code-select {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.md-typeset .api-code-select > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: auto !important;
  margin: 0 !important;
  padding: 0.28rem 0.55rem !important;
  border: 1px solid var(--api-border, #e5e7eb);
  border-radius: 6px;
  background: #fff !important;
  color: #262626;
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1.2;
  list-style: none;
  outline: none;
  white-space: nowrap;
}

.md-typeset .api-code-select > summary::-webkit-details-marker {
  display: none;
}

.md-typeset .api-code-select > summary::before {
  display: none !important;
  content: none !important;
}

.md-typeset .api-code-select > summary::after {
  display: inline-block !important;
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  margin-left: 0.2rem;
  border-right: 1.5px solid #262626;
  border-bottom: 1.5px solid #262626;
  transform: rotate(45deg) translateY(-1px);
}

.md-typeset .api-code-select[open] > summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.md-typeset .api-code-select__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 30;
  min-width: 10rem;
  padding: 0.45rem;
  border: 1px solid var(--api-border, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.md-typeset .api-code-select__option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.42rem 0.55rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #737373;
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

.md-typeset .api-code-select__option:hover,
.md-typeset .api-code-select__option.is-active {
  background: #dcfce7;
  color: #15803d;
}

/* Code body */

.md-typeset .api-code-card__body {
  background: #fafafa;
}

.md-typeset .api-code-option {
  display: none;
}

.md-typeset .api-code-option.is-active {
  display: block;
}

.md-typeset .api-code-card .highlight {
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  background: #fafafa;
}

.md-typeset .api-code-card .highlight pre {
  max-height: 420px;
  max-width: 100%;
  margin: 0;
  padding: 0.9rem;
  overflow: auto;
  background: #fafafa;
  font-size: 0.7rem;
  line-height: 1.55;
  scrollbar-width: thin;
  scrollbar-color: #a3a3a3 transparent;
}

/* No unnecessary horizontal scrollbar */
.md-typeset .api-code-card .highlight pre code {
  display: inline-block;
  min-width: 100%;
  width: auto;
  white-space: pre;
}

/* Copy button */
.md-typeset .api-code-card .md-clipboard {
  top: 0.45rem;
  right: 0.45rem;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.md-typeset .api-code-card:hover .md-clipboard {
  opacity: 1;
}

/* ==============================
   GitBook-like general code examples
   ============================== */

.md-typeset .api-example-card {
  overflow: hidden;
  margin: 1.35rem 0;
  border: 1px solid var(--api-border, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.md-typeset .api-example-card__title {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 1.5rem);
  margin: 0.75rem 0.75rem 0;
  padding: 0.42rem 0.65rem;
  border: 1px solid var(--api-border, #e5e7eb);
  border-bottom-color: #fff;
  border-radius: 6px 6px 0 0;
  background: #fff;
  color: #525252;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.25;
}

.md-typeset .api-example-card__body,
.md-typeset .api-example-tabs__body {
  padding: 0.75rem;
}

.md-typeset .api-example-card__title + .api-example-card__body,
.md-typeset .api-example-option .api-example-card__title + .highlight {
  margin-top: -1px;
}

.md-typeset .api-example-tabs__nav {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  border-bottom: 1px solid var(--api-border, #e5e7eb);
  background: #f4f4f5;
}

.md-typeset .api-example-tabs__tab {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-right: 1px solid var(--api-border, #e5e7eb);
  background: transparent;
  color: #737373;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.md-typeset .api-example-tabs__tab.is-active {
  background: #fff;
  color: #262626;
}

.md-typeset .api-example-option {
  display: none;
}

.md-typeset .api-example-option.is-active {
  display: block;
}

.md-typeset .api-example-card .highlight {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--api-border, #e5e7eb);
  border-radius: 0 8px 8px 8px;
  background: #fafafa;
}

.md-typeset .api-example-card .api-example-card__body > .highlight:first-child,
.md-typeset .api-example-option > .highlight:first-child {
  border-radius: 8px;
}

.md-typeset .api-example-card .highlight pre {
  max-width: 100%;
  margin: 0;
  padding: 0.9rem 1rem;
  overflow: auto;
  background: #fafafa;
  font-size: 0.72rem;
  line-height: 1.55;
  scrollbar-width: thin;
  scrollbar-color: #a3a3a3 transparent;
}

.md-typeset .api-example-card .highlight pre code {
  display: inline-block;
  min-width: 100%;
  width: auto;
  white-space: pre;
}

.md-typeset .api-example-card .md-clipboard,
.md-typeset .api-example-card .md-code__button {
  top: 0.55rem;
  right: 0.55rem;
}

.md-typeset .api-example-card:hover .md-clipboard,
.md-typeset .api-example-card:hover .md-code__button {
  opacity: 1;
}

@media screen and (max-width: 768px) {
  .md-typeset .api-example-card__body,
  .md-typeset .api-example-tabs__body {
    padding: 0.55rem;
  }

  .md-typeset .api-example-card .highlight pre {
    padding: 0.75rem;
    font-size: 0.68rem;
  }
}


/* Force dividers before expandable object rows such as customer */
.api-field + .api-object,
.api-object + .api-field,
.api-object + .api-object,
.api-field + details,
details + .api-field,
details + details {
  border-top: 1px solid var(--md-default-fg-color--lightest) !important;
}


/* ==============================
    GitBook-style API page link cards
      (used for "See also" and "Related pages")
   ============================== */
/* ===================== PAGE LINK CARD ===================== */

:root {
  --api-page-link-hover: var(--md-accent-fg-color);
}

.api-page-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;

  width: 100% !important;
  min-height: 48px;

  gap: 1rem;
  margin: 1rem 0;
  padding: 0.75rem 1.25rem;

  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.25rem;

  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);

  text-decoration: none !important;
  cursor: pointer;

  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.api-page-link:hover {
  border-color: var(--api-page-link-hover);
  color: var(--api-page-link-hover);
  text-decoration: none !important;
}

.api-page-link:focus-visible {
  outline: 2px solid var(--api-page-link-hover);
  outline-offset: 2px;
}

/* Important reset: child elements must NOT become cards */
.api-page-link__icon,
.api-page-link__content,
.api-page-link__body,
.api-page-link__title,
.api-page-link__description,
.api-page-link__arrow {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  text-decoration: none !important;
}

.api-page-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  color: var(--md-default-fg-color--light);
  transition: color 0.15s ease;
}

.api-page-link__icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
}

.api-page-link__content,
.api-page-link__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.api-page-link__title {
  display: block;

  color: var(--md-default-fg-color);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;

  transition: color 0.15s ease;
}

.api-page-link__description {
  display: block;
  margin-top: 0.15rem !important;

  color: var(--md-default-fg-color--light);
  font-size: 0.85rem;
  line-height: 1.4;
}

.api-page-link__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  color: var(--md-default-fg-color--light);
  transition:
    color 0.15s ease,
    transform 0.15s ease;
}

.api-page-link__arrow svg {
  width: 0.75rem;
  height: 0.75rem;
  overflow: visible;
  fill: currentColor;
}

.api-page-link:hover .api-page-link__title,
.api-page-link:hover .api-page-link__icon,
.api-page-link:hover .api-page-link__arrow {
  color: var(--api-page-link-hover);
}

.api-page-link:hover .api-page-link__arrow {
  transform: translateX(2px);
}
