body {
    overflow: hidden !important;
    cursor: default;
}

.special-popover {
    max-width: 40vw !important;
}

#pane1 {
    flex: 2;
}

#pane2 {
    flex: 5;
}

.position-relative {
    position: relative;
}

.absolute-right {
    position: absolute;
    right: 0;
}

#pane1-activity {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2%;
    overflow-x: hidden;
}

.padding-3 {
    padding: 3%;
}

#pane2-activity {
    width: 100%;
    padding: 2%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#instruction {
    font-weight: bold;
}

#main-left-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #F1F5F9;
    border: 1px solid #D3DBE4;
    box-shadow: 0px 4px 24px 0px #18181C0A;
    padding: 4%;
    border-radius: 12px;
}

.data-set-container {
    display: flex;
    gap: 0.5em;
    flex-direction: column;
}

.left-pane-header {
    color: #808B9A;
    font-size: 14px;
}

#bag-container {
    height: 100%;
    width: 100%;
    display: grid;
    min-height: 55px;
    grid-template-columns: repeat(auto-fit, 50px);
    grid-auto-rows: 55px;
    gap: 8px;
}

#counter-container {
    margin-top: 3%;
    padding-top: 3%;
    border-top: 2px solid;
    border-image: repeating-linear-gradient(90deg, #D3DBE4 0 7px, transparent 7px 14px) 1;
}

#counters {
    display: flex;
    justify-content: space-around;
    margin-top: 0.25em;
}

#accuracy-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5em;
    gap: 8px;
    border-radius: 10px;
    padding: 4px;
}

#accuracy-container.pulse {
    --pulse-color: #48A2DF;
    --pulse-glow: rgba(72, 162, 223, 0.4);
    --pulse-glow-strong: rgba(72, 162, 223, 0.5);
    --pulse-light: color-mix(in srgb, #48A2DF 70%, white);

    border: 3px solid var(--pulse-color);
    border-radius: 10px;
    animation: accuracyGrabAttention 1s ease-out infinite,
        accuracyPulseContinuous 2s ease-in-out infinite 1s;
}

@keyframes accuracyGrabAttention {
    0% {
        box-shadow: 0 0 0 0 var(--pulse-glow);
    }

    40% {
        box-shadow: 0 0 25px 10px var(--pulse-glow-strong);
    }

    100% {
        box-shadow: 0 0 0 0 var(--pulse-glow);
    }
}

@keyframes accuracyPulseContinuous {

    0%,
    100% {
        border-color: var(--pulse-color);
    }

    50% {
        border-color: var(--pulse-light);
    }
}

#accuracy-text-container {
    width: fit-content;
    padding-inline: 10px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    padding-block: 4px;
    gap: 8px;
    color: #808B9A;
}

#accuracy-text {
    background: #FFFFFF;
    color: #6B7481;
    border: 1px solid #D3DBE4;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
    min-width: 40px;
    padding-inline: 6px;
}

.prediction-counter {
    display: flex;
    gap: 0.75em;
    align-items: center;
    padding: 1%;
}

.prediction-counter.pulse {
    --pulse-color: #35B86A;
    --pulse-glow: rgba(53, 184, 106, 0.6);
    --pulse-glow-strong: rgba(53, 184, 106, 0.7);
    --pulse-light: color-mix(in srgb, var(--pulse-color) 70%, white);

    position: relative;
    border: 3px solid var(--pulse-color);
    border-radius: 10px;
    animation: grabAttention 1s ease-out infinite,
        pulseContinuous 2s ease-in-out infinite 1s;
}

@keyframes grabAttention {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 var(--pulse-glow);
    }

    40% {
        transform: scale(1.2);
        box-shadow: 0 0 25px 10px var(--pulse-glow-strong);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 var(--pulse-glow);
    }
}

@keyframes pulseContinuous {

    0%,
    100% {
        border-color: var(--pulse-color);
    }

    50% {
        border-color: var(--pulse-light);
    }
}

