/* =================== REUSABLE CODES ==================== */
@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* CUSTOM LOCAL FONTS */
@font-face {
    font-family: 'Avenir Book';
    src: url('assets/Fonts/Avenir-Book-02.woff') format('woff');
}

/* @font-face {
    font-family: 'Avenir Book 2';
    src: url('assets/Fonts/Avenir-Book.woff') format('woff');
} */

h1 {
    /* font-family: "Barlow", serif !important; */
    font-family: "Avenir Book" !important;
    margin: 0;
}

h2 {
    font-size: clamp(1.2rem, 1.6vw, 1.4rem);
    /* font-family: "Barlow", serif !important; */
    font-family: "Avenir Book" !important;
    margin: 0;
}

h3 {
    /* font-family: "Barlow", serif !important; */
    font-family: "Avenir Book" !important;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    margin: 0;
}

h4 {
    /* font-family: "Barlow", serif !important; */
    font-family: "Avenir Book" !important;
    margin: 0;
}

p {
    font-size: clamp(.9rem, .9vw, 1rem);
    /* font-family: "Barlow", serif !important; */
    font-family: "Avenir Book" !important;
    margin: 0;
}

.d-block {
    display: block !important;
}

.d-none {
    display: none !important;
    z-index: -100;
}

.op-0 {
    opacity: 0 !important;
    transition: .5s;
}

.op-0-1 {
    opacity: 0 !important;
    transition: opacity 0.5s;
    z-index: -1 !important;
}

.op-0-1-none {
    opacity: 0 !important;
    z-index: -1 !important;
    transition: 0s;
}

.op-1 {
    opacity: 1 !important;
    transition: .5s;
}



/* TABLET */
@media(max-width:980px) {}

/* MOBILE */
@media(max-width:767px) {}

/* Loader or blank screen styling */
#reloading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: white; */
    background-image: url(assets/IVYBEARS\ AI_REG_Cover.webp);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 9999;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
}

/* #reloading-overlay p {
    font-size: 18px;
    color: black;
} */

#reloading-overlay p {
    border: 5px solid rgba(255, 255, 255, 0.5);
    border-left-color: #EB0189;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    animation: donut-spin 2s linear infinite;
}

/* =================== HOME ==================== */
html,
body {
    overflow: hidden;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    touch-action: none;
}

img {
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

:root {
    --vh: 100vh;
}

.main-container {
    background-image: url(assets/reg-bg.webp);
    background-color:#fff;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    /* height: 95vh; */
    height: calc(var(--vh));
    position: relative;
}

.all-prompts-container{
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url(assets/reg-bg.webp);
    background-color:#fff;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 5;
}

.no-bg {
    background-image: none !important;
    background-color: #000 !important;
}

.camera-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(500px, 90%);
    text-align: center;
}

.prompt-message {
    background-color: rgba(255, 255, 255, .8);
    padding: 1em 2em;
    border-radius: 15px;
    text-align: center;
}

.click-camera {
    color: #204900;
    /* font-family: "Barlow", serif; */
    font-family: "Avenir Book" !important;
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    font-weight: 700;
    text-transform: uppercase;
    background-color: #E9E9EA;
    border: 2px solid #fff;
    border-radius: 30px;
    padding: .7em 1em;
    margin-top: 1.5em;
    cursor: pointer;
}

/* ==================== ON SOUNDS ====================  */

.custom-popup {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url(assets/reg-bg.webp);
    background-color:#fff;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.custom-popup::before {
    content: "" !important;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .5) !important;
    top: 0;
    left: 0;
    z-index: 0;
}

.popup-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* background-color: rgba(0, 0, 0, 0); */
    border-radius: 15px;
    padding: 1em;
    width: 70%;
    max-width: 500px;
    text-align: center;
}

.popup-container h3 {
    background-color: rgba(255, 255, 255, .8);
    color: #2F2F2F;
    border-radius: 10px;
    padding: .7em 1em;
    font-weight: 700;
}

.popup-container .on-sound {
    color: #204900 !important;
    /* font-family: "Barlow", serif; */
    font-family: "Avenir Book" !important;
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    font-weight: 700;
    text-transform: uppercase;
    background-color: #E9E9EA;
    border: 2px solid #fff;
    border-radius: 30px;
    padding: .7em 1em;
    margin-top: 1.5em;
    cursor: pointer;
    width: min(100px, 90%) !important;
    display: inline-block;
}

