
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;700&display=swap');
:root{
    /* =============== Texts colors ==================== */
   --sub-heading-color : hsl(276, 100%, 81%) ;
   --modarate-violet : hsl(276, 55%, 52%); /*for left chats text */
   --desaturated-dark-violet: hsl(271, 15%, 43%); /*for right chats test*/
   --grayish-blue:  hsl(206, 6%, 79%); /*for place holder texts */
   --dark-desaturated-violet: hsl(271, 36%, 24%); /*for main heading*/
   --dark-grayish-violet: hsl(270, 7%, 64%); /*paragraph texts*/


   /* ============== Gradien colors ===================== */
   --light-magenta: hsl(293, 100%, 63%);
   --light-violet: hsl(264, 100%, 61%);


   /* ================ secondary colors ================== */
   --White: hsl(0, 0%, 100%);
   --light-grayish-violet: hsl(270, 20%, 96%); /*app background*/
   --very-dark-desaturated-violet: hsl(271, 36%, 24%); /*submit button background*/
   --very-light-magenta: hsl(289, 100%, 72%); /*radio button outline*/
   --incomming-msg-backgroud:hsl(276, 70%, 90%);

   /* =============== fonts ======================*/
   --font-size : 16px;
   --rgular-font-weight : 400;
   --medium-font-weight : 500;
   --bold-font-weight : 700;
   --font-familly : "Rubik";

    /*========== z index ==========*/
       --z-tooltip: 10;
       --z-fixed: 100;
       --z-modal: 1000;
}

*{
    scroll-behavior: smooth;
}

body{
    font-family: var(--font-familly);
    font-size: var(--font-size);
    background-color: var(--light-grayish-violet);
}

.background-scene{
    display:flex;
    justify-content: space-between;
    background-color: transparent;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left :0;
    z-index: 0;
    margin: 0 !important;
    overflow: hidden;
}

.form-left{
    background-color: var(--modarate-violet);
    height: 50%;
    width: 400px;
    border-radius: 0 0 50% 50%;
    margin-left: -540px;
    margin-top: -44.5%;
    align-self: flex-start;
    transition: all ease-in-out .50s;
    animation: form-left-launch-in forwards .50s;
}


@keyframes form-left-launch-in {
    from{
        margin-left: -540px;
        margin-top: -44.5%;
    }
    to{
        margin-left: -250px;
        margin-top: 0;
    }
}

.form-right{
    background-color: var(--desaturated-dark-violet);
    height: 70%;
    width: 400px;
    border-radius: 50% 50% 0 0;
    margin-right: -540px;
    margin-bottom: -44%;
    
    align-self: flex-end;
    opacity: .05;
    transition: all ease-in-out .50s;
    animation: form-right-launch-in forwards .50s;
}


@keyframes form-right-launch-in {
    from{
        margin-right: -540px;
        margin-bottom: -44%;
    }

    to{
        margin-right: -250px;
        margin-bottom: 0;
    }
}

.foreground-scene{
    z-index: var(--z-tooltip);
    position: absolute;
    height:100%; 
    width:100%;
    top:0;
    left:0;
    background-color:transparent ;
    margin: 0 !important;
    display:flex;
    justify-content: space-around!important;
    overflow-y: auto;
}  


@keyframes container-launch-in {
    from{
        opacity: 0;
    }

    to{
        opacity:1;
    }
}

.container{
    max-width: 360px;
    width:fit-content;
    height:fit-content;
    padding: 20px;
    transition: width ease-in-out .50s;
    opacity: 0;
    animation: container-launch-in .95s forwards .5s;
}

.phone-mock-up{
    width:320px; 
    height:660px;
    border-radius: 30px;
    background: var(--White);
    margin: 10px auto;
    overflow: hidden;
    box-shadow: 0 20px 50px hsl(265, 0%, 80%);
    display:flex;
    align-items: center;
    justify-content: space-around;
}

.phone-mock-up .mkcontainer{
    background-color: var(--light-grayish-violet);
    margin:10px;
    height:630px!important;
    width:290px;
    border-radius: 20px;
    padding:0;
    overflow: hidden;
    position: relative;
}

.header{
    display:flex;
    align-items: center;
    background: linear-gradient(to right, var(--light-violet) , var(--light-magenta));
    width:100%;
    padding-top: 25px!important;
    box-shadow: 0 6px 6px rgba(0,0,0,.2);
    border-radius: 0 0 5px 5px 
}

