@import url('https://fonts.cdnfonts.com/css/gilroy-bold');
html,body{
   font-family: 'Gilroy-Medium', 'Noto Sans', Arial, sans-serif;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overscroll-behavior-y: none;

}

-webkit-scrollbar {
    width: 8px;
    display: none;
}

::-webkit-scrollbar:horizontal {
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: rgba(142, 142, 142, 0.05);
}

::-webkit-scrollbar-thumb {
    background-color: #000;
    border-radius: 8px;
    cursor: pointer;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #333 !important;
    transition: background-color 0.2s ease !important;
}


#chatContainer{
    width: min(640px, 50vw);
    min-height: 50dvh;
    max-height: 80dvh;
    border-radius: 2em;
    animation-delay: 1s;
    animation: fade-in 1s ease-in-out;


}
#chatContainer.justChatbot{
    animation: none;
}

@keyframes fade-in {
    0% { opacity: 0; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

@media (max-width: 1024px) {
    #chatContainer{
        width: 100vw;
        flex-grow: 1;
        margin-top: 3em;
        max-height: calc(100dvh - 5em);
        height: calc(100dvh - 5em);
    }
    #chatContainer.justChatbot{
        margin-top: 0;
        max-height: 100%;
        height: 100%;
    }
}
@supports (height: 100dvh) {
    .full-viewport-height {
        height: 100dvh;
    }
}

#toolbar{
    /*Make the toolbar 100% width and 50px height on top*/
    width: 100vw;
    background-color: #33333399;
    position: fixed;
    top: 0;
    color:white;
    padding: 1em ;
    display: flex;
    flex-direction: row;
}

#toolbar ul{
    list-style: none;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    margin: 0 1em;
    padding: 0;
    flex-grow: 1;
    a{
        color: white;
        margin-left: 1em;
        font-size: larger;
    }
}

#toolbar .toolbarTitle{
    margin:0 1em;
    font-size: large;
}



.chat-window-transparent{

    .trend-rider-ai-header,.trend-rider-ai-powered-by{
        color: var(--text-color) !important;
        border-radius: 1em;
        padding: 1em;
        z-index: 99;
        a{
            color: white;
        }
    }
    .trend-rider-ai-help-link{
        color: var(--text-color) !important;
    }
    .trend-rider-ai-chat-message,.trend-rider-ai-input-area{
        background-color: white;
        font-family: 'Gilroy-Medium', 'Noto Sans', Arial, sans-serif;
        color: #333;
        border-radius: 1em;
        padding: 1em;
    }

    .trend-rider-ai-chat-message{
        margin-top: 1em;
    }

    .trend-rider-ai-message-area{
        margin: 0 0 -0.5em 0;
        background-color: unset;
        scrollbar-width: thin;
        scrollbar-color: #555 rgba(142, 142, 142, 0.05);
        overflow-y: auto;
        overflow-x: hidden;

    }
    .trend-rider-ai-header{
        margin-top: 0;
        border-radius: 1em 1em 0 0;
        background: linear-gradient(to bottom, var(--header-color) 95%, transparent 100%) !important;
        box-shadow:  0px 0px 5px -1px rgba(0, 0, 0, 0.1);
    }
    .trend-rider-ai-powered-by {
        border-radius: 0 0 1em 1em ;
        background: linear-gradient(to top, var(--header-color) 75%, transparent 100%);
    }

    .user{
        position: relative;
        border-radius: 2em 2em 2em 0;
        background:  var(--primary-color-rgb) ;
        animation: trend-rider-ai-window-animation 300ms ease-in-out;
        margin-right: 1em;
        padding-left: 2em;
        color:white;
    }


    .assistant{
        position: relative;
        border-radius: 2em 2em 0 2em;
        animation: trend-rider-ai-window-animation 300ms ease-in-out;
        background: var(--secondary-color-rgb);
        color:white;
        margin-left: 1em;

    }


    .assistant *:not(.noem-shopify-product-container *),.user *:not(.noem-shopify-product-container *){
        color:white !important;
    }

    @keyframes trend-rider-ai-message-animation {
        0% { opacity: 0; transform: translateY(10px);}
        100% { opacity: 1; transform: translateY(0);}
    }


    .trend-rider-ai-send-button{
        background-color: var(--secondary-color-rgb) !important;
        color:white;
        font-size: 1em;
    }

    .trend-rider-ai-mic-button{
        background-color: var(--secondary-color-rgb) !important;
    }
    .trend-rider-audio-exit-audio, .trend-rider-ai-mic-button:not(.trend-rider-audio-active){
        color:white;
        font-size: 1em;
    }
    .trend-rider-ai-mic-button.trend-rider-audio-active {
        background-color: red !important;
        font-size: 1em;
        color: white !important;
    }

    .trend-rider-ai-sample-command{
        background: linear-gradient(45deg, var(--secondary-color-rgb) 0%, var(--primary-color-rgb) 25%,var(--secondary-color-rgb) 100%);
        background-size: 150%;
        color:var(--text-color);
        border: 2px solid white;
        transition: all 0.3s ease-in;
    }
    .trend-rider-ai-sample-command:hover{
        background-size: 500%;
        outline: 2px solid var(--secondary-color-rgb);
        color:white;
    }
}