/* ==================== SPLASH PAGE ==================== */

.splash-page {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    /* z-index: 999 !important; */
    z-index: 4 !important;
    object-fit: cover;
}

/* ==================== IVYBEARS HEADER ==================== */

.ivybears-header {
    background-color: #fff;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: .5em 0;
    z-index: 99;
}

.back-button {
    position: absolute;
    left: 2%;
    top: 18% !important;
    cursor: pointer;
    z-index: 99;
}

.back-button img{
    width: 35px;
}

.name-title-2 {
    display: block;
    margin: auto;
    width: 250px;
}


/* ==================== AI CHAT ==================== */

.ai-chat {
    /* background-color: red; */
    background-image: url(assets/reg-bg.webp); 
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;

}


/* ---------- MENU ITEMS ---------- */
.menu-container {
    position: absolute;
    width: 95%;
    top: 67%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: .5s;
    z-index: 2 !important;
}


.ai-chat .menu-container {
    /*     background-color: rgba(255,255,0, .5); */
    transform: translate(-50%, 0%) !important;
    transition: .5s;
    top: auto;
    bottom: 30%;
}

.ai-chat .menu-container .menu-items {
    position: relative;
    transition: .5s;
    z-index: 1;
}

.menu-container .menu-items:first-child img {
    width: 7vw !important;
    max-width: 100px;
}

.menu-container .menu-items:first-child {
    height: 35px;
    display: flex;
    align-items: center;
}

.menu-container .menu-items:last-child {
    width: 85px;
}


/* Sound toggle container positioning */
.sound-toggle-container {
    margin-left: 7%;
    margin-right: 0;
    display: flex;
    align-items: right;
    bottom: 30vh;
    position: absolute;
    z-index: 99;
  
}

.sound-toggle {
    width: min(35px, 100%) !important;
}

.menu-items img {
    cursor: pointer;
    transition: .5s;
}

/* .menu-done {
    top: 53%;
    transition: .5s;
} */

.menu-done {
    /* transform: translatey(0) !important; */
    top: 190px !important;
    bottom: auto !important;
    transition: .5s;
}


.hold-to-speak {
    width: 100% !important;
    margin: auto;
    display: block;
    text-align: center;
}

.hold-to-speak img{
    width: 70% !important;
    height: 100% !important;
    object-fit: contain; 
}

.ask-me-anyting {
    width: 70% !important;
}

.hold-to-speak.outside {
    position: relative;
}

.scale-bigger {
    transform: scale(1.1);
    transition: .5s;
}

/* ---------- CHAT CONTAINER ---------- */
.suggestions-all {
    /*     background-color: red; */
    width: 100%;
    position: absolute !important;
    bottom: 10vh !important;
    left: 50%;
    transform: translate(-50%, 0%);
    width: 90%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: .5em;
}


/* add peek */
.suggestions-slider .slick-list {
    /* padding: 0 45% 0 0 !important; */
    padding: 0 35% 0 0 !important;
}

.suggestions-slider .slick-slide {
    margin: 0 .3em;
    width: auto !important;
    max-width: 95vw !important;
}


.suggestions-slider .slick-list {
    margin: 0 -.3em;
    scroll-behavior: smooth;
}

.suggestions-box {
    background-color: #f0f0f0;
    /* background-color: #ffffff; */
    padding: .5em;
    border-radius: 8px;
    cursor: pointer;
}


.suggestions-text {
    display: flex;
    align-items: center;
}

.suggestions-text strong {
    font-weight: 600;
}

.suggestions-text p {
    font-weight: 400;
    font-size: clamp(.85rem, .85vw, .95rem);
}

/* CHAT BOT */
/* .chatbot__chat.incoming span {
    opacity: 0;
    width: 0;
    display: inline-block;
    animation: fadeIn 1s forwards, fadeInWidth 0.5s forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeInWidth {
    0% {
        width: 0;
    }

    100% {
        width: auto;
    }
} */


/* add spacing */
.chatbot__chat.incoming .thinking {
    padding-right: 1.5em;
}

/* add elipsis */
.chatbot__chat.incoming .thinking::after {
    content: '...';
    display: inline-block;
    animation: ellipsisAnimation 1s infinite;
    position: absolute;
}

.loading-ellipsis::after {
    content: '...';
    display: inline-block;
    animation: ellipsisAnimation 1s infinite;
    position: absolute;
}

