/* Mobile view */
#friendList {
    display: block;
    /* Show friend list by default on mobile */
}

#chatBox {
    display: flex;
    flex-direction: column;
}

#chatBoxMessages {
    flex-grow: 1;
    overflow-y: auto;
}

#chat1 .card-header {
    max-height: 15vh;
}

/* Small devices (landscape phones, less than 768px) */
@media screen and (min-width: 767.98px) {
    #chatBoxMessages{
        max-height: 65vh;
    }

    .description{
        width: 20vw;
    }
}

/* Medium devices (tablets, less than 992px) */
@media screen and (min-width: 991.98px) {
    #chatBoxMessages{
        max-height: 64vh;
    }

    .description{
        width: 18vw;
    }
}

/* Large devices (desktops, less than 1200px) */
@media screen and (min-width: 1199.98px) {
    #chatBoxMessages{
        max-height: 65vh;
    }
    
    .description{
        width: 13vw;
    }
}

/* X-Large devices (large desktops, less than 1400px) */
@media screen and (min-width: 1399.98px) {
    #chatBoxMessages{
        max-height: 70vh;
    }

    .description{
        width: 13vw;
    }
}

/* Chat box displays full screen on mobile */
@media screen and (max-width: 767px) {

    #chatBoxMessages{
        max-height: 73vh;
    }

    .description{
        width: 50vw;
    }
    /* #content{
        background-image: url('');
    } */
    #friendList {
        padding-top: 10px;
    }

    #chatBox {
        width: 100%;
        height: 100vh !important;
        position: relative;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        border-radius: 0%;
    }


    #chatBox .card {
        border-radius: 0 !important;
        height: 100%;
        width: 100%;
    }

    #chat1 .card-header {
        border-radius: 0%;
    }

    #chat1 .card-body {
        border-radius: 0 !important;
    }

    .submitBox {
        margin-bottom: 16px;
    }

    body {
        margin: 0 !important;
        padding: 0 !important;
        overflow-y: hidden;
    }

    html,
    body,
    .container-fluid,
    .row,
    .col-md-12,
    .card-body,
    #chat3,
    #chatBox {
        height: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }

    .receive-bubble{
        max-width: 50%!important;
    }

    .spinner{
        width: 20px!important;
        height: 20px!important;
    }
}

.card-body {
    box-sizing: border-box;
    flex-grow: 1;
    margin: 0;
    padding: 0;
}

/* Desktop view */
@media screen and (min-width: 768px) {
    #chatBox {
        display: block;
        /* Show chat box on desktop */
        height: 95vh !important;
    }

    #content {
        background-image: url('');
    }

    #chatBox .card {
        height: 100%;
    }

    .card-body {
        box-sizing: border-box;
        flex-grow: 1;
    }

    #chat1 .card-header {
        border-top-left-radius: 15px;
        border-top-right-radius: 15px;
    }
}

#chatBox .card {
    border-radius: 15px;
    border-color: transparent;
}

#chatBox .card>*:last-child {
    border-bottom-left-radius: 15px;
}

#chat1 .card-header {
    background-color: rgb(50, 53, 55);
}

#chat3 {
    border-color: transparent;
}

#chat3 .form-control {
    border-color: transparent;
}

#chat3 .form-control:focus {
    border-color: transparent;
    box-shadow: inset 0px 0px 0px 1px transparent;
}

.badge-dot {
    border-radius: 50%;
}

#search-addon {
    background-color: rgb(249, 249, 249);
    color: rgb(150, 150, 150);
}

#themeColor {
    /* background-color: rgb(76, 214, 223); */
    background-color: rgb(244, 125, 125);
}

#themeText {
    /* color: rgb(76, 214, 223); */
    color: rgb(244, 125, 125);
}

a p {
    text-decoration: none;
}

a {
    text-decoration: none;
}

.container {
    display: flex;
    flex-direction: column;
}

.friend {
    text-decoration: none;
}

.friendList {
    text-align: center;
}

.btn-group,
.btn-group .btn {
    box-shadow: none !important;
    text-transform: none !important;
    width: 100%;
}

.btn-group .btn:first-child {
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
}

/* New Chat button */
.blob-btn {
    z-index: 1;
    position: relative;
    padding: 10px 0px;
    width: 100%;
    margin-bottom: 30px;
    text-align: center;
    text-transform: uppercase;
    color: white;
    font-size: 16px;
    font-weight: bold;
    background-color: transparent;
    outline: none;
    border: none;
    transition: color 0.5s;
    cursor: pointer;
    border-radius: 30px;
}

.blob-btn:before {
    content: "";
    z-index: 1;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border: 2px solid rgb(244, 125, 125);
    border-radius: 30px;
}

.blob-btn:after {
    content: "";
    z-index: -2;
    position: absolute;
    left: 3px;
    /* 2px * 1.5 */
    top: 3px;
    /* 2px * 1.5 */
    width: 100%;
    height: 100%;
    transition: all 0.3s 0.2s;
    border-radius: 30px;
}

.blob-btn:hover {
    color: rgb(244, 125, 125);
    border-radius: 30px;
}

.blob-btn:hover:after {
    transition: all 0.3s;
    left: 0;
    top: 0;
    border-radius: 30px;
}

.blob-btn__inner {
    z-index: -1;
    overflow: hidden;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background: rgb(244, 125, 125);
}

.blob-btn__blobs {
    position: relative;
    display: block;
    height: 100%;
    filter: url('#goo');
}

.blob-btn__blob {
    position: absolute;
    top: 2px;
    /* borderW value */
    width: 25%;
    /* 100% / 4 numOfBlobs */
    height: 100%;
    background: white;
    border-radius: 100%;
    transform: translate3d(0, 150%, 0) scale(1.7);
    transition: transform 0.45s;
}

