// API
$ddpurple: #632ca6;

.announcement.api {
    .main-api {
        h2 {
            margin-top: -175px;
            padding-top: 175px;
        }
    }
    .api-toolbar {
        margin-top: 0;
    }

    .main-api,
    .sidenav-api {
        @include media-breakpoint-between(lg, lg) {
          margin-top: 30px;
        }
    }

    .scrolled {
        .sidenav-api {
            @include media-breakpoint-up(lg) {
                top: 96px;
            }
        }
    }
}


.main-api {
    margin-bottom: 160px;
    padding-left: 15px;

    @media (min-width: 991px) {
        padding-left: 29px;
    }

    h2 {
        margin-top: -145px;
        padding-top: 145px;
        pointer-events: none;
        background-clip: content-box;
        margin-right: 0;
        a {
            pointer-events: initial;
            border-bottom: 1px solid transparent;
            &:hover {
                color: #000;
                border-bottom: 1px solid #000;
            }
        }
    }

    .read-only {
        position: relative;
        top: 2px;
        font-size: 16px;
    }

    a {
        color: #4a4a4a;
        border-bottom: 1px solid #6c757d;
        &:hover {
            color: $ddpurple;
            border-bottom: 1px solid $ddpurple;
        }
    }

    .programming-lang-wrapper:not(.api-reference) {
        min-height: 500px;

        @include media-breakpoint-up(md) {
            min-height: 600px;
        }

        @include media-breakpoint-up(lg) {
            min-height: 600px;
        }

        @include media-breakpoint-up(xl) {
            min-height: 600px;
        }
    }

    .code-snippet-wrapper {
        margin-right: 0;
        /*height: 475px;

        @include media-breakpoint-up(md) {
            height: 435px;
        }

        @include media-breakpoint-up(lg) {
            height: 420px;
        }

        @include media-breakpoint-up(xl) {
            height: 400px;
        }*/
    }

    .table-request .isReadOnly {
        display: none;
    }

    .divider {
        margin-top: 70px;
        &:last-of-type {
            display: none;
        }
    }

    .endpoint {
      &.isCollapsed {
        a.js-collapse-trigger {
          padding-left:20px;
        }
      }
      .toggle-arrow {
        position:absolute;
        &.expanded {
          transform: rotate(90deg);
        }
      }
    }
}

.api {
    .api-toolbar {
        font-weight: 600;
        height: auto;

        a {
            border-bottom: none;
        }

        @include media-breakpoint-up(lg) {
            align-items: baseline;
            background: white;
            position: sticky;
            z-index: 5;
            top: 94px;
            height: 65px;
        }
    }

    .api-content {
        ul {
            list-style-type: none;
            -webkit-padding-start: 12px;
            ul {
                -webkit-padding-start: 20px;
            }
            li {
                &:before {
                    content: '–';
                    position: relative;
                    margin-right: 10px;
                    margin-left: -12px;
                    float: left;
                }
                p {
                    margin-bottom: 0;
                }
            }
        }
    }

    // gross change this..
    .col-sm-9 > div:nth-child(1) > div:nth-child(1) {
        padding-top: 70px;
    }
    .col-sm-9 > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) {
        padding-top: 0;
    }
    .api-nav {
        margin-right: -15px;
        margin-left: -15px;
        height: 50px;
        z-index: 9;
        top: 64px;
    }
    .api-content {
        padding-top: 40px;
        border-bottom: 1px solid #d6d6d6;
    }
    .api-code {
        background: #1d1d1d;
        padding-left: 0;
        padding-right: 0;
        color: #ffffff;
        border-bottom: 1px solid #323232;
        h3 {
            color: #787878;
            font-size: 18px;
            font-weight: 200;
        }
        p {
            color: #fff;
        }
        a {
            color: #7cafe9;
            text-decoration: underline;
        }
        & > div {
            padding: 80px 30px 40px 30px;
        }
    }

    @media (max-width: 991px) {
        .api-content {
            padding-top: 24px;
            padding-bottom: 24px;
        }
    }

    #accordion .btn,
    .example-accordion .btn,
    .code-snippet-wrapper button:disabled,
    .code-snippet-wrapper button[disabled] {
      font-weight: bold;
      color: #632ca6;
      width: 100%;
      justify-content: space-between;
      display: flex;
      text-align: left;
      gap: 35px;
    }
    #accordion .btn.collapsed,
    .example-accordion .btn.collapsed {
      color: #666;
      & i {
        transform: rotate(180deg);
      }
    }
    #accordion pre,
    .example-accordion pre {
      border-bottom: 3px solid rgba(119,0,255,.3);
    }
    .code-snippet-wrapper button:disabled,
    .code-snippet-wrapper button[disabled], {
      opacity:1;
    }


    // Style api tables from markdown to be purple similar to generated api examples
    table,
    .table {
        background-color: #fdfcff;
        border: 1px solid #ebebeb;
        & > thead > tr > th {
            background: #f3edff;
        }
        & > thead > tr > th,
        & > tbody > tr > td {
            border-left: 1px solid #ebebeb !important;
        }
        & > tbody tr:nth-child(2n) {
            background: #fdfcff;
        }
    }
}