/* elipsis animation */
@keyframes ellipsisAnimation {
    0% {
        content: '';
    }

    33% {
        content: '.';
    }

    66% {
        content: '..';
    }

    100% {
        content: '...';
    }
}

.chatbot-container {
    position: relative;
    z-index: 2 !important;
}

.chatbot-container,
.chatbot,
.inner-chatbot,
.chatbot-content {
    height: 100%;
    width: 100%;
}

.chatbot-content {
    /* background-color: red; */
    height: 38%;
    bottom: 0%;
    position: absolute;
}

.chatbot__box {
    /* background-color: blue; */
    list-style: none;
    padding: 0;
    width: 100%;
    margin: auto;
    overflow: auto;
    height: 77%;
    position: relative;
    bottom: 0%;
}

.chatbot__chat {
    display: flex;
    max-width: 95%;
    margin: auto;
}

.chatbot__chat.incoming {
    display:inline-flex !important;
    max-width: 95%;
    margin-left: 2.5% !important;
}

.chatbot__chat p {
    max-width: 75%;
    background-color: rgba(227, 227, 227, .9);
    margin-bottom: 1em;
    padding: 1em;
}

.chatbot__chat.outgoing p {
    background-color: rgba(227, 227, 227, 1) !important;
}

.chatbot__chat.incoming p {
   background-color: rgb(221, 187, 187) !important;
    border-radius: 0 20px 20px 20px;
    white-space: break-spaces;
    padding-right: 5em;
}

.chatbot__chat p .url {
    word-break: break-all;
    /* Break URLs at any character */
    overflow-wrap: break-word;
    /* Ensure long URLs break within words */
    color: #E90000;
}

.chatbot__chat.incoming {
    display: flex;
    gap: 0;
    position: relative;
}

.chatbot__chat.incoming span:has(img) {
    width: auto !important;
    opacity: 1 !important;
}

.chatbot__chat.incoming > span img,
.chatbot__chat.incoming .ivybots-icon {
    background-color: #E90000;
    border-radius: 50%;
    padding: .2em .2em .1em;
    width: 25px !important;
}


.chatbot__chat.incoming p {
    margin-top: .2em;
}

.chatbot__chat.outgoing {
    justify-content: flex-end;
}

.chatbot__chat.outgoing p {
    border-radius: 20px 0 20px 20px;
}

.chatbot__input_box {
    /* background-color: pink; */
    margin: auto;
    position: relative;
    width: 90%;
}

.audio-toggle {
    display: flex;
    align-items: end;
    justify-content: end;
    position: absolute;
    bottom: -20px;
    width: 100%;
}

.audio-toggle img {
    width: 25px !important;
    height: 25px !important;
    object-fit: contain !important;
    background-color: transparent !important;
    cursor: pointer
}


.mic-guide {
    position: absolute;
    bottom: -60%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    display: none;
}

.mic-guide p {
    display: flex;
    gap: .5em;
    justify-content: center;
    align-items: center;
}

.mic-guide p {
    color: #fff;
}

.mic-guide img {
    width: 12px;
}

.chatbot__input_inner {
    background-color: transparent;
    display: flex;
    position: relative;
}

.chatbot_inner_1 {
    display: flex;
    width: 100%;
    background-color: #E3E3E3;
    border-radius: 20px;
    overflow: hidden;
}


.plus-icon {
    width: 20px;
    display: flex;
    justify-content: center;
    margin: 0 .5em;
    cursor: pointer;
    display: none;
}

.plus-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.plus-content {
    /*     display: none; */
    position: absolute;
    background-color: #fff;
    top: -60%;
    left: 0;
    z-index: 99;
}

.chatbot_inner_2 {
    display: flex;
    width: 50px;
    justify-content: end !important;
    align-items: center;
}

.startRecord.on-bar {
    background-color: #e90000;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
}

.startRecord.on-bar img {
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
}

.stopRecord.on-bar {
    background-color: #E90000;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
}

.stopRecord.on-bar img {
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
}

.stopRecord.loading:after {
    content: "";
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: #fff;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    animation: donut-spin 2s linear infinite;
    position: absolute;
    top: -5%;
    left: -5%;
}

.startRecord.outside {
    transition: .5s;
    position: relative;
    cursor: pointer;
}

.stopRecord.outside {
    transition: .5s;
    position: relative;
    cursor: pointer;
}

