/* The code blocks of the site (page Samples), in the look of the Elementor Pro "Code Highlight" widget of the old site:
   the Prism "default" theme (prism.css by Lea Verou, MIT, as bundled in Elementor Pro's widget-code-highlight.css), the
   line numbers of the Prism plugin line-numbers and a copy button that appears when the mouse is on the code. Prism
   1.23.0 itself is in /lib/prism (MIT) and is loaded by site.js only on a page with a code block. */

.pa-code {
    position: relative;
    overflow: hidden;
}

.pa-code pre[class*="language-"],
.pa-code code[class*="language-"] {
    direction: ltr;
    background: none;
    color: #000000;
    font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
    font-size: 16px;
    text-align: left;
    text-shadow: none;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.5;
    tab-size: 4;
    hyphens: none;
}

.pa-code pre[class*="language-"] {
    position: relative;
    margin: 20px 0 0;
    padding: 1em;
    overflow: auto;
    background: #f5f2f0;
}

.pa-code pre[class*="language-"] ::selection,
.pa-code code[class*="language-"] ::selection {
    background: #b3d4fc;
    text-shadow: none;
}

.pa-code .token.comment,
.pa-code .token.prolog,
.pa-code .token.doctype,
.pa-code .token.cdata {
    color: #708090;
}

.pa-code .token.punctuation {
    color: #999999;
}

.pa-code .token.namespace {
    opacity: 0.7;
}

.pa-code .token.property,
.pa-code .token.tag,
.pa-code .token.boolean,
.pa-code .token.number,
.pa-code .token.constant,
.pa-code .token.symbol,
.pa-code .token.deleted {
    color: #990055;
}

.pa-code .token.selector,
.pa-code .token.attr-name,
.pa-code .token.string,
.pa-code .token.char,
.pa-code .token.builtin,
.pa-code .token.inserted {
    color: #669900;
}

.pa-code .token.operator,
.pa-code .token.entity,
.pa-code .token.url {
    background: hsla(0, 0%, 100%, 0.5);
    color: #9a6e3a;
}

.pa-code .token.atrule,
.pa-code .token.attr-value,
.pa-code .token.keyword {
    color: #0077aa;
}

.pa-code .token.function,
.pa-code .token.class-name {
    color: #dd4a68;
}

.pa-code .token.regex,
.pa-code .token.important,
.pa-code .token.variable {
    color: #ee9900;
}

.pa-code .token.important,
.pa-code .token.bold {
    font-weight: 700;
}

.pa-code .token.italic {
    font-style: italic;
}

/* The line numbers (Prism plugin line-numbers 1.23.0). */
.pa-code pre[class*="language-"].line-numbers {
    position: relative;
    padding-left: 3.8em;
    counter-reset: linenumber;
}

.pa-code pre[class*="language-"].line-numbers > code {
    position: relative;
    white-space: inherit;
}

.pa-code .line-numbers .line-numbers-rows {
    position: absolute;
    pointer-events: none;
    top: 0;
    font-size: 100%;
    left: -3.8em;
    width: 3em;
    letter-spacing: -1px;
    border-right: 1px solid #999999;
    user-select: none;
}

.pa-code .line-numbers-rows > span {
    display: block;
    counter-increment: linenumber;
}

.pa-code .line-numbers-rows > span::before {
    content: counter(linenumber);
    color: #999999;
    display: block;
    padding-right: 0.8em;
    text-align: right;
}

/* The copy button (Prism plugins toolbar and copy-to-clipboard on the old site): on top right, visible on hover. */
.pa-code__copy {
    position: absolute;
    top: 0.3em;
    right: 0.2em;
    z-index: 2;
    padding: 0 0.5em;
    border: 0;
    border-radius: 0.5em;
    background: rgba(224, 224, 224, 0.2);
    box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2);
    color: #bbbbbb;
    font-size: 0.8em;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.pa-code:hover .pa-code__copy,
.pa-code__copy:focus-visible {
    opacity: 1;
}

.pa-code__copy:hover,
.pa-code__copy:focus-visible {
    color: inherit;
}
