ocrcc-chatbox/src/components/widget.scss

136 lines
2.1 KiB
SCSS
Raw Normal View History

2020-02-01 05:30:58 +00:00
@import "variables";
@import "loader";
@import "chat";
2018-05-28 01:09:44 +00:00
@keyframes slideInUp {
from {
transform: translate3d(0, 100%, 0);
display: inherit;
2018-05-28 01:09:44 +00:00
visibility: visible;
}
to {
transform: translate3d(0, 0, 0);
}
}
@keyframes slideOutDown {
from {
transform: translate3d(0, 0, 0);
}
to {
display: none;
2018-05-28 01:09:44 +00:00
visibility: hidden;
transform: translate3d(0, 100%, 0);
}
}
.docked-widget {
2018-05-26 18:53:54 +00:00
position: fixed;
2018-05-28 01:09:44 +00:00
bottom: 0px;
2018-05-26 18:53:54 +00:00
right: 10px;
z-index: 9999;
2018-05-28 01:09:44 +00:00
}
2018-05-26 18:53:54 +00:00
2018-05-28 01:09:44 +00:00
.dock {
cursor: pointer;
display: flex;
align-items: center;
2020-02-01 05:30:58 +00:00
justify-content: space-between;
2020-02-04 06:13:47 +00:00
padding: 0.5rem;
2020-02-01 05:30:58 +00:00
width: 400px;
max-width: calc(100vw - 10px);
background: $theme-color;
color: $white;
font-family: $theme-font;
font-size: 1rem;
border: none;
color: $white;
font-size: 1rem;
line-height: 1;
2018-05-26 18:53:54 +00:00
}
2018-05-28 01:09:44 +00:00
.widget {
2020-02-01 05:30:58 +00:00
width: 400px;
max-width: calc(100vw - 10px);
2018-05-28 01:09:44 +00:00
border-bottom: none;
animation-duration: 0.2s;
animation-fill-mode: forwards;
&-entering {
animation-name: slideInUp;
}
&-entered {
display: inherit;
2018-05-28 01:09:44 +00:00
visibility: visible;
}
&-exiting {
animation-name: slideOutDown;
}
&-exited {
display: none;
2018-05-28 01:09:44 +00:00
visibility: hidden;
}
&-header {
2020-02-01 05:30:58 +00:00
background: $theme-color;
color: $white;
2020-02-04 06:13:47 +00:00
padding: 0.5rem;
2018-05-28 01:09:44 +00:00
display: flex;
2020-02-01 05:30:58 +00:00
align-items: center;
2018-05-28 01:09:44 +00:00
&-title {
display: flex;
flex-grow: 1;
}
&-icon {
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
2020-02-01 05:30:58 +00:00
background: transparent;
border: none;
2018-05-28 01:09:44 +00:00
}
}
&-body {
background: white;
padding: 10px;
height: 150px;
}
&-footer {
background: green;
line-height: 30px;
padding-left: 10px;
}
2018-05-26 18:53:54 +00:00
}
2020-02-01 05:30:58 +00:00
.arrow {
transform: rotateX(0deg);
transition: all 0.5s linear;
color: $white;
font-size: 1rem;
line-height: 1;
&.opened {
transform: rotateX(180deg);
}
&.closed {
transform: rotateX(0deg) translateY(25%);
}
}
@media screen and (max-width: 400px){
.docked-widget {
right: 0;
left: 0;
}
.dock, .widget {
max-width: 100vw;
}
}