@moveo-ai/web-widget
Version:
Client side library to load the moveo chat widget and connect it with your agent
700 lines (680 loc) • 13.6 kB
CSS
@keyframes animation-close {
0% {
opacity: 1;
}
50% {
transform: translateY(20px);
opacity: 0;
width: 100%;
height: 100%;
}
to {
opacity: 0;
width: 0;
height: 0;
}
}
*,
:after,
:before {
text-rendering: geometricPrecision;
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.moveo__chat__container {
display: grid;
grid-column-gap: 0;
grid-row-gap: 0;
grid-template-columns: 1fr;
grid-template-rows: 55px 3fr minmax(100px, auto);
}
.moveo__ul {
margin: 0;
padding: 0;
list-style-type: none;
}
svg ellipse,
svg path,
svg rect {
transition: all 250ms ease-out;
}
.moveo,
.moveo i {
cursor: pointer;
}
.moveo,
.moveo i.icon__size-regular {
width: 60px;
height: 60px;
}
.moveo,
.moveo i.icon__size-large {
width: 81px;
height: 80px;
}
.moveo {
display: flex;
position: fixed;
right: 20px;
bottom: 20px;
align-items: center;
justify-content: center;
transform: translateY(70px);
transition: opacity 250ms ease-out;
opacity: 0;
z-index: 2147483647;
border-radius: 12px;
color: #fff;
font-family: 'Inter', monospace;
font-size: 14px;
}
.moveo i {
position: absolute;
right: 0;
bottom: 0;
z-index: 20;
}
.moveo.moveo__expand i {
bottom: -85px;
}
.moveo .moveo__icon-online {
margin-left: 6px;
vertical-align: middle;
}
.moveo .moveo__icon-chat,
.moveo .moveo__icon-close {
position: absolute;
top: 0;
left: 0;
opacity: 0;
}
.moveo .moveo__icon-chat {
opacity: 1;
}
.moveo .moveo__icon-chat #notification {
transition: opacity 250ms ease-out;
opacity: 1;
}
.moveo.moveo__enter {
transform: translateY(0);
opacity: 1;
}
.moveo.moveo__expand {
bottom: 105px;
opacity: 1;
border-radius: 12px;
cursor: auto;
}
.moveo.size-regular {
width: 400px;
height: 650px;
}
.moveo.size-large {
width: 500px;
height: 750px;
}
.moveo :focus {
outline: 0;
}
.moveo button {
border: 0;
border-radius: 3px;
background: 0 0;
cursor: pointer;
padding: 0;
text-transform: uppercase;
color: #000;
appearance: none;
}
.moveo .button,
.moveo .moveo__dropdown li {
transition: all 250ms ease-out;
cursor: pointer;
font-size: 14px;
user-select: none;
}
.moveo .button {
margin-top: 30px;
border-radius: 12px;
padding: 12px;
min-width: 165px;
text-align: center;
line-height: 1;
}
.moveo .button:hover {
box-shadow: rgba(15, 15, 15, 0.1) 0 0 0 1px, rgba(15, 15, 15, 0.1) 0 2px 4px;
}
.moveo .moveo__bubble {
box-sizing: border-box;
position: absolute;
left: 80px;
bottom: 95px;
transform: translateX(-100%);
border-radius: 12px 12px 2px 12px;
box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05), 0px 0px 8px rgba(0, 0, 0, 0.03),
0px 30px 30px rgba(0, 0, 0, 0.02);
cursor: default;
display: inline-block;
}
.moveo .moveo__bubble.icon__size-regular {
left: 60px;
bottom: 65px;
font-size: 14px;
padding: 15px 15px;
}
.moveo .moveo__bubble.icon__size-large {
left: 80px;
bottom: 95px;
font-size: 16px;
padding: 16px 24px;
}
.moveo .moveo__bubble span {
box-sizing: border-box;
position: absolute;
top: -10px;
right: -10px;
border-radius: 100%;
box-shadow: 0 30px 30px rgba(0, 0, 0, 0.02), 0 0 8px rgba(0, 0, 0, 0.03),
0 1px 0 rgba(0, 0, 0, 0.05);
background-color: white;
cursor: pointer;
padding: 12px;
width: 10px;
height: 10px;
content: '';
display: flex;
justify-content: center;
align-items: center;
}
.moveo .moveo__bubble span svg {
position: absolute;
}
.moveo .moveo__bubble p {
margin: 0;
font-style: normal;
font-family: Inter;
font-weight: normal;
line-height: 130%;
width: max-content;
max-width: 250px;
}
.moveo .moveo__chat {
transform: translateY(20px);
transition: opacity 250ms ease-out, transform 250ms ease-out;
opacity: 0;
margin: auto;
border-radius: 12px;
width: 1px;
height: 1px;
overflow: hidden;
}
.moveo .moveo__chat.moveo__enter {
transform: translateY(0);
opacity: 1;
background: #fff;
width: 100%;
height: 100%;
}
.moveo .moveo__a-close {
animation: animation-close 500ms forwards ;
}
.moveo .moveo__header__actions {
position: absolute;
top: 14px;
right: 12px;
display: flex;
}
.moveo .moveo__header {
display: flex;
position: relative;
align-items: center;
border-radius: 12px 12px 0 0;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
box-shadow: 0 30px 30px rgba(0, 0, 0, 0.02), 0 0 8px rgba(0, 0, 0, 0.03),
0 1px 0 rgba(0, 0, 0, 0.05);
padding: 12px;
text-align: center;
line-height: 1;
color: #fff;
font-size: 20px;
}
.moveo .moveo__title {
flex-grow: 1;
line-height: 1.2;
font-size: 20px;
}
.moveo .moveo__header button {
display: block;
color: #fff;
font-size: 16px;
}
.moveo .moveo__header button svg {
display: block;
}
.moveo .moveo__action__menu {
position: relative;
}
.moveo .moveo__dropdown {
display: none;
position: absolute;
top: 35px;
right: 15px;
z-index: 10;
border-radius: 4px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
background: #fff;
padding: 8px 16px;
min-width: 150px;
}
.moveo .moveo__dropdown li {
display: flex;
margin-bottom: 14px;
line-height: 1.5;
color: #0a3451;
}
.moveo .moveo__dropdown li:hover,
.moveo .moveo__copy a:hover {
color: #1b66d6;
}
.moveo .moveo__dropdown li:hover path,
.moveo .moveo__footer .moveo__icon_upload:hover {
stroke: #1b66d6;
}
.moveo .moveo__dropdown li:last-of-type {
margin-bottom: 0;
}
.moveo .moveo__dropdown li svg {
transition: all 250ms ease-out;
margin-right: 8px;
}
.moveo .moveo__messages {
position: relative;
margin: 0;
border-radius: 4px;
background: 0 0;
padding: 24px 16px;
overflow-x: hidden;
overflow-y: scroll;
list-style: none;
}
.moveo .moveo__messages__empty {
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
background: 0 0;
padding: 0;
height: 100%;
}
.moveo .moveo__messages__empty svg {
height: auto;
}
.moveo .moveo__messages__empty p {
margin: -20px 0 0;
line-height: 1.4;
color: #8499a8;
font-size: 12px;
}
.moveo .moveo__messages::-webkit-scrollbar {
width: 6px;
}
.moveo .moveo__messages::-webkit-scrollbar-track {
border-radius: 15px;
background-color: transparent;
}
.moveo .moveo__messages::-webkit-scrollbar-thumb {
border-radius: 15px;
background-color: #e8e8e8;
}
.moveo .moveo__messages > li {
display: inline-block;
position: relative;
clear: both;
margin-bottom: 10px;
margin-top: 0px;
border-radius: 6px;
box-shadow: 0 0 0 rgba(0, 0, 0, 0.05), 0 0 8px rgba(0, 0, 0, 0.03),
0 30px 30px rgba(0, 0, 0, 0.02);
padding: 10px 12px;
max-width: 85%;
line-height: 1.45;
word-wrap: break-word;
font-size: 14px;
}
.moveo .moveo__messages li time {
position: absolute;
bottom: -8px;
left: 0;
transform: translateY(100%);
width: 100%;
letter-spacing: -0.25px;
color: #0a3451;
font-size: 11px;
}
.moveo .moveo__messages li.self {
float: right;
background-color: #1b66d6;
color: #fff;
}
.moveo .moveo__messages li.self time {
text-align: right;
}
.moveo .moveo__messages li.moveo__other {
float: left;
margin-left: 40px;
box-shadow: rgba(15, 15, 15, 0.1) 0 0 0 1px, rgba(15, 15, 15, 0.1) 0 1px 1px;
background-color: #fff;
max-width: calc(80% - 40px);
color: #0a3451;
}
.moveo .moveo__messages li.moveo__other.other--options {
margin-bottom: 20px;
}
.moveo .moveo__messages li.moveo__other .bot__image {
position: absolute;
top: 0;
left: -40px;
border-radius: 100%;
width: 32px;
height: 32px;
overflow: hidden;
}
.moveo .moveo__messages li.moveo__other.typing {
position: fixed;
bottom: 95px;
margin-bottom: 0;
box-shadow: none;
background: transparent;
}
.moveo .moveo__messages li.moveo__other .image__bubble {
display: block;
width: 100%;
max-width: 100%;
border-radius: 3px;
}
.moveo .moveo__messages li.moveo__other .video__bubble {
width: 100%;
max-width: 100%;
height: auto;
border-radius: 3px;
}
.moveo .moveo__messages li.moveo__other .audio__bubble {
display: block;
border-radius: 3px;
width: 230px;
}
.moveo .moveo__messages li.moveo__other .link__bubble {
transition: color 250ms ease-out;
text-decoration: none;
color: #1b66d6;
vertical-align: middle;
}
.moveo .moveo__messages li.moveo__other .link__bubble svg {
float: left;
margin-right: 8px;
}
.moveo .moveo__messages li.moveo__other .link__bubble:hover {
color: #3870ff;
}
.moveo .moveo__messages li.error {
float: left;
background-color: #ff5c5c;
color: #f7f8f8;
}
.moveo .moveo__messages .moveo__options {
float: right;
box-shadow: none;
padding: 0;
}
.moveo .moveo__messages .moveo__options li {
display: inline-block;
transition: all 250ms ease-out;
margin: 0 5px 10px 5px;
border-radius: 6px;
box-shadow: 0 30px 30px rgba(0, 0, 0, 0.02), 0 0 8px rgba(0, 0, 0, 0.03),
0 1px 0 rgba(0, 0, 0, 0.05);
cursor: pointer;
padding: 10px;
line-height: 1;
color: #0a3451;
font-size: 14px;
}
.moveo .moveo__messages .moveo__options ul {
text-align: right;
}
.moveo .moveo__messages .moveo__options time {
text-align: right;
}
.moveo .moveo__messages .moveo__options li:hover {
background: #1b66d6;
color: #fff;
}
.moveo .moveo__messages .moveo__options li:nth-child(even) {
margin-left: 0;
}
.moveo .moveo__messages .moveo__options li:last-of-type {
margin-bottom: 0;
margin-left: 0;
}
.moveo .moveo__footer {
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: space-between;
background: 0 0;
padding: 0 0 16px;
}
.moveo .moveo__footer .moveo__text-box {
outline: 0;
border: 0;
flex: 1;
padding: 0px 24px;
min-height: 20px;
overflow-y: auto;
line-height: 1.2;
letter-spacing: -0.25px;
word-break: break-word;
word-wrap: break-word;
color: #0a3451;
font-size: 16px;
font-weight: 400;
appearance: none;
}
.moveo .moveo__footer .footer__actions {
display: flex;
align-items: center;
}
.moveo .moveo__footer .footer__actions span {
margin-right: 14px;
}
.moveo .moveo__footer .char__counter {
line-height: 1;
letter-spacing: -0.08px;
color: rgba(10, 52, 81, 0.5);
font-size: 16px;
min-width: 30px;
pointer-events: none;
}
.moveo .moveo__footer .moveo__icon_upload {
cursor: pointer;
}
[placeholder]:empty::before {
transition: all 0.25s ease;
cursor: text;
color: #0a3451;
content: attr(placeholder);
}
.moveo .moveo__footer .moveo__text-box::-webkit-scrollbar {
width: 5px;
}
.moveo .moveo__footer .moveo__text-box::-webkit-scrollbar-track {
border-radius: 5px;
background-color: transparent;
}
.moveo .moveo__footer .moveo__text-box::-webkit-scrollbar-thumb {
border-radius: 5px;
background-color: transparent;
}
.moveo .moveo__copy {
display: block;
margin-top: 10px;
margin-bottom: 16px;
border-bottom: 1px solid #ddd;
padding-bottom: 10px;
width: 100%;
text-align: center;
}
.moveo .moveo__copy.moveo__empty {
padding-bottom: 30px;
}
.moveo .moveo__copy a {
transition: all 250ms ease-out;
margin: 0;
border: 0;
text-decoration: none;
line-height: 1;
color: rgba(10, 52, 81, 0.5);
font-size: 12px;
}
.moveo .moveo__copy a:hover svg {
fill: #1b66d6;
}
.moveo__loader {
display: flex;
align-items: center;
justify-content: space-between;
width: 40px;
}
.moveo__dot {
border-radius: 100%;
background-color: #1b66d6;
padding-bottom: 25%;
width: 25%;
overflow: hidden;
animation: Elevator 1200ms infinite;
}
.moveo__dot-1 {
animation-delay: 200ms;
}
.moveo__dot-2 {
animation-delay: 400ms;
}
.moveo__dot-3 {
animation-delay: 600ms;
}
@keyframes Elevator {
0% {
transform: translateY(0);
animation-timing-function: ease-out;
}
25% {
transform: translateY(-50%);
animation-timing-function: ease-in-out;
}
75% {
transform: translateY(50%);
animation-timing-function: ease-in;
}
100% {
transform: translateY(0);
}
}
.fadeIn-200 {
display: block ;
-webkit-animation: fade-in 200ms both;
animation: fade-in 200ms both;
}
.fadeIn-250 {
display: block ;
-webkit-animation: fade-in 250ms both;
animation: fade-in 250ms both;
}
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.fadeOut-200 {
-webkit-animation: fade-out 200ms both;
animation: fade-out 200ms both;
}
.fadeOut-250 {
-webkit-animation: fade-out 250ms both;
animation: fade-out 250ms both;
}
@-webkit-keyframes fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
#moveo__action__close {
display: none;
}
.moveo__send-message {
display: none;
}
/* low height */
@media screen and (max-height: 750px) {
.moveo.size-regular {
height: calc(100% - 120px);
}
}
@media screen and (max-height: 880px) {
.moveo.size-large {
height: calc(100% - 120px);
}
}
/* mobile */
.moveo_mobile.moveo__expand {
width: 100%;
height: 100%;
right: 0;
bottom: 0;
border-radius: 0;
}
.moveo_mobile .moveo__icon-close {
display: none;
}
.moveo_mobile #moveo__action__menu {
display: none;
}
.moveo_mobile #moveo__action__close {
display: flex;
}
.moveo_mobile .moveo__chat {
border-radius: 0;
}
.moveo_mobile .moveo__header {
border-radius: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.moveo_mobile.moveo__expand .moveo__send-message {
display: flex;
margin-right: 10px;
}