.counter-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;

    svg {
        width: 35px;
        height: 40px;
    }

    span {
        font-size: 14px;
    }
}

.tick-icon-container svg {
    width: 60px;
    height: 60px;
}

#drop-section {
    display: flex;
    width: 100%;
    justify-content: center;
    height: 60%;
    gap: 5%;
    min-height: 200px;
}

.drop-container {
    width: 40%;
    position: relative;
    position: relative;
    border: 4px solid #48A2DF;
    background: #0C3755;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.drop-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, 50px);
    grid-auto-rows: 55px;
    justify-content: start;
    align-content: start;
    gap: 8px;
    width: 100%;
    height: 100%;
    padding-inline: 2%;
    padding-top: 25px;
    margin-bottom: 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.drop-container.disabled {
    border: 4px solid #BCC3CC;
    background: #EBF0F5;
    cursor: not-allowed;
}

#robot-drop-area {
    width: 12%;
    min-width: 100px;
    min-height: 85px;
    position: absolute;
    transform: translateX(-120%);
    display: flex;
    flex-direction: column;
    place-items: center;
    padding: 1%;
    margin-bottom: 0;
    justify-content: center;
    overflow: visible;
}

#robot-drop-area.disabled {
    border: 4px solid #BCC3CC;
    background: #717579;
    cursor: not-allowed;
}

#robot-drop-area-text {
    color: white;
    font-size: 10px;
}

.food-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #CFE1E1;
    border-radius: 8px;
    padding: 1%;
    background: #ffffff;
    box-shadow: 0px 4px 0px 0px #CFE1E1;
    transform: translateY(-2.5px);
    cursor: grab;
    padding: 10%;
    position: relative;
}

.food-item-label {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 4px;
}

.food-item:active .food-item-label {
    display: block;
}

.food-item-icon {
    min-width: 0;
}

.food-item:active {
    cursor: grabbing;
}

.drop-area-label {
    display: flex;
    height: 10%;
    background: #ffffff;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    align-items: center;
    justify-content: center;
    padding: 5% 4%;
    border: 4px solid #48A2DF;
    font-weight: bold;
    white-space: nowrap;
    z-index: 10;
}

.drop-area-label.disabled {
    border: 4px solid #BCC3CC;
    color: #6B7481;
}

#robot {
    position: relative;
    display: flex;
    justify-content: center;
}

#robot-chat {
    position: absolute;
    transform: translate(65%, -65%);
}

#robot-chat.thinking-bubble {
    transform: translate(100%, -65%) !important;
}

#robot-chat.thinking-bubble svg {
    width: fit-content !important;
}

#robot-chat-icon .dot1,
#robot-chat-icon .dot2,
#robot-chat-icon .dot3 {
    animation: dotBlink 1.5s infinite ease-in-out;
    transform-origin: center;
}

/* add delay so they blink in sequence */
#robot-chat-icon .dot1 {
    animation-delay: 0s;
}

#robot-chat-icon .dot2 {
    animation-delay: 0.3s;
}

#robot-chat-icon .dot3 {
    animation-delay: 0.6s;
}

@keyframes dotBlink {

    0%,
    80%,
    100% {
        opacity: 0.2;
        transform: scale(1);
    }

    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

#main-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#button-container {
    display: flex;
    justify-content: center;
}

#robot-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-inline: 15px;
    font-size: clamp(8px, 1.2vw, 14px);
}

#robot-text::after {
    content: "";
}

#robot-text.reveal {
    animation: textPulse 3s ease;
}

@keyframes textPulse {
    0% {
        opacity: 0;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.25);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

#robot-chat-icon {
    position: relative;
    display: block;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.thinking::after {
    display: inline-block;
    animation: dots 1s steps(4, end) infinite 0.5s;
}

@keyframes dots {
    0% {
        content: "";
    }

    25% {
        content: ".";
    }

    50% {
        content: "..";
    }

    75% {
        content: "...";
    }

    100% {
        content: "";
    }
}

#robot-chat-icon svg {
    width: 180px;
}

