html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1100px;
    margin: 0 auto;

    &.main-container {
        padding-top: 0 !important;
    }
}

.api-banner h1 {
    font-weight: 700;
    font-size: 48px;
    line-height: 100%;
    margin: 0 0 32px;
    color: var(--color-dark);
}

.api-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;

    .content {
        max-width: 768px;
        margin: auto;
        width: 100%;
        padding: 64px 24px;

        &>div {
            margin-bottom: 32px;
        }

        h2 {
            font-weight: 600;
            font-size: 32px;
            line-height: 1;
            color: var(--color-dark);
            margin-bottom: 8px;
        }

        h3 {
            font-weight: 600;
            font-size: 24px;
            line-height: 1;
            color: var(--color-dark);
            margin-bottom: 8px;
        }

        p {
            font-size: 16px;
            line-height: 22px;
            color: var(--color-dark);
            margin-bottom: 8px;
        }

        .code-container {
            background-color: #000000;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            margin: 20px 0;
            border-radius: 6px 6px 0 0;
        }

        .code-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background-color: #374151;
            color: #CBD5E1;
        }

        .code-title {
            font-size: 14px;
            line-height: 20px;
            font-weight: 500;
        }

        .copy-button {
            background: transparent;
            color: #CBD5E1;
            border-radius: 4px;
            border: none;
            outline: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 12px;
            transition: background-color 0.2s;

            svg {
                fill: none;
            }

            img {
                filter: brightness(0) invert(1);
            }
        }

        pre {
            padding: 16px;
            margin: 0;
            font-family: monospace;
            font-size: 14px;
            line-height: 1.5;
            color: #CBD5E1;
            overflow-x: auto;
        }

        code {
            color: #CBD5E1;

            &.url {
                color: #6658DD;
            }

            &.param {
                color: #1ABC9C;
            }

            &.key {
                color: orange;
            }
        }

        .note-section {
            background-color: var(--color-wrapper);
            border: 1px solid var(--color-dark);
            padding: 16px;
            font-size: 14px;
            line-height: 20px;
        }
    }

    .api-table {
        border-collapse: collapse;
        border: none;
        table-layout: auto;
        width: 100%;

        tr,
        th,
        td {
            border: none;
            background-color: transparent;
            vertical-align: top;
        }

        th table {
            width: 100%;
        }

        .table-header {
            border-bottom: 1px solid #E4E6E8;
        }

        thead {
            background-color: #F6F6F6;
        }

        .border-table-top {
            border-top: 1px solid #E4E6E8;
        }

        .table-row:last-child {
            border-bottom: none;
        }

        .table-cell .table-cell-div {
            display: flex;
            align-items: start;
            gap: 4px;
        }

        .inner-table {
            width: 100%;
            border-collapse: collapse;
        }

        .inner-table td {
            vertical-align: top;
            padding-bottom: 20px;
        }

        .inner-header-item {
            width: 50%;
            display: table-cell;
            padding: 16px;
            text-align: left;
            text-transform: uppercase;
            font-size: 12px;
            line-height: 16px;
            color: var(--label-color);
            background-color: #F6F6F6;
        }

        .inner-error {
            width: 50%;
            padding-right: 15px;
        }

        .inner-description {
            width: 50%;
            padding-left: 16px !important;
        }


    }

    .references {
        min-width: 300px;
        padding: 64px 24px;

        @media (width > 1100px) {
            position: sticky;
            top: 0;
            height: auto;
            align-self: start;
            max-width: 300px;
            min-height: 100vh;
            border-right: 1px solid var(--border-color);
        }

        @media (width < 1100px) {
            margin: 0 auto;
        }

        ul {
            padding-left: 0;
            list-style: none;
            margin: 0;

            a {
                display: inline-block;
                font-weight: 400;
                font-size: 14px;
                line-height: 22px;
                padding: 4px 0;
                color: var(--color-dark);
                text-decoration: none;

                &.active {
                    font-weight: bold;
                }
            }
        }

        h2 {
            margin: 0 0 8px;
            font-weight: 500;
            font-size: 18px;
            line-height: 28px;
        }

        .help {
            font-size: 16px;
            line-height: 22px;

            a {
                color: var(--color-primary);
            }

            @media (width > 1100px) {
                p {
                    max-width: 240px;
                }
            }
        }

        .menu {
            margin-bottom: 16px;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border-color);

            p {
                font-weight: 400;
                font-size: 14px;
                line-height: 22px;
            }

            h2 {
                position: relative;
                cursor: pointer;
            }

            h2::after {
                content: url('/web_assets/frontend/images/new-icon/carret-icon.svg');
                width: 24px;
                height: 24px;
                display: inline-block;
                position: absolute;
                right: 0;
                top: 0;
                transition: all 200ms ease;
                filter: brightness(0);
            }

            h2:not(.active)::after {
                transform: rotate(180deg);
            }
        }
    }

    .api-plan {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 32px;
        padding: 24px;
        background-color: var(--color-purple-light);
        border: 1px solid #000000;

        span {
            font-size: 16px;
            line-height: 24px;
            font-weight: 700;
            max-width: 245px;

            @media (width <=1100px) {
                max-width: 100%;
            }
        }

        .get-api-plan {
            display: inline-block;
            text-decoration: none;
            color: var(--color-light);
            outline: none;
            background-color: var(--color-primary);
            border: var(--border-default);
            box-shadow: var(--box-shadow);
            transition: all 0.2s ease;
            margin-left: auto;
            font-family: Arial;
            font-weight: 400;
            font-size: 16px;
            line-height: 24px;
            padding: 8px 12px;

            &:hover {
                box-shadow: var(--box-shadow-inverse);
            }

            @media (width <=1100px) {
                margin: 0 auto;
                width: 100%;
                text-align: center;
            }
        }
    }
}

footer {
    margin-top: 0;
}

ol.merged-list {
    margin: 0;
    padding-left: 16px;

    li {
        font-size: 14px;
        line-height: 20px;

        &:not(:last-child) {
            margin-bottom: 20px;
        }
    }
}

@media (max-width: 375px) {
    .api-banner h1 {
        font-size: 38px;
    }

    .api-content {
        .content {
            padding-top: 0 !important;
        }

        .references {
            padding-bottom: 0 !important;
        }
    }
    .table-cell {
        padding: 8px !important;
    }
    .table-header .header-item ,
    .table-header .inner-header-item {
        padding: 8px !important;
    }
}

.api-usage-section, 
.api-limitations-section {
    margin-top: 42px;
}