.stopRecord.outside.loading-bigger:after {
    content: "";
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: #fff;
    border-radius: 50%;
    width: 32%;
    height: 45%;
    animation: donut-spin 2s linear infinite;
    position: absolute;
    top: 25%;
    left: 33%;
    z-index: 1;
}

@keyframes donut-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


#startVoice.holding {
    background-color: #E90000 !important;
}

#startVoice img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

#send-btn {
    width: 40px !important;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #E90000;
    cursor: pointer;
    border-radius: 50%;
}

#send-btn img {
    width: 50%;
    height: 50%;
    object-fit: contain;
}


.text-container {
    width: 100% !important;
    position: relative;
    padding-left: 1em;
}

.text-container .chatbot__textarea {
    margin-bottom: -.3em;
    border: 0;
    max-height: 200px;
    width: 100% !important;
    padding: .8em 0 .5em !important;
    height: 25px !important;
    outline: none;
    resize: none;
    background-color: #E3E3E3;
    /* font-family: "Barlow", serif; */
    font-family: "Avenir Book" !important;
    font-size: clamp(.9rem, .9vw, 1rem) !important;
    font-weight: 400 !important;
}

/* .chatbot__textarea::placeholder {
    font-family: "Barlow", serif;
} */

.voice-timer {
    display: flex;
    position: absolute;
    top: 0;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    background-color: #E3E3E3;
    /* width: 95%; */
    width: 90%;
    right: auto;
    left: 50%;
    padding-left: .5em;
    /* transform: translatex(-52%); */
    transform: translatex(-50%);
}

/* .voice-timer p:first-child{
    display: none;
} */

.voice-timer p {
    color: #6d6d6d;
}