.hidden {
    display: none !important;
}

.hidden-smoothly {
    opacity: 0 !important;
    transform: translateY(10px) !important;
    pointer-events: none !important;
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}

#bottom-flap {
    transform-origin: top center;
    transform: rotateX(0deg);
    backface-visibility: hidden;
    transition: transform 0.5s ease-in-out;
}

#bottom-flap.flip {
    filter: brightness(0.9);
    animation: flipDown 0.5s ease-in-out forwards;
}

@keyframes flipDown {
    0% {
        transform: rotateX(0deg);
    }

    100% {
        transform: rotateX(-90deg);
    }
}

#count-container {
    padding: 2%;
    border-bottom: 2px solid;
    border-image: repeating-linear-gradient(90deg, #0B66A3 0 7px, transparent 7px 14px) 1;
}

#count-text-container {
    background: #48A2DF;
    border-radius: 999px;
    width: fit-content;
    padding-inline: 10px;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    padding-block: 3px;
    gap: 5px;
}

#count-text {
    background: #FFFFFF;
    color: #6B7481;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    background: #FFFFFF;
    color: #6B7481;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
}

#robot-text.intro::after {
    content: " ✋";
    display: inline-block;
    animation: wave 1s infinite ease-in-out;
    transform-origin: 70% 70%;
}

.food-item.error {
    animation: shake 0.35s ease-in-out;
}

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }

    60% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-4px);
    }

    30% {
        transform: translateX(4px);
    }

    45% {
        transform: translateX(-4px);
    }

    60% {
        transform: translateX(4px);
    }

    75% {
        transform: translateX(-2px);
    }

    100% {
        transform: translateX(0);
    }
}

.food-item.picking {
    animation: pickFromBag 1s ease forwards;
}

@keyframes pickFromBag {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    40% {
        opacity: 1;
        transform: scale(1.2) translateY(-10px);
    }

    100% {
        opacity: 0;
        transform: scale(0.5) translateY(-30px);
    }
}

@keyframes pulseEffect {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.pulse {
    animation: pulseEffect 1.5s infinite;
}

@media (max-height: 700px) {
    [class*="modal-title-"] {
        font-size: 18px;
    }
}

@media (max-height: 700px) {
    .modal-message {
        font-size: 14px;
    }
}

#floating-drag-item {
    position: fixed;
    pointer-events: none;
    display: none;
    z-index: 1000;
    opacity: 0.8;
    width: 50px;
    height: 50px;
    overflow: visible;
    transform: none;
    padding: 5px;
}

#floating-drag-item .food-item-icon {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#floating-drag-item .food-item-label {
    display: block;
}

.drop-area.drag-over {
    background: rgba(72, 162, 223, 0.3);
    box-shadow: inset 0 0 10px rgba(72, 162, 223, 0.4);
}

#mcq-avatar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

#mcq-avatar-label {
    font-size: 12px;
    font-weight: 600;
    color: #808B9A;
}

#mbot-chat {
    position: absolute;
    right: 0;
    top: 0;
    transform: translate(101%, -20%);
}

#mbot-chat-icon {
    position: relative;
    display: block;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

#mbot-chat-icon svg {
    width: 210px;
}

#mbot-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-align: center;
    word-wrap: break-word;
    padding: 5px 15px;
    left: 15px;
}

.mcq-image-wrapper {
    position: relative;
    display: inline-flex;
    flex: 1 1 250px;
    max-width: 80%;
    min-width: 0;
    justify-content: center;
}

.mcq-image-wrapper>img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    min-width: 0;
}

.mcq-fullscreen-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.mcq-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.mcq-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.mcq-fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.mcq-fullscreen-close {
    position: absolute;
    top: 9%;
    right: 9%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcq-fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 1150px) {
    #counters {
        flex-direction: column;
    }
}