.header button{
    height: fit-content;
}

.user{
    width: calc(100% - 83px);
    display:flex;
    align-items: center;
    margin: 20px 5px;
}

.avatar{
    height: 35px;
    width: 35px;
    border-radius:100%;
    border: solid var(--light-grayish-violet) 2px;
    overflow:hidden;margin-right: 10px;
}

.avatar img{
    width: 100%
}
.user .name * {
    display:flex;
    align-items: center;
}

.user .name strong{
    color: var(--light-grayish-violet)
}

.user .name small{
    color: var(--sub-heading-color)
}

.btn {
    border:0;
    outline: 0;
    padding: 5px 10px;
    background:transparent;
    color: var(--White);
    transition: all ease-in-out .15s;
}

.curved-edge{
    background: var(--White);
    border-radius: 0 0 15px 15px;
    height: 25px;
    width: 200px;
    position: absolute;
    margin-left: 45px;
}

.text-container{
    display:flex;
    align-items: center;
    justify-content: space-around;
    transition: all ease-in-out .50s;
}

.heading{
    color : var(--dark-desaturated-violet);
    text-align: center;
}

.text{
    text-align: center;
    line-height: 25px;
    color: var(--dark-grayish-violet);
    font-size: var(--font-size);
}

.msg-item{
    padding: 5px 10px;
    display:flex!important;
}

.msg-item:first-child{
    margin-top: 10px;
}

.msg-item.outgoing{ 
    justify-content: space-between!important;
}

.msg-item.incoming{
    justify-content: left
}

.msg{
    padding: 10px;
    margin: 0;
    box-shadow: 0 1px 6px rgba(0,0,0,.1);
    font-size: 10px;
    width:fit-content;
    max-width: 55%;
}

/* ============== start message loading annimations ======================= */

.incoming .msg{
    background-color: var(--incomming-msg-backgroud);
    border-radius: 10px 10px 10px 3px;
    color: var(--modarate-violet);
}


.outgoing .msg{
    background-color: var(--White);
    border-radius: 10px 10px 3px 10px;
    color: var(--desaturated-dark-violet)
}

.incoming.placeholder .msg > div{
    height: 7px;
    margin: 2px 0;
    border-radius: 2px;
    background: rgba(0,0,0,.03);
    animation: skeleton-msg-text-loader 1s linear infinite alternate;
}

@keyframes skeleton-msg-text-loader {
    from{
        background-color: rgba(0,0,0,.03);
    }
    to{
        background-color: rgba(0,0,0,.1);
    }
}

.incoming.placeholder .msg > div:first-child{
    width:145px;
}

.incoming.placeholder .msg > div:last-child{
    width:100px;
}

.incoming.placeholder > .pricing-item > div{
    background: rgba(255,255,255,.3);
    color: transparent;
    border: 0;
    animation: skeleton-msg-pricing-loader 1s linear infinite alternate;
}

.incoming.placeholder > .pricing-item > small{    
    background: rgba(255,255,255,.3);
    color: transparent;
    margin-left: 5px;
    border-radius: 2px;
    animation: skeleton-msg-pricing-loader 1s linear infinite alternate;
}

.incoming.placeholder > .pricing-item > strong{
    background: rgba(255,255,255,.3);
    margin-left: 5px;
    color:transparent;
    border-radius: 2px;
    animation: skeleton-msg-pricing-loader 1s linear infinite alternate;

}

@keyframes skeleton-msg-pricing-loader {
    from{
        background-color: rgba(255,255,255,.3);
    }
    to{
        background-color: rgba(255,255,255,.7);
    }
}

.cover{ /*for out going images */
    width: 50px; 
    height : 50px;
    background: rgba(0,0,0,.45);
    position: absolute;
    z-index: 5;
    display:flex;
    align-items: center;
    justify-content: space-around;
}

.load-indicator{ /* for out going images */
    width:20px;
    height:20px;
    border-radius: 100%;
    background:rgba(255,255,255,.3);
    animation: skeleton-msg-pricing-loader 1s linear infinite alternate;

}

.incoming.placeholder .images .item {
    background: rgba(0,0,0,.03);
    animation: skeleton-msg-incoming-img-loader 1s linear infinite alternate;
}

@keyframes skeleton-msg-incoming-img-loader {
    from{
        background-color: rgba(0,0,0,.03);
    }
    to{
        background-color: rgba(0,0,0,.1);
    }
}


