@import '~highlight.js/styles/base16/darcula.css';

.hljs-deletion {
    color: #cb7832;
}
.hljs-addition {
    color: #6a8759;
}

pre code {
    max-width: 50rem;
}

code.language-shell {
    border-top: 30px solid lighten(#2b2b2b, 10%);
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    overflow-x: visible;

    &:before {
        content: "";
        position: relative;
        left: 0;
        top: -34px;
        display: block;
        border-radius: 50%;
        background: #fc2230;
        box-shadow: 0 0 0 2px #fc2230, 1.5em 0 0 2px #fd9332, 3em 0 0 2px #7cc74c;
        height: 7px;
        width: 7px;
    }
}

.hljs, .language-text {
    padding-top: 1rem;
    padding-left: 1.5rem;
    padding-bottom: 1rem;
}

.language-text {
    display: block;
    overflow-x: auto;
    background: #2b2b2b;
    color: #f8f8f2;
    padding: 0.5em;
}

code {
    position: relative;
}

.btn-copy {
    position: absolute;
    right: 0;
    top: 0;
    width: 30px;
    height: 30px;
    display: block;
    cursor: pointer;
    background-color: white;
    border: 4px solid $white;
    border-bottom-left-radius: 5px;
    background-image: url(./res/copy.svg);
    background-repeat: no-repeat;
    background-position: center center;

    &.btn-copy-ok {
        background-image: url(./res/copy-ok.svg);
    }
    &.btn-copy-error {
        background-image: url(./res/copy-error.svg);
    }
}

@include media-breakpoint-down(md){
    .btn-copy {
        display: none;
    }
}