.blob-btn__blob:nth-child(1) {
    left: 0;
    transition-delay: 0s;
}

.blob-btn__blob:nth-child(2) {
    left: 30%;
    /* (120% / 4 numOfBlobs) */
    transition-delay: 0.08s;
}

.blob-btn__blob:nth-child(3) {
    left: 60%;
    /* 2 times the previous value */
    transition-delay: 0.16s;
}

.blob-btn__blob:nth-child(4) {
    left: 90%;
    /* 3 times the previous value */
    transition-delay: 0.24s;
}

.blob-btn:hover .blob-btn__blob {
    transform: translateZ(0) scale(1.7);
}

/* New Chat button */

.btn-group .btn:last-child {
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
}

.avatar {
    border-radius: 15px;
}

#messages {
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
}

#profileImage {
    border-radius: 50%;
    width: 10%;
    height: 10%;
}

#menu {
    color: rgb(150, 150, 150);
}

/* Chat Box */
#content {
    background-color: rgb(60, 60, 60);
    flex: 1;
    /* This will make it stretch and take up all available space */
    overflow-y: auto;
    border-bottom-right-radius: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#backToFriends {
    border: none;
    background-color: rgb(45, 54, 49);
    color: white;
}

.description {
    color: rgb(189, 196, 203);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.receive-bubble {
    border-top-right-radius: 15px;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    background-color: white;
    /* box-shadow: 0px 5px 5px 0px rgb(228, 228, 228); */
    min-width: 270px;
    /* Minimum width of the bubble */
    min-height: 50px;
    /* Minimum height of the bubble */
    max-width: 80%;
    /* Maximum width you want to allow a bubble to grow */
    display: flex;
    flex-direction: column;
    /* Vertically center the text */
    margin-left: 15px;
    margin-right: 0px;
    word-wrap: break-word;
    overflow-x:auto;
}

.send-bubble {
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    background-color: rgb(244, 125, 125);
    color: white;
    /* box-shadow: 0px 5px 5px 0px rgb(228, 228, 228); */
    min-width: 270px;
    /* Minimum width of the bubble */
    max-width: 80%;
    /* Maximum width you want to allow a bubble to grow */
    display: flex;
    align-items: center;
    /* Vertically center the text */
    margin-right: 15px;
    word-wrap: break-word;
    position: relative;
    padding-right: 90px;
}

.timestamp-send {
    text-align: end;
    margin-right: 30px;
}

.timestamp-receive {
    text-align: start;
    margin-left: 30px;
}

.send-btn {
    border: none;
    background-color: transparent;
}

.submitBox {
    border-radius: 35px;
    background-color: rgb(244, 125, 125);
    box-shadow: 0px 0px 10px 0px rgb(43, 41, 41);
    width: fit-content;
    max-width: 800px;
    align-self: center;
    margin-left: auto;
    margin-right: auto;
    flex-grow: 0;
}
      
/* .loader {
    width: 40px;
    height: 40px;
    display: inline-block;
    position: relative;
  }
  .loader::after,
  .loader::before {
    content: '';  
    box-sizing: border-box;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #FFF;
    position: absolute;
    left: 0;
    top: 0;
    animation: animloader 2s linear infinite;
  }
  .loader::after {
    animation-delay: 1s;
  }
  
  @keyframes animloader {
    0% {
      transform: scale(0);
      opacity: 1;
    }
    100% {
      transform: scale(1);
      opacity: 0;
    }
  } */

/* Loader */
  .spinner {
    margin-left: 20px;
    margin-bottom: 20px;
    width: 40px;
    height: 40px;
    --clr: rgb(247, 197, 159);
    --clr-alpha: rgb(247, 197, 159,.1);
    animation: spinner 1.6s infinite ease;
    transform-style: preserve-3d;
  }
  
  .spinner > div {
    background-color: var(--clr-alpha);
    height: 100%;
    position: absolute;
    width: 100%;
    border: 3.5px solid var(--clr);
  }
  
  .spinner div:nth-of-type(1) {
    transform: translateZ(-35.2px) rotateY(180deg);
  }
  
  .spinner div:nth-of-type(2) {
    transform: rotateY(-270deg) translateX(50%);
    transform-origin: top right;
  }
  
  .spinner div:nth-of-type(3) {
    transform: rotateY(270deg) translateX(-50%);
    transform-origin: center left;
  }
  
  .spinner div:nth-of-type(4) {
    transform: rotateX(90deg) translateY(-50%);
    transform-origin: top center;
  }
  
  .spinner div:nth-of-type(5) {
    transform: rotateX(-90deg) translateY(50%);
    transform-origin: bottom center;
  }
  
  .spinner div:nth-of-type(6) {
    transform: translateZ(35.2px);
  }
  
  @keyframes spinner {
    0% {
      transform: rotate(45deg) rotateX(-25deg) rotateY(25deg);
    }
  
    50% {
      transform: rotate(45deg) rotateX(-385deg) rotateY(25deg);
    }
  
    100% {
      transform: rotate(45deg) rotateX(-385deg) rotateY(385deg);
    }
  }
  /* End of loader */

#chat::placeholder {
    color: white !important;
}

#chat:-ms-input-placeholder {
    color: white !important;
}

#chat::-ms-input-placeholder {
    color: white !important;
}

#chat::-webkit-input-placeholder {
    color: white !important;
}

#chat {
    width: 100%;
    color: white;
}

@media screen and (min-width: 1536px) {
    #chat {
        width: 700px;
    }

    #chatBox {
        height: 100vh;
    }

    #chatBox .card {
        height: 100%;
    }

    .card-body {
        box-sizing: border-box;
        flex-grow: 1;
    }
}