/* ============== end message loading annimations ======================= */



/*================ start images bottom sheet*/
.images-bottom-sheet-cover{
    position: absolute;
    height: 100%;
    background: rgba(0,0,0,.2);
    width: 100%;
    bottom: 0;
    display: flex;
    opacity: 0;
}

.images-bottom-sheet-cover.show{
    animation: bottom-sheet-cover-show .3s forwards .8s;
}

.images-bottom-sheet-cover.hide{
    animation: bottom-sheet-cover-hide .7s forwards;
}

@keyframes bottom-sheet-cover-show{
    from{
        opacity: 0;
    }
    to{
        opacity: 1;
    }
}

@keyframes bottom-sheet-cover-hide{
    from{
        opacity: 1;
    }
    to{
        opacity: 0;
    }
}

.images-bottom-sheet{
    background: var(--dark-grayish-violet);
    height: fit-content;
    align-self: flex-end;
    box-shadow: 0 -3px 6px rgba(0,0,0,.1);
    width: 100%;
    margin-bottom: -170px;
}

.images-bottom-sheet.show{
    animation: bottom-sheet-show .3s forwards 1s;
}

.images-bottom-sheet.hide{
    animation: bottom-sheet-hide .3s forwards;
}

@keyframes bottom-sheet-show{
    from{
        margin-bottom: -170px;
    }

    to{
        margin-bottom: 0;
    }
}

@keyframes bottom-sheet-hide{
    from{
        margin-bottom: 0;
    }

    to{
        margin-bottom: -170px;
    }
}

.images-bottom-sheet .b-sheet-header{
    padding: 5px 10px;
    background: var(--White);
    border:solid rgba(0,0,0,.2) 1px;
    border-bottom: 0;
    color: var(--desaturated-dark-violet)

}

.images-bottom-sheet .b-sheet-header i{
    margin-right: 5px;
}

