.terminal-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--popup-background-color);
    width: 100%;
    border-top: 1px solid var(--popup-border-color);
    border-bottom: 1px solid var(--popup-border-color);
    border-radius: 2px;
    overflow: hidden;
    z-index: 107;
    box-shadow: 0px -10px 15px -6px var(--box-shadow-color);
    transition: opacity 0.5s ease-in-out;

    .terminal-title-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 2px 16px;
        background-color: var(--primary-color);
        cursor: row-resize;
        touch-action: none;
        border-bottom: 1px solid var(--popup-border-color);
        height: 48px;

        .left-section,
        .btn-section {
            display: flex;
            align-items: center;
        }

        .session-info {
            display: flex;
            align-items: center;
            gap: 12px;

            .pointer-indicator {
                width: 8px;
                height: 8px;
                background-color: var(--button-background-color);
                border-radius: 50%;
                box-shadow: 0 0 8px var(--button-background-color);
            }

            .session-name {
                font-size: 14px;
                font-weight: 600;
                color: var(--primary-text-color);
            }
        }

        .action-button {
            background: none;
            border: none;
            color: var(--primary-text-color);
            cursor: pointer;
            padding: 5px;
            margin: 0 2px;
            font-size: 20px;
            border-radius: 4px;
            transition: background-color 0.2s ease;

            &:active {
                background-color: var(--active-icon-color);
            }

            svg {
                width: 18px;
                height: 18px;
            }
        }

        .search-input-container {
            display: none;
            align-items: center;
            border-radius: 4px;
            margin-left: 8px;
            background: var(--popup-background-color);

            input {
                background: none;
                border: none;
                color: var(--primary-text-color);
                padding: 4px 8px !important;
                font-size: 12px;
                width: 150px;
                height: 100% !important;

                &::placeholder {
                    color: var(--active-color);
                }

                &:focus {
                    outline: none;
                }
            }

            &.show {
                display: flex;
            }

            .action-button {
                padding: 6px;
            }
        }
    }

    .terminal-content {
        flex-grow: 1;
        overflow-y: auto;
        box-sizing: border-box;
        background: inherit;
        width: 100%;
    }
}

.show-terminal-btn {
    height: 35px;
    width: 35px;
    background: var(--button-background-color);
    border: none;
    outline: none;
    color: var(--primary-text-color);
    position: fixed;
    bottom: 70px;
    left: 29px;
    z-index: 115;
    border-radius: 50%;
    place-items: center;
    touch-action: none;
    box-shadow:
        rgba(0, 0, 0, 0.4) 0px 2px 4px,
        rgba(0, 0, 0, 0.3) 0px 7px 13px -3px,
        rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

.hide {
    display: none;
    opacity: 0;
}

#acodeXAiPromptBox {
    background: inherit;
    width: 100%;
    outline: none;
    padding: 5px;
    border-radius: 8px;
    color: var(--popup-text-color);
    font-size: 0.8em;
    resize: none;
    border: 1px solid var(--box-shadow-color);
}

.ai-loader-container {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    display: none;
    justify-content: center;
    align-items: center;

    .wave {
        width: 5px;
        height: 50px;
        background: linear-gradient(45deg, cyan, #fff);
        margin: 10px;
        animation: wave 1s linear infinite;
        border-radius: 20px;

        &:nth-child(2) {
            animation-delay: 0.1s;
        }

        &:nth-child(3) {
            animation-delay: 0.2s;
        }

        &:nth-child(4) {
            animation-delay: 0.3s;
        }

        &:nth-child(5) {
            animation-delay: 0.4s;
        }

        &:nth-child(6) {
            animation-delay: 0.5s;
        }

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

            50% {
                transform: scale(1);
            }

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

/********* GUI Viewer Page ************/
#acodex-gui-viewer {
    .gui-viewer-canvas {
        width: 100%;
        height: 100%;
        box-sizing: border-box;
        overflow: auto;
    }
}