.gradient .user{
    background: linear-gradient(225deg, var(--primary-color-rgb) 0%, var(--secondary-color-rgb) 100%);
}
.gradient .assistant{
    background: linear-gradient(45deg, var(--primary-color-rgb) 0%, var(--secondary-color-rgb) 100%);
}

.bg{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    animation: darken 3s ease-in-out forwards;
}
#qrCodeContainer{
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 99999;
}

@keyframes darken {
    0% { background-color: rgba(0, 0, 0, 0.5); }
    100% { background-color: rgba(0, 0, 0, .8); }
}

#qrCodeContainer{
    background: radial-gradient( var(--primary-color) , var(--secondary-color-rgb) );
    /*
    background-color: transparent;

     */
}
#qrcode{
    border-radius: 2em;
    border: 2em solid white;
    margin: 1em;
}
button {
    border-radius: 0.5em;
    border: none;
    padding: 0.5em 1em;
    background-color: var(--primary-color);
}

.qrCodeClose{
    font-size: 1.5em;
    color: var(--text-color);
    cursor: pointer;
    border:2px solid var(--text-color);
    background: linear-gradient(45deg, var(--primary-color-rgb) 0%, var(--secondary-color-rgb) 100%);
}

.qrCodeTitle{
    color: var(--text-color);
}

.trend-rider-ai-input-area svg{

    --svg-height: 32px;
    fill: none !important;
    height: var(--svg-height);
    min-height: var(--svg-height);
    max-height: var(--svg-height);

    padding: 6px;
}
.trend-rider-ai-message-text{
    padding-top: 0;
}
.trend-rider-toolbar-button > svg{
    padding-right: 0.5em;
}


.noem-shopify-inventory-container{
    justify-content: center;flex-wrap:wrap;background: white; border-radius: 12px; border: 1px solid rgba(0,0,0,0.3); box-shadow: 0px 4px 6px rgba(0,0,0,0.3); overflow: hidden; display: flex; flex-direction: row; margin: 0.5em;

    .noem-shopify-product-image{
        flex-shrink:1;width: 5em; object-fit: contain;
    }
    .noem-shopify-product-header{
        min-width:120px;padding: 16px; flex-grow: 1; display: flex; flex-direction: column; gap: 8px;
    }

    .noem-shopify-product-title{
        margin: 0;flex-grow: 1; font-size: 16px; font-weight: 600; color: #1a1a1a;
    }
    .noem-shopify-product-compared-price{
        font-weight: bold;text-decoration: line-through;
    }
    .noem-shopify-product-compared-price-sale{
        background-color: red;color:white;padding: 0 0.5em;
    }
    .noem-shopify-product-price{
        margin: 0; font-size: 14px; color: #1a1a1a;
    }
    .noem-shopify-product-view-link-container {
        align-items: center;justify-items: end;

        .noem-shopify-product-view-link {
            display: inline-block;
            text-decoration: none;
            margin: 1em;
            padding: 12px 24px;
            border-radius: 6px;
            border: 1px solid #999;
            text-align: center;
            font-weight: 500;
            transition: background 0.2s;
        }
    }
}

.noem-shopify-product-container {
    --img-size: 200px;
    display: grid;
    grid-template-columns:repeat(auto-fit, var(--img-size));
    gap: 24px;
    padding: 20px;
    color: #555 !important;

    .noem-shopify-product-card {
        background: white;
        border-radius: 12px;
        border: 1px solid rgba(0, 0, 0, 0.3);
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
        transition: transform 0.2s, box-shadow 0.2s;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        height: 100%;

        .noem-shopify-product-description {
            max-height: 5em;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            -webkit-box-pack: center;
            -webkit-box-align: center;
            padding-bottom: 1em;
        }

        .noem-shopify-product-image {
            width: calc(100% - 1em);
            height: var(--img-size);
            object-fit: cover;
            border-radius: 12px 12px 0 0;
        }

        .noem-shopify-product-content {
            padding: 16px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .noem-shopify-product-title {
            margin: 0;
            flex-grow: 1;
            font-size: 16px;
            font-weight: 600;
            color: #1a1a1a;
        }

        .noem-shopify-product-variants {
            margin-top: 1em;
            width: 100%;
            color: rgba(0, 0, 0, 0.9);
            border: 1px solid rgba(0, 0, 0, 0.3);
        }

        .noem-shopify-product-description {
            margin: 0;
            font-size: 14px;
            line-height: 1.4;
            flex-grow: 1;
        }

        .noem-shopify-product-compared-price {
            font-weight: bold;
            text-decoration: line-through
        }

        .noem-shopify-product-compared-price-sale {
            background-color: red;
            color: white;
            padding: 0em 0.5em;
        }

        .noem-shopify-product-price {
            margin: 0;
            font-size: 14px;
            color: #1a1a1a;
        }

        .noem-shopify-product-view-link {
            display: inline-block;
            font-weight: bold;
            text-decoration: none;
            margin: 1em;
            padding: 12px 24px;
            border-radius: 6px;
            border: 1px solid #999;
            text-align: center;
            font-weight: 500;
            transition: background 0.2s;
        }
    }
}