.images-bottom-sheet .grid{
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.images-bottom-sheet .grid .item{
    width: 95px;
    height: 95px;
    overflow: hidden;
    border: solid var(--dark-grayish-violet) 1px;
    position:relative;
}

.images-bottom-sheet .grid .item > img{
    width: 100%;
}

.images-bottom-sheet .grid .item .selectable-cover,
.images-bottom-sheet .grid .item .clickable-cover {
    position: absolute;
    background:rgba(0,0,0,.5);
    height: 100%;
    width:100%;
    left: 0;
    top: 0;
    opacity: 0;
}

.image-clickable-cover-clicked{
    animation: image-clickable-cover-click .7s forwards ;
}

@keyframes image-clickable-cover-click{
    from{
        opacity:0;
    }
    to{
        opacity: 1;
    }
}

.images-bottom-sheet .grid .item .selectable-cover{
    background: rgba(255,255,255,.7);
    display: flex;
    justify-content: space-around;
    align-content: center;
    align-items: center;
    opacity: 0;
}

.selectable-cover-click-selected{
    animation: selectable-cover-click .5s forwards;
}

@keyframes selectable-cover-click {
    from{
        opacity: 0;
    }
    to{
        opacity: 1;
    }
}

.images-bottom-sheet .grid .item .selectable-cover img{
    height: 20px;
    width: 20px;
    background: rgba(0,0,0,.5);
    border-radius: 100%;
    padding: 5px;
}

.images-bottom-sheet .controls{
    height: 30px;
    padding: 0 15px;
    display: flex;
    align-content: center;
    justify-content: space-between;
    align-items:center ;
}

.images-bottom-sheet .controls button{
    border-radius: 3px;
    background: rgba(0,0,0,0);
}

.control-clicked{
    animation: image-controls-click .15s backwards ;
}

@keyframes image-controls-click {
    from{
        background: rgba(0,0,0,0);
    }
    to{
        background: rgba(0,0,0,.2);
    }
}
.images-bottom-sheet .controls.hover{
    background: rgba(0,0,0,.1);
    border-radius: 3px;
}

.images-bottom-sheet .controls button:hover{
    background: rgba(0,0,0,.1);
    border-radius: 3px;
}



/*================ start images bottom sheet*/
.outgoing .images{
    background-color: var(--White);
    border-radius: 10px 10px 3px 10px;
    color: var(--desaturated-dark-violet)
}

.pricing-item{
    padding:10px;
    width: fit-content;
    min-width: 70%;
    background: linear-gradient(to left, var(--light-violet) , var(--light-magenta));
    border-radius: 10px 10px 10px 3px;
    color: var(--White);
    display:flex;
    align-items: center;
    box-shadow: 0 1px 6px rgba(0,0,0,.1);
}

.pricing-item .radio{
    width: 15px;
    height: 15px;
    border:solid var(--sub-heading-color) 1.5px; 
    border-radius:100%
}

.pricing-item small{
    font-size: 10px!important;
    line-height: 1;
    width: calc(100% - 80px);
    padding: 0 10px;
}

.images,
.custom .images{
    padding: 10px;
    margin: 0;
    box-shadow: 0 1px 6px rgba(0,0,0,.1);
    font-size: 10px;
    width:fit-content;
    max-width: 70%;
}

.images{
    background: transparent !important;; 
    border-radius: 0!important; 
    box-shadow: 0 1px 6px rgba(0,0,0,0)!important;
    padding: 0;
}

.images .grid,
.custom .images .grid{
    display:flex;
    border-radius: 2px;
    overflow: hidden;
    background-color: var(--light-grayish-violet);
}


.images .grid{
    background:transparent;
}

.images .grid .item{
    width: 50px; 
    height : 50px;
    overflow: hidden;
    display:flex;
    align-items: center;
    align-content: center;
    margin : 5px 5px;
    border-radius: 10px;
    position: relative;
}

.images .grid .item img{
    width:100%
}

.new-msg{
    background: var(--White);
    height:40px;
    width: calc(100% - 20px);
    margin: 20px 10px;
    border-radius: 30px;
    display:flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(0,0,0,.3);
    box-shadow: 0 1px 6px rgba(0,0,0,.1);
    position:absolute;
    bottom:0;
}

.new-msg > button{
    margin: 5px 5px 5px 5px;
}

.new-msg .msg-field{
    width: calc(100% - 100px);
    margin: 5px 0;
    height: 20px;
    overflow: hidden;
}

.msg-field-sentence-item{
    display: inline-block;
    overflow: hidden;
    height: 20px;
    position: relative;
    color: rgba(0,0,0,.5);
}

.msg-field-sentence-item .mask{
    position: absolute!important;
    width: 300px;
    height: 20px;
    background: rgba(255,255,255,1);
    display: block;
    top: 0;
    border-left: solid rgba(0,0,0,.5) 1px;
}


.typing{
    left: 0;
    animation: typing 2s steps(22) forwards ;
}
@keyframes typing {
    100%{
        left: 110%;
    }
}


.btn.send-message{
    background-color: rgba(0,0,0,1);
    height: 30px;
    width:30px;
    border-radius:100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    align-self: flex-end;
}

.btn.send-message.animate{
    animation: btn-send-msg-click .25s backwards 2s;
}

@keyframes btn-send-msg-click{
    from{
        background-color: rgba(0,0,0,1);
    }
    to{
        background-color: rgba(0,0,0,.3);
    }
}

.btn.image{
    background-color: rgba(0,0,0,.2);
    border-radius: 100%;
    height: 30px;
    width:30px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    align-self: flex-end;
}

.btn.image.animate{
    animation: image-selector-click .25s backwards;
}

@keyframes image-selector-click{
    from{
        background-color: rgba(0,0,0,.2);

    }
    to{
        background-color: rgba(0,0,0,.4);

    }
}

.foreground-scene::-webkit-scrollbar {
    width: 0;
}

.foreground-scene::-webkit-scrollbar-track {
    background: rgba(112, 112, 112, .2);
}

.foreground-scene::-webkit-scrollbar-thumb {
    background-color: rgba(112, 112, 112, .5);
    border-radius: 20px;
}

@media screen and (min-width: 700px) {
    .container{
        max-width: 900px;
        display:flex;
    }
    
    .text-container{
        width: calc(100% - 450px)!important;
    }

    .text, .heading{
        text-align: left;
    }

    .form-left{
        background-color: var(--modarate-violet);
        height: 94%;
        width: 539px;
        border-radius: 0 0 50% 50%;
        margin-left: -250px;
        align-self: flex-start;
    }
    
    .form-right{
        background-color: var(--desaturated-dark-violet);
        height: 94%;
        width: 490px;
        border-radius: 50% 50% 0 0;
        margin-right: -250px;
        align-self: flex-end;
        opacity: .05;
    }
}

