@import url('/src?d=Base.ComponentIcons.css');

:root
{
    --cui-color-primary-light-text: rgb(119, 227, 245);
    --cui-color-primary-text: var(--cui-color-primary);
    --cui-color-accent-text: var(--cui-color-accent);
    /* header / menu (always dark glass, slightly darkened further in dark mode) */
    --cui-app-skin-header-bg-color: rgba(39, 53, 55, 0.75);
    --cui-app-skin-menu-bg-color: rgba(39, 53, 55, 0.65);
    /* content surfaces */
    --cui-app-skin-bg-color: rgb(255, 255, 255);
    --cui-color-on-surface: rgba(39, 53, 55);
    --cui-section-bg-gradient: linear-gradient(180deg, #fbfbfb 0%, #ffffff 100%);
    --cui-section-border-color: #eee;
    --cui-column-bg-color: #efefef;
    --cui-column-color1-bg-color: #f1f1f1;
    --cui-column-color1-border-color: #30a8b9;
    --footer-logo-color: rgba(0,0,0, 0.5);
}

html
{
    color: var(--cui-color-on-surface);
}

body, .theme
{
    font-family: "Open Sans", sans-serif;
}

body
{
    font-size: 1rem;
}

h1
{
    color: var(--cui-color-primary-text) !important;
}

@media (min-width: 1024px)
{
    body
    {
        font-size: 1.125rem; /* 18px */
    }
}

@media (min-width: 1440px)
{
    body
    {
        font-size: 1.25rem; /* 20px */
    }
}

.page
{
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;

    .view
    {
        flex: 1;
    }
}

section > .app-content
{
    margin-top: 1rem !important;
}

.doc-container > .app-content,
.doc-container
{
    max-width: min(82ch, 800px) !important;

    h1
    {
        margin: 0;
        margin-bottom: 1rem !important;
        padding: 0 !important;
        line-height: 1.2;
    }

    h2
    {
        margin: 0 0 0.6rem;
        line-height: 1.25;
    }

    h3
    {
        margin: 0 0 0.5rem;
        line-height: 1.3;
    }
}

.view-container.home .doc-container > .app-content,
.view-container.home .doc-container
{
    margin-inline: auto;
    text-align: center;
}

.view-container
{
    position: relative;
    isolation: isolate;
}

    .view-container:not(.home)
    {
        --glow: 0.08; /* light theme */
        background-image: radial-gradient(ellipse 35% 240px at 20% 48px, rgb(9 107 189 / var(--glow)), transparent 70%), radial-gradient(ellipse 40% 240px at 45% 48px, rgb(45 203 214 / var(--glow)), transparent 70%), radial-gradient(ellipse 70% 240px at 90% 48px, rgb(232 98 223 / var(--glow)), transparent 70%);
        background-repeat: no-repeat;
        background-attachment: fixed;
    }

ul.bulleted > li
{
    list-style: disc;
    margin-left: 1.5rem;
}

.doc-container
{
    margin-left: auto;
    margin-right: auto;

    h2
    {
        border-top-style: solid;
        padding-top: 1.4rem;
    }

    p,
    li
    {
        line-height: 1.7;
    }
}


h2[id], h4[id]
{
    scroll-margin-top: calc(48px + 16px + 1rem + 84px); /* fixed header (48px) + section margin + font-size + extra offset  */
}

input[type="email"]
{
    height: 28px;
    min-width: 200px;
}

/* -- app-skin style overwrites -- */
.app-skin.theme > .overlay
{
    z-index: 1;
}

.app-skin.theme.theme-default
{
    &.portal-menu div.body,
    &.login div.body,
    .box.side-menu,
    .search-result
    {
        backdrop-filter: blur(8px);
    }

    .box.side-menu
    {
        overflow-y: scroll;
        font-size: 1rem;
        padding-top: 20px;
        border-top: 10px solid transparent;


        .button.item:not(.selected):hover
        {
            color: var(--cui-color-on-surface);
        }

        .button.item.item-category:not(.selectable)
        {
            color: var(--cui-color-primary-light-text);
            font-weight: bold;
        }
        /* selected child static */
        .button.theme.theme-default:not(.split).lucent:not([class*=" line-"]).sel-child:not(.expanded):not(:hover),
        .button.theme.theme-default.split.lucent:not([class*=" line-"]).sel-child:not(.expanded):not(:hover) > div,
        .button.theme.theme-default:not(.split).lucent:not([class*=" line-"]).static.sel-child:not(:hover),
        .button.theme.theme-default.split.lucent:not([class*=" line-"]).static.sel-child:not(:hover) > div,
        .button.theme.theme-default:not(.split).lucent[class*=" line-"]:not(.disabled).lucent.sel-child:not(:hover),
        .button.theme.theme-default.split.lucent[class*=" line-"]:not(.disabled).lucent.sel-child > div:not(:hover)
        {
            color: var(--cui-color-primary-light-text);
        }
    }
}


    /* header */
    .app-skin.theme.theme-default > header
    {
        backdrop-filter: blur(8px);
        font-size: 1rem;

        > div.app-content
        {
            .button.menu-button.theme
            {
                order: 0;
                width: 16px;
                padding-left: 4px;
                padding-right: 4px;
                background: none !important;

                &.hidden
                {
                    position: static !important;
                    width: 16px !important;
                    height: 48px !important;
                    padding-left: 4px !important;
                    padding-right: 4px !important;
                }

                &.selected > span.ico-menu
                {
                    opacity: 1;
                }

                > span.ico-menu
                {
                    width: 16px;
                    opacity: 0.7;
                }
            }
        }
        /* logo */
        a.logo-link
        {
            display: inline-flex;
            order: 1;

            figure.logo
            {
                width: 200px;
                height: 34px;
                background: url('../Images/Componyx-logo.svg') no-repeat center / contain;
            }
        }

        figure.logo::before
        {
            display: none;
        }
        /* header menu */
        > div.app-content div.menu
        {
            display: flex;
            justify-content: center;
            position: relative;
            left: 0;
            order: 2;
        }

        .quick-buttons
        {
            order: 3;
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-right: 1rem;

            > .icon
            {
                font-size: 20px;
            }
        }
    }


.app-skin.theme .form-field.theme.switch.theme-switch
{
    > label
    {
        display: none;
    }

    > input[type="checkbox"] ~ b::before
    {
        font-family: 'App-icons';
        content: var(--ico-app-sun);
        color: var(--cui-color-on-surface);
        font-size: 12px;
    }

    > input[type="checkbox"]:checked ~ b::before
    {
        font-family: 'App-icons';
        content: var(--ico-app-moon);
        background-color: white;
        color: rgb(39 53 55 / 80%);
    }
}


div.header-menu a.button.theme.theme-default
{
    margin-left: 6px;
    margin-right: 6px;
}

    /* header menu */
    div.header-menu a.button.theme.theme-default[class*="line-"]:not(.disabled).lucent:hover,
    div.header-menu a.button.theme.theme-default[class*="line-"]:not(.disabled).lucent > div:hover,
    div.header-menu a.button.theme.theme-default[class*="line-"]:not(.disabled).lucent.selected,
    div.header-menu a.button.theme.theme-default[class*="line-"]:not(.disabled).lucent > div.selected
    {
        color: var(--cui-color-primary-light-text);
    }

    div.header-menu a.button.theme.theme-default[class*="line-"]:not(.disabled).lucent::after
    {
        background: var(--cui-color-primary-light-text) !important;
        height: 3px !important;
    }

/* -- homepage -- */
div.app-skin.theme .view-container.home section
{
    font-size: 20px;
    padding: 2rem;
    border-bottom: 1px solid var(--cui-section-border-color);
    background-image: var(--cui-section-bg-gradient) !important;
}

    div.app-skin.theme .view-container.home section:last-of-type
    {
        padding-bottom: 5rem;
        border-bottom-style: none;
    }


div.app-skin.theme section:not(:last-of-type)
{
    margin-bottom: 0px;
}

.hero
{
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 64px;
    padding-bottom: 16px;
    margin-top: -48px;

    .hero-bg
    {
        position: absolute;
        top: -20%;
        left: -20%;
        width: 140%;
        height: 140%;
        background: linear-gradient(120deg, #096bbd, #2dcbd6, #e862df, #096bbd);
        background-size: 300% 300%;
        animation: gradientShift 15s ease infinite;
        filter: blur(60px);
    }

    .hero-text
    {
        position: relative;
        z-index: 1;
        text-align: center;
        color: white;
    }


    .hero-text
    {
        max-width: 82ch;
        margin: 0 auto;
        margin-top: auto;
    }

    .hero-hook
    {
        font-size: 16px;
        opacity: .85;
        margin: 0 0 12px;
    }

    h1
    {
        font-size: 64px;
        line-height: 1 !important;
        margin: 0;
        color: #6ef2fb !important;
        text-shadow: 2px 2px 2px #ff63e4;
    }

    h2
    {
        font-size: 26px;
        font-weight: 400;
        line-height: 1.3;
        margin: 8px 0 16px;
    }

    .hero-sub
    {
        font-size: 18px;
        opacity: .8;
        line-height: 1.5;
        margin: 0;
    }

    .hero-buttons
    {
        margin-top: 12px;

        > .button.get-started:not(:hover)
        {
        }

        > .button.explore:not(:hover)
        {
            background: var(--cui-color-surface) !important;
            color: var(--cui-color-on-surface) !important;
        }
    }

    .brands
    {
        display: inline-flex;
        align-items: center;
        position: relative;
        color: white;
        margin-top: 32px;
        margin-bottom: 4px;

        *
        {
            border-right: 1px solid rgba(255,255,255,0.4);
            padding-right: 6px;
            margin-right: 6px;
            font-size: 32px;
        }

            *:last-child
            {
                border-right: 0px;
            }
    }
}

.ico-bindary
{
    display: inline-block;
    width: 1em;
    height: 1em;
    background-color: currentColor;
    -webkit-mask: url('../images/bindary.svg') no-repeat center / contain;
    mask: url('../images/bindary.svg') no-repeat center / contain;
}

.ico-component
{
    display: inline-block;
    width: 1em;
    height: 1em;
    background-color: currentColor;
    -webkit-mask: url('../images/component.svg') no-repeat center / contain;
    mask: url('../images/component.svg') no-repeat center / contain;
}

/* -- all pages -- */

.view-container a:not(.button)
{
    color: var(--cui-color-primary-text);
    text-decoration: none;

    &:hover
    {
        text-decoration: underline;
    }
}

.columns
{
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;

    .column
    {
        box-sizing: border-box;
        flex: 1 1 calc(50% - 1rem);
        padding: 2rem;
        min-width: 260px;
        border-style: solid;
        border-radius: .5rem;
        background-color: var(--cui-column-bg-color);

        .column-heading
        {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 0.5rem;
        }

            .column-heading h3
            {
                margin: 0;
            }

        p
        {
            max-width: 82ch;
        }

        p,
        li
        {
            line-height: 1.7;
        }
    }

        .column.color-1
        {
            background-color: var(--cui-column-color1-bg-color);
            border-color: var(--cui-column-color1-border-color);

            > h3
            {
                color: var(--cui-color-primary-text);
            }
        }
}


.products .columns > .column
{
    display: flex;
    flex-direction: column;
}

    .products .columns > .column > p
    {
        flex: 1;
    }


.app-skin.theme.theme-default section
{
    background: none;
    box-shadow: none;
    margin-bottom: 0px;
}

.app-skin.theme.theme-default .page > footer
{
    background-color: var(--cui-column-bg-color);
    position: relative;
}

    .app-skin.theme.theme-default .page > footer::before
    {
        content: '';
        position: absolute;
        left: 0px;
        right: 0px;
        height: 10px;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0) 100%);
    }


