﻿/* Code Snippet Explorer */
.code-snippet-explorer .edit-hint {
    position: absolute;
    top: -40px;
    left: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: rotate(7deg);
    transform-origin: center;
    animation: codeSnippetBounceRotated 2s ease-out 2 forwards;
    z-index: 250;
}

@keyframes codeSnippetBounceRotated {
    0%, 100% {
        transform: rotate(7deg) translateY(0);
    }

    20% {
        transform: rotate(7deg) translateY(-20px);
    }

    40% {
        transform: rotate(7deg) translateY(0);
    }

    60% {
        transform: rotate(7deg) translateY(-10px);
    }

    80% {
        transform: rotate(7deg) translateY(0);
    }

    100% {
        transform: rotate(7deg) translateY(0); /* Ensure final state maintains rotation */
    }
}

.code-snippet-explorer .arrow-text {
    font-size: 1.4em;
    font-weight: bold;
}

.code-snippet-explorer ul.code-snippets-list {
    list-style: none;
    padding-left: 0;
}

    .code-snippet-explorer ul.code-snippets-list li {
        position: relative;
        padding-left: 14px;
    }

        .code-snippet-explorer ul.code-snippets-list li::before {
            content: '';
            position: absolute;
            left: 0;
            top: 3px;
            width: 10px;
            height: 16px;
            background-image: url('/_content/SGBiz.Website.CodeSnippets.RCL/images/fa-svgs/light/caret-right.svg');
            background-size: contain;
            background-repeat: no-repeat;
        }

        .code-snippet-explorer ul.code-snippets-list li.item-selected::before {
            background-image: url('/_content/SGBiz.Website.CodeSnippets.RCL/images/fa-svgs/light/caret-right.svg');
        }

.code-snippet-explorer.is-compact .snippet-img {
    width: 500px;
}

.code-snippet-explorer.is-compact .loading-status {
    width: 100%;
    height: 250px;
}

.code-editor.loading-splash {
    --col-width: 68px;
    --row-height: 20px;
    --line-w: 1px;
    position: relative;
    background-color: white;
    background-image: repeating-linear-gradient(to right, #d9d9d9 0 var(--line-w), transparent var(--line-w) var(--col-width)), repeating-linear-gradient(to bottom, #d9d9d9 0 var(--line-w), transparent var(--line-w) var(--row-height));
    background-position: calc(-1 * var(--line-w)) calc(-1 * var(--line-w));
    background-repeat: repeat;
}

    .code-editor.loading-splash .cell-a1 {
        position: absolute;
        top: 0;
        left: 0;
        height: calc(var(--row-height) - (var(--line-w)));
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding: 3px 0 0 4px;
        font: 11pt Aptos, Calibri, Arial, sans-serif;
        cursor: default;
        background-color: white;
    }

/* Override default message */
code-input:not(.code-input_registered)::before {
    content: "Loading sample..." !important;
}

/* xl */
@media (max-width: 1400px) {
    .main-container {
        width: 1056px;
    }

    .code-snippet-explorer.is-compact .snippet-img {
        margin-top: 5px;
    }

    .code-snippet-explorer.is-compact .loading-status {
        margin-top: 5px;
        height: 250px;
    }
}

/* lg */
@media (max-width: 1200px) {
    .main-container {
        width: 696px;
    }

    .code-snippet-explorer.is-compact .snippet-img {
        margin-top: 5px;
    }

    .code-snippet-explorer.is-compact .loading-status {
        margin-top: 5px;
        height: 250px;
    }
}

/* md */
@media (max-width: 992px) {
    .main-container {
        width: 456px;
    }

    .code-snippet-explorer.is-compact .snippet-img {
        margin-top: 5px;
        width: 440px;
    }

    .code-snippet-explorer.is-compact .loading-status {
        margin-top: 5px;
        height: 220px;
    }
}

/* sm */
@media (max-width: 768px) {
    .code-snippet-explorer.is-compact .snippet-img {
        margin-top: 5px;
        width: 500px;
    }

    .code-snippet-explorer.is-compact .loading-status {
        margin-top: 5px;
        height: 250px;
    }

    .code-snippet-explorer .code-snippet-item {
        font-size: 0.9em;
    }

    .code-snippet-explorer .edit-hint {
        left: 10px;
    }

    .code-snippet-explorer .arrow-text {
        font-size: 1.0em;
    }
}

/* xs */
@media (max-width: 576px) {
    .code-snippet-explorer .edit-hint {
        display: none;
    }

    .code-snippet-explorer.is-compact .snippet-img {
        margin-top: 5px;
        width: 100%;
    }

    .code-snippet-explorer.is-compact .loading-status {
        margin-top: 5px;
        width: 100%;
        aspect-ratio: 2/1;
        height: unset;
    }
}

#code-snippet-page-overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2vmin;
    background-color: rgba(0,0,0,0.7);
    z-index: 2000;
    cursor: pointer;
}

    #code-snippet-page-overlay .content {
        position: absolute;
        top: 50%;
        left: 50%;
        color: white;
        min-width: 32px;
        min-height: 32px;
        transform: translate(-50%,-50%);
    }

    #code-snippet-page-overlay .loading {
        background: transparent url('/images/loading.svg') center no-repeat;
    }

/* Override default message */
code-input:not(.code-input_registered)::before {
    content: "Loading sample..." !important;
}

/* Prism.js */
code[class*="language-"],
pre[class*="language-"] {
    font-size: 9.5pt;
    font-family: "Cascadia Code",Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;
}