.api-credentials-container {
    padding: 4rem 2rem;

    button {
        font-size: var(--font-size);
        font-weight: 400;
        border: none;
    }

    h2 {
        font-size: var(--font-size-xxl);
        font-weight: 400;
    }

    .api-credentials-description-section {
        margin-bottom: 1rem;

        h2 {
            margin-block-end: 1rem;
        }

        button.hidden-md-up {
            display: flex;
            align-items: center;
            margin-left: auto;

            span {
                color: var(--anchor-text-blue);
                font-weight: 400;
                font-size: 10px;
            }

            svg {
                width: 12px;
                height: 12px;

                path,
                polygon {
                    fill: var(--anchor-text-blue);
                }
            }
        }

        span {
            font-size: var(--font-size);
            font-family: var(--base-font-family);
            color: var(--black);
        }

        p.api-credentials-description {
            margin-inline-end: 4px;
        }

        ul {
            margin-block-start: 12px;
            margin-inline-start: 20px;

            li {
                margin-block-end: 8px;
            }
        }
    }

    div.api-key-info-section {
        display: flex;
        gap: 12px;
        margin-block-start: 24px;
    }

    .api-keys {
        padding-top: 2rem;

        .api-keys-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-block-end: 24px;

            button {
                height: 57px;
                border: none;
                cursor: pointer;
                display: flex;
                align-items: center;
                min-width: auto;

                @media (--xl-up) {
                    justify-content: space-evenly;
                }

                @media (--lg-down) {
                    gap: 12px;
                }
            }

            @media (--sm-down) {
                flex-direction: column;
                align-items: flex-start;

                button {
                    width: 100%;
                    margin-top: 1rem;
                }
            }

            .create-api-key-button {
                background-color: var(--anchor-text-blue);
                color: var(--white);

                @media (--xl-up) {
                    width: 250px;
                }

                @media (--md-only) {
                    width: 180px;
                }

                &:hover {
                    background-color: #075ace;
                    path {
                        fill: var(--white);
                    }
                }
            }

            .cancel-api-key-button {
                background-color: var(--red);
                color: var(--black);
                font-weight: bold;
                width: 130px;

                &:hover {
                    background-color: #f24b59;
                    path {
                        fill: var(--black);
                    }
                }

                @media (--sm-down) {
                    width: 100%;
                }
            }
        }

        .create-api-key-container {
            margin-block-end: 24px;

            .generate-api-key-button-container {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-block-start: 24px;
                padding: 16px;
                border-radius: 5px;
                background: linear-gradient(90deg, #f3f2f1 0%, #fff 100%);

                @media (--md-down) {
                    flex-direction: column;
                }

                a {
                    color: var(--anchor-text-blue);
                }

                .generate-api-key-button {
                    background-color: var(--valid-green);
                    color: var(--black);
                    padding: 16px 24px;

                    &[disabled] {
                        background: #f3f2f1;
                        opacity: 1;
                        border: 1px solid var(--grey);
                        color: var(--warm-grey);

                        svg {
                            path {
                                fill: var(--warm-grey);
                            }
                        }
                    }

                    &:hover {
                        background: #4dbca9;
                    }

                    svg {
                        margin-inline-end: 16px;

                        path {
                            fill: var(--black);
                        }
                    }
                }

                .checkboxes {
                    flex: 0.8;

                    @media (--md-down) {
                        margin-block-end: 16px;
                    }

                    .labeled-checkbox:first-of-type {
                        margin-block-end: 8px;
                    }
                }
            }
        }

        .api-key-info {
            padding: 48px;
            border: 1px solid var(--grey);
            margin-block-end: 24px;

            @media (--md-down) {
                padding: 12px;
            }

            .labeled-form-control {
                margin-block-end: 24px;
            }
        }
    }

    .api-keys-box {
        border-radius: 5px;
        background: linear-gradient(90deg, #f3f2f1 0%, #fff 100%);
        margin-block: 1.5rem;
        padding: 16px 10px;

        h3 {
            font-size: 20px;
            font-weight: 400;
            font-family: var(--base-font-family);
        }
    }

    .api-keys-content {
        p {
            font-size: var(--font-size);
            font-family: var(--base-font-family);

            @media (--sm-down) {
                font-size: var(--font-size-sm);
            }
        }

        p.header {
            font-weight: 700;
            margin-block-end: 10px;
        }

        p.description {
            font-weight: 400;
        }

        .no-api-keys-container {
            display: flex;
            gap: 12px;
            color: var(--black);
        }

        .api-keys-list-container {
            .api-key-header {
                display: flex;
                justify-content: space-between;
                align-content: center;

                .api-keyname {
                    margin-block-end: 24px;
                }

                button {
                    border: none;
                    width: 30px;
                    height: 30px;
                    border-radius: 50%;

                    &:hover {
                        background-color: var(--grey);
                    }

                    svg {
                        width: 16px;
                        height: 16px;
                        cursor: pointer;
                    }
                }
            }
        }
    }

    .api-key-display-wrapper {
        position: relative;
        font-family: var(--base-font-family);
        font-size: var(--font-size);
        width: 100%;
        margin-block-end: 24px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;

        .api-key-label {
            position: absolute;
            top: -10px;
            left: 16px;
            padding: 0 4px;
            background-color: var(--white);
            font-size: var(--font-size-xs);
            font-weight: 400;
            color: var(--black);
        }

        .api-key-container {
            display: flex;
            flex: 1;
            align-items: center;
            justify-content: space-between;
            border: 1px solid var(--warm-grey);
            background-color: var(--white);
            padding: 12px 22px;

            &.hidden-display-mode {
                border: none;
                background: #f8f8f8;
            }

            @media (--md-down) {
                flex-direction: column;
                padding: 12px;
                align-items: flex-start;
            }

            .copy-api-key-button {
                background-color: var(--valid-green);
                color: var(--black);
                width: 110px;
                min-width: auto;
                gap: 8px;

                &:hover {
                    background: #4dbca9;
                }

                @media (--md-down) {
                    align-self: flex-end;
                    height: 30px;
                    margin-block-start: 8px;
                }
            }

            .api-key-text {
                flex-grow: 1;
                color: var(--black);
                font-family: var(--base-font-family);
                word-break: break-all;
            }
        }
    }
}

.api-modal {
    padding: 48px;

    .api-modal-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;

        button {
            background: var(--red);
            color: var(--black);
            border: none;

            &:hover {
                background: var(--red);
            }
        }

        h3 {
            font-size: 36px;
            font-weight: 400;
            margin-block-end: 1rem;
        }

        p {
            font-size: var(--font-size);
            font-family: var(--base-font-family);
            color: var(--black);
            margin-block-end: 1rem;
        }

        svg {
            path {
                fill: var(--red);
            }

            &.x-circle-icon {
                width: 48px;
                height: 48px;
            }
        }
    }
}