div.app-skin.theme .view-container:not(.home) section:first-of-type
{
    margin-top: 1rem;
}

/* reserve some extra space for the aside menu */
div.app-skin.theme .view-container:not(.home) main
{
    padding-bottom: 5rem;
}


.example-result
{
    border: 1px solid var(--cui-border-color);
    border-radius: var(--cui-border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.app-content
{
    &:has(aside)
    {
        --app-skin-content-margin: 0;
    }

    .view-container:has(aside > nav)
    {
        display: grid;
        grid-template-columns: minmax(320px, 1fr) 300px;
        column-gap: 2rem;
        padding-left: calc(330px + 2rem);
    }

    .view-container:not(:has(aside > nav > *))
    {
        display: flow-root;
    }
}

@media screen and (max-width: 1480px)
{
    .view-container
    {
        grid-template-columns: minmax(300px, 1fr) !important;
        column-gap: 0;
    }

    .view-container > aside
    {
        display: none;
    }

    .app-skin.theme:has(.side-menu.hidden) .view-container
    {
        padding-left: 0;   
    }
}

@media screen and (max-width: 959px)
{
    .app-skin.theme:has(.side-menu) .view-container
    {
        padding-left: 0;
        display: flow-root;
    }
}


aside
{
    display: none;
    font-size: 1rem;
}

    aside:has(nav > *)
    {
        display: block;
        padding-left: 1rem;
        padding-right: 1rem;
        box-sizing: border-box;

        nav:not(:empty)
        {
            position: sticky;
            top: calc(48px + 2rem);

            &::before
            {
                content: attr(data-label);
                text-transform: uppercase;
                line-height: 50px;
            }
        }

        nav > *
        {
            word-break: break-all;
            overflow-y: auto;
            max-height: calc(100vh - (48px + 5rem));
            scrollbar-width: thin;
            scrollbar-color: var(--cui-app-skin-menu-text-color) transparent;
        }

        li.h2 ~ li.h4
        {
            margin-left: 1rem;
        }

        li.h2:has(~ li.h4)
        {
            font-weight: bold;
        }

        nav li
        {
            padding: 8px;

            a
            {
                position: relative;
                text-decoration: none;
                opacity: 0.75;
                transition: opacity ease-in 500ms;

                &::before
                {
                    content: '';
                    background-color: var(--cui-color-primary);
                    width: 4px;
                    height: 20px;
                    position: absolute;
                    left: -10px;
                    top: 50%;
                    transform: translateY(-50%);
                    opacity: 0;
                    transition: opacity ease-in 500ms;
                }

                &.selected::before
                {
                    opacity: 1;
                }

                &:hover
                {
                    opacity: 1;
                }
            }
        }
    }


.tab-pane
{
    display: none;

    &.active
    {
        display: block;
    }
}

/* -- code tokens -- */
:not(pre) > code
{
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
    padding: 0.15em 0.45em;
    border-radius: var(--cui-border-radius);
    background: var(--cui-color-neutral);
    color: var(--cui-color-primary-text) !important;
    border: 1px solid var(--cui-border-color);
    overflow-wrap: break-word;
}

pre:has(> code[class~="language-html"])::before
{
    content: 'HTML';
}

pre:has(> code[class~="language-javascript"])::before
{
    content: 'JS';
}

pre:has(> code[class~="language-bash"])::before
{
    content: 'BASH';
}

pre:has(> code[class~="language-csharp"])::before
{
    content: 'C#';
}

pre:has(> code):before
{
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--cui-color-on-surface, #999);
    opacity: 0.6;
    pointer-events: none;
}

pre:has(> code)
{
    position: relative;
}


/* -- demo result */
.example-result.inline
{
    display: flex;
    align-items: center;
    gap: 5px;
}


/* -- footer -- */
.footer-columns
{
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3rem;
    padding: 3rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;

    .column
    {
        flex: 0 1 180px;
        text-align: center;

        .column-title
        {
            font-weight: 600;
            margin-bottom: 0.75rem;
        }

        ul
        {
            list-style: none;
            margin: 0;
            padding: 0;

            li
            {
                margin-bottom: 0.5rem;
            }

            a
            {
                text-decoration: none;
                color: inherit;

                &:hover
                {
                    text-decoration: underline;
                }
            }
        }
    }
}

.logo-monotone
{
    margin-bottom: 0.75rem;

    .logo-mono
    {
        display: block;
        height: 30px;
        aspect-ratio: 634 / 118;
        background-color: var(--footer-logo-color);
        mask: url(../images/componyx-logo-mono.svg) no-repeat center / contain;
    }
}

.social-media
{
    margin-top: 0.75rem;

    ul
    {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        list-style: none;
        margin: 0;
        padding: 0;
    }
}

.app-skin.theme .menu.theme .button.item.theme b.star::before
{
    content: var(--cui-ico-star);
    font-family: 'UI';
    margin-right: 5px;
    color: var(--cui-color-primary-text);
}

.app-skin.theme .menu.theme .button.item.theme.item-category:not(.selectable)
{
    margin-top: 1rem;
}

.app-skin.theme.theme-default .menu.theme.theme-default.side .button.item.theme.theme-default.selected:not(.disabled)
{
    background: var(--cui-button-selected-bg-color);
}


.tldr-tag
{
    font-size: 0.5em;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 0.5em;
    color: var(--cui-text-muted, #888);
}

.license-table
{
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;

    th,
    td
    {
        padding: 0.6em 1em;
        border-bottom: 1px solid;
        text-align: left;
    }

    th
    {
        font-weight: 600;
    }

    td
    {
        &.yes
        {
            color: var(--cui-color-primary-text);
            text-align: center;
            white-space: nowrap;
        }

        &.no
        {
            color: var(--cui-color-accent-text);
            text-align: center;
            white-space: nowrap;
        }
    }
}

.license-params
{
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 1em;
    row-gap: 0.75em;

    dt
    {
        font-weight: 600;
        white-space: nowrap;
    }

    dd
    {
        margin: 0;

        p:first-child
        {
            margin-top: 0;
        }

        p:last-child
        {
            margin-bottom: 0;
        }
    }
}

.change-request
{
    margin-top: 2rem;
    padding: 12px;
}

.tooltip-manager.theme .box.tooltip
{
    z-index: 10;
    font-size: 13px;
    word-break: break-all;
}

@media screen and (min-width: 1440px)
{
    :root
    {
        --app-skin-content-width: 1320px; /* don't go beyond this width, otherwise columns are too wide vs .doc-container blocks */
    }
}

/* -- animations -- */
@keyframes gradientShift
{
    0%
    {
        background-position: 0% 50%;
    }

    50%
    {
        background-position: 100% 50%;
    }

    100%
    {
        background-position: 0% 50%;
    }
}