/* ==================== AR INTO ANIMATION ==================== */
.ar-into-animation {
    /*     background-color: red; */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.protein-stamp {
    position: absolute;
    width: min(120px, 100%);
    top: 8.5%;
    right: 2.5%;
}

.protein-stamp img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ---------- GADGET CONTAINER ---------- */
/* make side by side */
.gadget-container {
    /*     background-color: red; */
    width: 90%;
    position: absolute;
    bottom: 7%;
    left: 50%;
    transform: translatex(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1em;
    z-index: 3;
}

/* custom width */
.gadget-container .gadget-item {
    width: 25%;
    text-align: center;
    transition: transform 0.5s;
}

/* image sizes */
.gadget-container .gadget-item img {
    /* width: 20vw; */
    width: 25vw;
    max-width: 100px;
    cursor: pointer;
}

.with-glow {
    transition: transform 0.5s;
}

.animation-select {
    transform: scale(1.5) rotate(30deg);
    transition: transform 0.5s;
}

/* tap to learn more design */
.tap-to-learn-container {
    /*     background-color: red; */
    position: absolute;
    bottom: 1.5%;
    left: 50%;
    transform: translatex(-50%);
    width: 95%;
}

.tap-to-learn-container h2 {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #E90000;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}



/* ==================== ANIMATIONS ==================== */
/* ---------- SPRITE ANIMATION ---------- */
.ai-animation {
    position: absolute;
    /*     background-color: red; */
    height: 250px;
    width: 200px;
    left: 30%;
    top: 10%;
    transform: translatex(-50%);
}

/* SPRITE ANIMATION STYLE 2 */
.sprite-animation {
    background: url(assets/Media/AiSprite/IntroSprite1.webp);
    background-size: 1600% 1100%;
    width: 100%;
    /* This is 100%/16 */
    height: 100%;
    /* This is 100%/11 */
}

.sprite-animation.animate-sprite {
    animation: bear-idleX 0.5s steps(16) infinite,
        bear-idleY 5.5s steps(11) infinite;
}


@keyframes bear-idleX {
    0% {
        background-position-x: 0;
    }

    100% {
        background-position-x: -1600%;
    }
}

@keyframes bear-idleY {
    0% {
        background-position-y: 0;
    }

    100% {
        background-position-y: -1100%;
    }
}

/* ---------- PNG SEQUENCE ---------- */
/* ========== AI ========== */
/* .animation-sequence-container {
    position: absolute;
    top: 15vw;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
} */

.animation-sequence-container {
    /*     background-color: pink; */
    position: absolute;
    /* top: 50px; */
    top: 80px;
    bottom: auto;
    left: 50%;
    /* transform: translate(-50%, -50%); */
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.name-title {
    width: min(500px, 80%);
}

/* .animation-sequence-container h1 {
    font-size: clamp(1.3rem, 1.7vw, 1.6rem) !important;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    width: 95%;
    color: #E90000;
} */

.iam-ai {
    width: min(400px, 70%);
    text-align: center;
}

.png-sequence-ai-1 {
    position: relative;
    /* width: 70vw !important;
    height: 70vw !important;
    max-height: 330px;
    max-width: 330px; */
    max-width: 400px !important;
    max-height: 400px !important;
    width: 80vw !important;
    height: 80vw !important;
    top: -30px;
}

.png-frame-ai {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top:15vh !important;
}

.png-frame-ai img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensures image scales correctly */
    position: absolute;
    left: 0;
    transform: scale(1);
}

.temp-button {
    top: 0%;
    left: 50%;
    transform: translatex(-50%);
    position: absolute;
    z-index: 999 !important;
    /* opacity: 0; */
}


/* WITH AI CHAT */
.ai-chat.with-chat {
    background-image: url(assets/reg-bg.webp);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

}

.animation-sequence-container.with-chat {
    display: none !important;
}

.animation-sequence-container.with-chat .png-sequence-ai-1 {
    height: 30vw !important;
    top:-20px;
}

.chatbot-content.with-chat {
    height: 100%;
}

.chatbot__box.with-chat {
    height: 91.5%;
}

.chatbot__box.with-chat .chatbot__chat.incoming p {
    background-color: rgb(221, 187, 187) !important;
    width: 100%;
    max-width: 100%;
    margin-top: .2em;
    margin-bottom: .5em;
    padding-top: .2em;
    padding-left: 1em;
    padding-right: 2em;
    padding-bottom: .5em;
}

.chatbot-content.with-chat .chatbot__chat.outgoing{
    margin-top: 4em !important;
}

/* ========== AR ========== */

.ar-animation-sequence-container {
    /*     background-color: pink; */
    position: absolute;
    /* top: 35%; */
    /* top: -20px; */
    top: 0;
    left: 50%;
    /* transform: translate(-50%, -50%); */
    transform: translateX(-50%);
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.png-sequence-ar {
    /*     background-color: lightblue */
    position: absolute;
    /* height: 340px;
        width: 340px; */
    width: 105vw;
    height: 105vw;
    max-height: 650px;
    max-width: 650px;
    /* margin-left: 5%; */
    /* transform: scale(1.15); */
    top: 42%;
    transform: translatey(-50%);
}

.png-frame-ar {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.png-frame-ar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
}

.png-frame-ar.idle {
    position: relative;
    top: -10%;
}

.png-frame-ar.flex {
    position: relative;
    top: -10%;
}

.png-frame-ar.bag {
    position: relative;
    top: -3%;
    transform: scale(1.05);
}

@keyframes popAnimation {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.pop-item {
    animation: popAnimation .2s linear;
}

/* AR POPUP */
.shop-now-popup {
    background-image: url(assets/IVYBEARS\ PROTEIN\ Promo.webp);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 9999;
    transition: opacity 0.5s;
}

.close-popup {
    background-color: #fff;
    width: 15px;
    height: 15px;
    padding: .8em .7em .7em .8em !important;
    border-radius: 50%;
    cursor: pointer;
    position: absolute;
    top: 2%;
    right: 2%;
}

.close-popup img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shop-now-inner {
    background-color: rgba(255, 255, 255, .9);
    width: min(500px, 70%);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 20px;
    padding: 1em 2em;
    text-align: center;
}

.protein-site {
    display: block;
    position: absolute;
    width: 100% !important;
    height: 90% !important;
    bottom: 0 !important;
    left: 0;
}

.shop-now-popup a img {
    width: 100%;
    object-fit: contain;
}

.loading-container {
    width: 90%;
    /* background-color: #fff; */
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.loading-box {
    background-color: rgba(255, 255, 255, .5);
    border-radius: 20px;
    overflow: hidden;
}

#loading-bar {
    height: 20px;
    background-color: #E90000 !important;
    transition: width 0.2s ease;
}

#loading-text {
    color: #fff !important;
    margin-top: 1em;
    font-weight: 400 !important;
}



   /* Product Recommendation Styles */
   .product-image-card {
          width: 100%;
          max-width: 300px; /* Slightly wider */
          margin: 15px 0;
          border-radius: 12px;
          overflow: hidden;
          background: #fff;
          box-shadow: 0 4px 15px rgba(0,0,0,0.15);
          display: flex !important;
          justify-content: center !important;
          align-items: center !important;
          min-height: 250px !important; /* Increased minimum height */
      }
   
      /* Use more specific selector to override global chat img styles */
      .chatbot__chat.incoming .product-image-card img {
          width: 100% !important;
          height: auto !important;
          min-width: 100% !important; /* Force it to take full width */
          min-height: 250px !important; /* Force a large minimum height */
          display: block !important;
          object-fit: contain !important; /* Back to contain for better product visibility, but forced large */
          border-radius: 0 !important;
          padding: 5px !important; 
          background-color: transparent !important;
          margin: 0 auto !important;
          transform: scale(1.1); /* Slightly scale up to fill space better */
      }

/* ==================== LEGAL & AI NOTICES FOOTER (ISS-04) ==================== */
.ivybears-legal-footer {
    width: 100%;
    margin-top: 6px;
    padding-bottom: 4px;
    text-align: center;
    font-size: 11px;
    line-height: 1.3;
    color: #888888;
    z-index: 5;
    pointer-events: auto;
}

.ivybears-legal-footer .footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.ivybears-legal-footer .footer-links a {
    color: #666666;
    text-decoration: none;
    font-size: 11px;
    transition: color 0.2s ease;
}

.ivybears-legal-footer .footer-links a:hover {
    color: #EC008C;
    text-decoration: underline;
}

.ivybears-legal-footer .footer-sep {
    color: #bbbbbb;
    font-size: 9px;
}

.ivybears-legal-footer .footer-disclaimer {
    margin: 3px 0 0;
    font-size: 10px;
    color: #999999;
}

/* ==================== TOAST NOTIFICATION BANNER (ISS-01 & ISS-06) ==================== */
.ivybears-toast-notification {
    display: none;
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #ffffff;
    color: #222222;
    border-radius: 12px;
    border: 1px solid #ffccd5;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
    padding: 14px 20px;
    z-index: 999999 !important;
    max-width: 90vw;
    width: 440px;
    box-sizing: border-box;
    align-items: center;
    gap: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto !important;
}

.ivybears-toast-notification.show {
    display: flex !important;
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
}

.ivybears-toast-notification.error {
    border-left: 6px solid #EC008C;
}

.ivybears-toast-notification.info {
    border-left: 6px solid #28a745;
}

.ivybears-toast-notification .toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ivybears-toast-notification .toast-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.ivybears-toast-notification .toast-body strong {
    font-size: 14px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 2px;
}

.ivybears-toast-notification .toast-body span {
    font-size: 12px;
    line-height: 1.4;
    color: #444444;
}

.ivybears-toast-notification .toast-dismiss {
    background: transparent;
    border: none;
    font-size: 22px;
    color: #888888;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}

.ivybears-toast-notification .toast-dismiss:hover {
    color: #222222;
}

/* Root cause fix: Prevent empty chatbox from intercepting clicks */
.chatbot__box.op-0 {
    pointer-events: none !important;
}

/* Sound toggle interaction priority */
.sound-toggle-container {
    z-index: 10005 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.sound-toggle-container * {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.sound-toggle {
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: transform 0.2s ease;
}

.sound-toggle:hover {
    transform: scale(1.15);
}

/* ==================== PHASE 2B: ASSISTANT INTRO BANNER (ISS-11) ==================== */
.assistant-intro-banner {
    text-align: center;
    margin-bottom: 8px;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    width: 90%;
    max-width: 580px;
}

.assistant-headline {
    font-size: clamp(1.25rem, 1.8vw, 1.6rem) !important;
    font-weight: 700 !important;
    color: #E90000 !important;
    margin: 0 0 4px 0 !important;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
    letter-spacing: -0.02em;
}

.assistant-subline {
    font-size: clamp(0.85rem, 1.05vw, 0.95rem) !important;
    color: #444444 !important;
    margin: 0 auto !important;
    line-height: 1.4 !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.ai-chat.with-chat .assistant-intro-banner,
.with-chat .assistant-intro-banner {
    display: none !important;
}

/* ==================== PHASE 2B: CHAT THREAD READABILITY & TYPOGRAPHY (ISS-13) ==================== */
.chatbot__box {
    max-width: 720px !important;
    margin: 0 auto !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
}

.chatbot__chat {
    max-width: 100% !important;
    margin: 6px 0 !important;
}

.chatbot__chat p {
    font-size: 15px !important;
    line-height: 1.55 !important;
    letter-spacing: -0.01em;
    padding: 12px 18px !important;
    margin: 4px 0 !important;
    box-sizing: border-box;
    word-break: break-word;
    border-radius: 16px !important;
}

.chatbot__chat.outgoing {
    justify-content: flex-end !important;
}

.chatbot__chat.outgoing p {
    background-color: #E90000 !important;
    color: #ffffff !important;
    border-radius: 16px 16px 4px 16px !important;
    font-weight: 500 !important;
    max-width: 82% !important;
    box-shadow: 0 2px 8px rgba(236, 0, 140, 0.2);
}

.chatbot__chat.incoming {
    justify-content: flex-start !important;
}

.chatbot__chat.incoming p {
    background-color: #f7f3f6 !important;
    color: #1a1a1a !important;
    border: 1px solid #ebdce6 !important;
    border-radius: 16px 16px 16px 4px !important;
    max-width: 88% !important;
    padding-right: 1.5em !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ==================== PHASE 2B: PRODUCT CARDS & LINKS (ISS-14 & ISS-15) ==================== */
.product-recommendation-card {
    background: #ffffff;
    border: 1px solid #eedde7;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 12px 0 6px;
    max-width: 310px;
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-recommendation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-card-image-wrap {
    width: 100%;
    height: 180px;
    background: #fdf5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-card-image-wrap::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, #fbf0f6 0%, #f4e2ee 50%, #fbf0f6 100%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    z-index: 1;
}

@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.product-card-image-wrap::before {
    display: none !important;
}

.chatbot__chat.incoming .product-recommendation-card img.product-card-image,
.product-recommendation-card .product-card-image,
.product-card-image {
    width: auto !important;
    max-width: 90% !important;
    height: 155px !important;
    max-height: 165px !important;
    min-height: 120px !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    position: relative;
    z-index: 2;
}

.product-card-info {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-card-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: #E90000;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.product-card-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.product-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 2px 0 4px;
}

.product-card-price {
    font-size: 14.5px;
    font-weight: 700;
    color: #E90000;
}

.product-card-vat {
    font-size: 10.5px;
    color: #777777;
}

.product-card-meta {
    font-size: 11px;
    line-height: 1.35;
    color: #444444;
    margin: 1px 0;
}

.product-card-btn {
    display: block;
    text-align: center;
    background: #E90000;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 20px;
    text-decoration: none;
    margin-top: 8px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.product-card-btn:hover {
    background: #c20000;
    transform: translateY(-1px);
    color: #ffffff !important;
}

.product-link {
    color: #E90000 !important;
    font-weight: 600;
    text-decoration: underline;
}



/* ==================== PHASE 2C: NEW CHAT & MODAL (ISS-16) ==================== */
.new-chat-btn {
    position: absolute;
    right: 3%;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border: 1.5px solid #E90000;
    color: #E90000;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(233, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 100;
}

.new-chat-btn:hover {
    background: #E90000;
    color: #ffffff;
}

.new-chat-btn svg {
    stroke: currentColor;
}

.ivybears-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.ivybears-modal-dialog {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 22px 20px;
    max-width: 350px;
    width: 88%;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    text-align: center;
    animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.modal-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.modal-desc {
    margin: 0 0 20px;
    font-size: 14px;
    color: #555555;
    line-height: 1.45;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.1s ease, background 0.2s ease;
}

.modal-btn:active {
    transform: scale(0.97);
}

.modal-btn-cancel {
    background: #f0f0f0;
    color: #333333;
}

.modal-btn-cancel:hover {
    background: #e4e4e4;
}

.modal-btn-confirm {
    background: #E90000;
    color: #ffffff;
}

.modal-btn-confirm:hover {
    background: #c40000;
}

/* ==================== PHASE 2C: MOBILE VIEWPORT & CONTROLS (ISS-17) ==================== */
@media (max-width: 768px) {
    .animation-sequence-container {
        top: 68px !important;
    }

    .png-sequence-ai-1 {
        max-height: 25vh !important;
        max-width: 25vh !important;
        width: 46vw !important;
        height: 46vw !important;
        top: 0 !important;
        margin: 0 auto !important;
    }

    .assistant-intro-banner {
        padding: 0 12px 2px !important;
        margin-bottom: 2px !important;
    }

    .assistant-headline {
        font-size: 16.5px !important;
        margin-bottom: 2px !important;
        line-height: 1.25 !important;
    }

    .assistant-subline {
        font-size: 12px !important;
        margin-bottom: 0 !important;
        line-height: 1.3 !important;
    }

    /* Sound toggle in top right on mobile so it never collides with chips */
    .sound-toggle-container {
        position: absolute !important;
        top: 68px !important;
        right: 14px !important;
        bottom: auto !important;
        left: auto !important;
        margin: 0 !important;
        z-index: 10005 !important;
    }

    /* Vertical Suggestions Layout on Mobile - Sit directly above search bar (Phase 2C enhancement) */
    .ai-chat:not(.with-chat) .suggestions-all:not(.d-none),
    .suggestions-all:not(.with-chat):not(.d-none) {
        position: absolute !important;
        top: auto !important;
        bottom: 86px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 92% !important;
        max-width: 440px !important;
        max-height: 48vh !important;
        z-index: 10 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .ai-chat:not(.with-chat) .suggestions-slider:not(.d-none),
    .suggestions-slider:not(.with-chat):not(.d-none) {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        width: 100% !important;
        max-height: 48vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        padding: 2px !important;
    }

    .suggestions-slider .slick-list,
    .suggestions-slider .slick-track {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        width: 100% !important;
        transform: none !important;
        height: auto !important;
    }

    .suggestions-slider .slick-slide {
        width: 100% !important;
        margin: 0 !important;
        max-width: 100% !important;
        display: block !important;
        float: none !important;
    }

    .suggestions-box {
        width: 100% !important;
        box-sizing: border-box !important;
        background: #ffffff !important;
        border: 1.5px solid #f0d5d8 !important;
        border-radius: 12px !important;
        padding: 8px 12px !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
        cursor: pointer !important;
        text-align: left !important;
        transition: transform 0.15s ease, background 0.15s ease !important;
    }

    .suggestions-box:active {
        transform: scale(0.98) !important;
        background: #fdf2f2 !important;
    }

    .suggestions-text p {
        font-size: 13px !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        color: #222222 !important;
        font-weight: 500 !important;
    }

    .text-container .chatbot__textarea,
    .chatbot__textarea {
        font-size: 16px !important;
    }

    .chatbot__input_box {
        padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
        width: 94% !important;
    }
}

/* ==================== PHASE 3: SHARED DESIGN TOKENS (ISS-23, ISS-20, ISS-19) ==================== */
:root {
    --ib-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ib-radius-bubble-incoming: 4px 18px 18px 18px;
    --ib-radius-bubble-outgoing: 18px 4px 18px 18px;
    --ib-radius-card: 16px;
    --ib-radius-pill: 24px;
    --ib-spacing-unit: 8px;
    --ib-text-dark: #1a1a1a;
    --ib-text-muted: #555555;
    --ib-primary: #E90000;
    --ib-primary-hover: #c40000;
    --ib-primary-subtle: #fdf2f2;
    --ib-border-subtle: #ebd4d8;
}

.chatbot__box.with-chat .chatbot__chat.incoming p,
.chatbot__box .chatbot__chat.incoming p,
.chatbot__chat.incoming p {
    border-radius: var(--ib-radius-bubble-incoming) !important;
    background: #ffffff !important;
    color: var(--ib-text-dark) !important;
    border: 1px solid var(--ib-border-subtle) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    font-family: var(--ib-font-family) !important;
}

.chatbot__box.with-chat .chatbot__chat.outgoing p,
.chatbot__box .chatbot__chat.outgoing p,
.chatbot__chat.outgoing p {
    border-radius: var(--ib-radius-bubble-outgoing) !important;
    background: var(--ib-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(233, 0, 0, 0.15) !important;
    font-family: var(--ib-font-family) !important;
}

/* Universal: In chat mode or d-none, chips MUST NEVER display on any screen */
.ai-chat.with-chat .suggestions-all,
.with-chat .suggestions-all,
.ai-chat.with-chat .suggestions-slider,
.with-chat .suggestions-slider,
.suggestions-all.d-none,
.suggestions-slider.d-none,
.suggestions-all.with-chat {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    z-index: -9999 !important;
}

@media (max-width: 768px) {
    .with-chat .suggestions-all,
    .with-chat .suggestions-slider,
    .suggestions-all.d-none,
    .suggestions-slider.d-none {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        pointer-events: none !important;
    }
}
