/* BOT CSS Namespace 'cb-' */
@import "./src/css/variables.scss";

#cb-container{
    ::-webkit-scrollbar {
        width: 5px;
        height: 3px;
        border-left: 0;
        background: rgba(0, 0, 0, 0.1);
    }

    ::-webkit-scrollbar-track {
        background: none;
    }

    ::-webkit-scrollbar-thumb {
        background: #6C6C6C;
        border-radius: 0;
    }

    font-size:$font-size;
    width:100%;
    height:100%;
    overflow:hidden;

    *:focus {
        outline: none;
        inline: none;
    }

    *{
        box-sizing: border-box;
    }    
}



#cb-flow {
    // position: absolute;
    // right:0;
    // top:0;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

#cb-flow > .cb-inner {
    padding-top: 100%;
    margin: 0 20px;
}

#cb-input {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    height:77px;

    #cb-input-container{
        display:block;
        margin:10px;
    }

    input {
        width:100%;
        display:block;
        box-shadow: 0 0 1px rgba(58, 58, 58, 0.5);
        border-radius: 40px;
        font-size: 1em;
        padding: 19px 60px 19px 30px;
        height: 56px;
        color: rgba(34, 34, 34, 0.6);
        border-style: none;
        transition: box-shadow 0.75s cubic-bezier(0.215, 0.61, 0.355, 1), color 0.75s cubic-bezier(0.215, 0.61, 0.355, 1), transform 375ms cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s, opacity 375ms cubic-bezier(0.215, 0.61, 0.355, 1) 0s;

        &:focus {
            box-shadow: $box-shadow-default;
        }
    }

    button {
        float:right;
        width: 30px;
        height: 30px;
        margin-top:-53px;
        margin-right:30px;
        border-width: 2px;
        border-color: $bg-light-grey;
        border-style: solid;
        border-image: none;
        background-color: $white;
        color: $bg-light-grey;
        border-radius: 100px;
        transition: background-color 0.75s cubic-bezier(0.215, 0.61, 0.355, 1);
        cursor: pointer;
    }
}

.cb-segment {
    clear: both;
}

.cb-segment.cb-bot {
    .cb-icon, .cb-bubble {
        float: left;
    }
}

.cb-segment.cb-human {
    .cb-icon, .cb-bubble-input, .bubble-ctn-human {
        float: right;
    }
}

.cb-icon {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 100px;
}

.cb-bubble.human {
    float: right;
}

.cb-bot .cb-icon {
    background: url("./assets/Icon-Robot.svg") no-repeat;
    background-position: center center;
    background-color: $svift-primary;
    margin-right: 10px;
}

.cb-human .cb-icon {
    background: url("./assets/Icon-Human.svg") no-repeat;
    background-position: 9px 9px;
    background-color: $svift-human;
    margin-left: 10px;
}

.cb-bubble {
    font-family: $font-family-bold;
    color: $text-bot;
    border-radius: 100px;
}

.cb-bubble.bot {
    background-color: $bot-bubble;
    color: $text-bot;
    border-radius: 100px;
}

.cb-bubble-type-select .cb-bubble.bot,
.cb-bubble-type-select .cb-bubble.human{
    background-color:transparent;
}

.cb-bubble > .cb-inner {
    margin: 0;
    padding: $padding-bubble-inner;
}

.cb-bubble p {
    padding: 5px;
    margin: 0;
    opacity: 0;
    display: inline;
}

.cb-segment hr {
    clear: both;
    display: blocK;
    visibility: hidden;
    width: 100%;
    margin-top: 10px;
}

.cb-bot .cb-bubble {
    border-bottom-left-radius: 0px;
}

.cb-bubble .bubble-ctn-human {
    background-color: #fff;
    border-bottom-right-radius: 0px;
    text-align: right;
    transform: translateX(0px);
    border: 3px solid $svift-human;
    border-radius: 2em;
    padding: $margin-small;
}

.cb-bubble .bubble-ctn-bot {
    padding: $margin-small;
}

.cb-waiting {
    width: 70px;
    padding: 5px;

    @keyframes wave {
        0%, 60%, 100% {
            transform: initial;
        }

        30% {
            transform: translateY(-5px);
            background: $bot-bubble-waiting-start;
        }
    }

    .circle {
        display: inline-block;
        width: 11px;
        height: 11px;
        background-color: $bot-bubble-waiting-end;
        border-radius: $border-radius-circle;
        padding: 5px;
        animation: wave 1.3s ease-in-out infinite;

        &:nth-child(1) {
            margin-left: 8px;
        }

        &:nth-child(2) {
            animation-delay: -1.1s;
            margin-left: 5px;
        }

        &:nth-child(3) {
            animation-delay: -0.9s;
            margin-left: 5px;
        }
    }
}

.cb-choice {
    flex: 1;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    border: 3px solid $svift-human;
    border-radius: 2em;
    padding: 20px;
    margin-left: 10px;
    font-family: $font-family-bold;
    transition: all 0.75s cubic-bezier(0.215, 0.61, 0.355, 1);

    &:hover, &.cb-active {
        background-color: $svift-human;
        color: #000;
        transform: translateY(3px);
    }

    &:before {
        content: '';
        display: inline-block;
        height: 0.75em;
        width: 0.7em;
        background-color: $svift-human;
        border-radius: $border-radius-circle;
        margin-right: 7px;
        transition: all 0.75s cubic-bezier(0.215, 0.61, 0.355, 1);
    }

    &:hover:before, &.cb-active:before {
        background-color: #fff;
    }
}

.cb-bubble-input {
    width: 590px;
    background-color: rgb(251, 251, 251);
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;

    input {
        cursor: pointer;
        font-family: $font-family-mono;
        padding: 10px 10px;
        color: $text-bot;
        margin: 3px 0;

        // margin: ($margin-small / 3) ($margin-small / 3) ($margin-small / 3) 0;
        border-style: none;
        border-radius: $border-radius-default;
        transition: box-shadow 0.75s cubic-bezier(0.215, 0.61, 0.355, 1), color 0.75s cubic-bezier(0.215, 0.61, 0.355, 1), transform 375ms cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s, opacity 375ms cubic-bezier(0.215, 0.61, 0.355, 1) 0s;
        background-color: $table-background;
        width: 100%;

        &:focus {
            box-shadow: $box-shadow-default;
        }

        &::placeholder {
            font-family: $font-family-mono;
            color: $text-subheading;
        }
    }

}

.disabled {
    background-color: $white;
    color: $text-disabled;
    border: $border-disabled;

    &:before {
        background-color: $text-disabled;
    }

    &:hover {
        transform: translateY(0);
        background-color: $white;
        color: $text-disabled;

        &:before {
            background-color: $text-disabled;
        }
    }
}
