:target {
  /* height of sticky header */
  scroll-margin-top: 64px;
}

body.api #sidebar #sidebar-content.filtering ul.tocify-header:has(li.show) {
  display: block;
}

body.api #body #content {
  margin-right: 0px;
  padding-bottom: 0px;
}

#TableOfContents {
  height: calc(100vh - 64px);
  overflow-y: scroll;

  li.toc-list-item {
    border-bottom: 1px solid #d3d9de;
    padding: 0 0.75rem 0 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    height: 2rem;
    display: flex;
    align-items: cneter;
    color: #555;

    a {
      flex-grow: 1;
    }
  }

  li.toc-list-item.--active {
    background-color: #e3e3e3;
  }
}

#api>div.swagger-ui>div:nth-child(1) {
  display: none
}

/* Reset */
select {
  margin-bottom: 0;
}

#api ul {
  display: block;
  padding: 0 0 0 24px;
  margin: initial;

  li {
    list-style: initial;
    padding: initial;
  }
}

#api div.swagger-ui {
  margin: 1rem;

  div.information-container,
  div.scheme-container {
    display: none;
  }

  button {
    border-radius: 4px;
  }

  button:hover {
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), currentColor);
    background-position-x: 20%;
    background-size: 100000px;
  }

  section.block {
    background-color: unset;
    padding: 1px 0px;
    border: unset;
  }

  div.opblock-tag-section {
    border-bottom-width: 4px;
    border-bottom-style: solid;
    border-bottom-color: #f0f2f4;
  }

  /* AuditLog */
  h3.opblock-tag {
    display: flex;
    padding: 2rem 2rem 1rem 2rem !important;
    cursor: pointer;

    button:hover {
      background-image: unset;
    }
  }

  h3.opblock-tag:hover {
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), currentColor);
    background-position-x: 20%;
    background-size: 100000px;
  }

  button.expand-operation {
    background-color: unset;
  }

  /* GET /audit_logs/api Retrieve audit logs for Soracom API calls getApiAuditLogs */
  div.opblock {
    border-top-width: 4px;
    border-top-style: solid;
    border-top-color: #f0f2f4;
  }

  div.is-open {
    height: unset;
  }

  /* Retrieve audit logs for Soracom API calls., Parameters, ... */
  div.opblock-body {
    padding: 0 2rem 10rem 2rem;
  }

  div.opblock-summary {
    position: relative;
    width: 100%;
    font-size: 1.2rem;
  }

  button.opblock-summary-control {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding-right: 2rem;
    background-color: unset;
    padding: 1rem 2rem;
    text-align: left;

    svg.arrow {
      position: absolute;
      top: 20px;
      right: 8px;
      width: 16px;
      height: 16px;
    }
  }

  /* GET, POST, DELETE */
  span.opblock-summary-method {
    border-width: 2px;
    border-style: solid;
    margin: 0.3rem 0.5rem 0 0.5rem;
    border-radius: 4px;
    font-size: .7rem;
    width: 3rem;
    font-weight: 700;
    order: 3;
    align-self: flex-start;
    text-align: center;
  }

  /* GET */
  div.opblock-summary-get span.opblock-summary-method {
    border-color: #006cb7;
  }

  /* POST */
  div.opblock-summary-post span.opblock-summary-method {
    border-color: #1abc9c;
  }

  /* PUT */
  div.opblock-summary-put span.opblock-summary-method {
    border-color: #f2ca27;
  }

  /* DELETE */
  div.opblock-summary-delete span.opblock-summary-method {
    border-color: #e74c3c;
  }

  /* HEAD */
  div.opblock-summary-head span.opblock-summary-method {
    border-color: #e0e2e4;
  }

  /* /audit_logs/api */
  span.opblock-summary-path,
  span.opblock-summary-path__deprecated {
    flex-grow: 2;
    font-weight: 700;
    order: 4;
    width: 1%;
    overflow: auto;

    wbr {
      display: none;
    }
  }

  /* Retrieve audit logs for Soracom API calls */
  div.opblock-summary-description {
    text-wrap: balance;
    order: 5;
    width: 100%;
  }

  /* getApiAuditLogs */
  span.opblock-summary-operation-id {
    font-weight: 700;
    order: 1;
    width: 1%;
    flex-grow: 3;
    white-space: normal;
    hyphens: auto;
  }

  /* Lock icon */
  button.authorization__btn {
    display: none;
  }

  /********
   * BODY *
   ********/

  /* Parameters */
  div.opblock-section-header {
    margin-top: 2rem;

    h4 {
      font-size: 1rem;
      font-weight: 700;
      padding-top: 0px;
    }

    label {
      display: flex;
      gap: 0.1rem;

      span::after {
        content: ":";
      }
    }
  }

  div.parameter__name {
    color: #006cb7;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    text-wrap: nowrap;
  }

  div.required span,
  span.star {
    color: #d73e34;
    font-size: 0px;

    &::after {
      content: "(required)";
      margin-left: 0.2rem;
      font-weight: 400;
      font-size: 0.8rem;
      font-style: italic;
      line-height: 0.8rem;
    }
  }

  .parameter__name:not(.required)::after {
    content: "(optional)";
    margin-left: 0.1rem;
    font-weight: 400;
    font-size: 0.8rem;
    font-style: italic;
    line-height: 0.8rem;
    color: #555;
  }

  div.parameter__type {
    color: #aaa;
    font-weight: 700;
    font-size: 0.8rem;
  }

  div.parameters-container {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  /* Parameters header */
  div.opblock-section-header {
    display: flex;
    justify-content: space-between;
  }

  /* Try it out */
  button.try-out__btn {
    text-transform: uppercase;
    border: 1px solid rgb(118, 118, 118);
  }

  input[disabled],
  select[disabled] {
    cursor: not-allowed;
    color: rgb(143, 161, 180);
    border-color: rgba(113, 133, 153, 0.15);
    background-color: rgb(246, 249, 252);
  }

  div.try-out,
  div.parameters-container,
  div.body-param,
  div.execute-wrapper {

    input:not([disabled]),
    button.btn:not([disabled]),
    textarea:not([disabled]),
    select:not([disabled]) {
      border: 2px solid #34cdd7;
      margin-top: 0.5rem;
      margin-bottom: 0.5rem;
    }
  }

  input[title]:not([title=""]):not([disabled]) {
    border-color: red;
  }

  /* Description */
  thead th.parameters-col_description {
    width: 100%;
  }

  td.parameters-col_name>*:not([class*="parameter__name"]) {
    display: inline-block;
  }

  div.parameter__deprecated {
    margin: 0px 2px;
  }

  /* Execute / Clear button */
  div.btn-group {
    margin-top: 1rem;

    button {
      margin-right: 1rem;
    }
  }

  /* Responses */
  div.responses-inner {
    overflow-x: auto;
  }

  /* Responses / Snippets */
  div.tablist {
    display: flex;
    padding-bottom: 1rem;

    div.btn {
      cursor: pointer;
      border-radius: 3px;
      padding: 1px 6px;

      h4 {
        padding-top: unset;
        font-weight: 400;
      }

      &:hover {
        background-color: lightgray;
      }
    }

    div.btn.active {
      background-color: #006cb7;

      h4 {
        color: #fff;
      }
    }
  }

  pre.microlight {
    font-size: 0.9rem;
    color: #ccc;
  }

  thead td {
    padding: .5rem;
    border: 1px solid #eaeaea;
    background: #f7f7f7;
    font-weight: 600;
  }

  /* application/json selector */
  select.content-type {
    margin-bottom: 0;
  }

  /* Responses > Description */
  td.response-col_description {
    width: 100%;

    h5 {
      font-size: inherit;
      font-weight: 700;
    }

    div.highlight-code {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;

      pre {
        width: 100%;
      }
    }
  }

  div.response-control-media-type {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
  }

  div.response-control-examples {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
  }

  div.response-undocumented {
    color: red;
    text-transform: uppercase;
  }

  ul.tab+div[role="tabpanel"] {
    margin-top: 0.5rem;

    pre {
      margin-top: 0;
    }
  }

  div.model-example {
    margin-top: 0.5rem;

    div[data-name=modelPanel] .model-box table.model tr td:first-child {
      width: 1%;
      white-space: nowrap;
    }
  }

  tbody {
    td {
      vertical-align: text-top;
    }

    td.response-col_status {
      color: #006cb7;
      font-weight: 700;
      vertical-align: text-top;
    }
  }

  /* Examples */
  div.examples-select {
    display: flex;
    gap: 0.5rem;
  }

  /* Example Value / Schema */
  ul.tab {
    flex-flow: initial;
    list-style: none;
    padding-left: 0;

    li {
      display: inline-block;
      color: #006cb7;
    }
  }

  button.tablinks {
    border-radius: 3px;
    background-color: unset;
  }

  button.tablinks[aria-selected="true"] {
    background-color: #006cb7;
    color: #fff
  }

  button.tablinks[data-name="example"]::before {
    font-family: FontAwesome;
    content: "\f036";
    padding-right: 4px;
  }

  button.tablinks[data-name="model"]::before {
    font-family: FontAwesome;
    content: "\f085";
    padding-right: 4px;
  }

  /* Example Value */
  pre {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;

    code {
      font-size: 0.9rem;
    }
  }

  /* Model */
  div[data-name="modelPanel"] {
    background-color: #383b44;
    border-radius: 8px;
    padding: 4px;
  }

  div.model-box {
    background-color: #d3d9de;
    border-radius: 4px;
    padding: 1rem 1rem 1rem 0;
    overflow-x: auto;
  }

  span.model-toggle::after {
    display: inline-block;
    width: 20px;
    height: 8px;
    content: "";
    background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTAgNiA4LjU5IDcuNDEgMTMuMTcgMTJsLTQuNTggNC41OUwxMCAxOGw2LTZ6Ii8+PC9zdmc+) 50% no-repeat;
    background-size: 100%;
  }

  span.model-toggle {
    display: inline-block;
    transition: transform .15s ease-in;
    transform: rotate(90deg);
  }

  span.model-toggle.collapsed {
    transform: rotate(0);
  }

  span.model-hint {
    display: none;
  }

  span.model {
    display: block;
    padding-left: 1rem;
    padding-right: 0.8rem;

    button {
      background-color: unset
    }

    span.model-title__text {
      color: rgb(85, 85, 85);
      font-size: 0.9rem;
      font-weight: 700;
    }
  }

  table.model {
    margin-left: 1rem;
    border: none;
    font-size: 0.9rem;

    td {
      border: none;
      padding: 0px;
    }

    tr.description>td:first-child {
      color: rgb(85, 85, 85);
      font-weight: 400;
    }

    tr.property-row>td:first-child {
      color: #006cb7;
      font-weight: 700;
    }
  }

  /* [Copy] */
  div.copy-to-clipboard {
    font-size: 0.8rem;

    span {
      text-transform: lowercase;
    }
  }

  div.copy-to-clipboard+pre.microlight,
  div.copy-to-clipboard+div>pre {
    margin-top: 0.5rem;
  }

  p {
    margin: 0.5rem 0;
  }
}

.tocify-extend-page {
  display: none;
}