
.main-container {
    display: grid;
    grid-template-columns: 2.2fr 4fr;
    width: 100vw;
}

.room-sidebar {
    justify-self: left;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 59px 89px 50px repeat(auto-fit, minmax(73px, 73px));
    width:100%;
    border-right:.75px solid #CCC;
}

.room-sidebar-header {
    background-color: #f0f0f0ff;
    display: grid;
    grid-template-columns: 48px auto 37px 37px 37px;
    grid-template-areas: "sb-avatar . sb-status sb-new-chat sb-menu" ;
    gap: 1rem;
    align-items:center;
    padding:.5rem;
}


.sb-avatar {
    grid-area: sb-avatar;
}

.sb-avatar img {
    width:48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
}

.sb-status {
    grid-area: sb-status;
}

.sb-new-chat {
    grid-area: sb-new-chat;
}

.sb-menu {
    grid-area: sb-menu;
}

.room-sidebar-get-notified {
    display:grid;
    grid-template-columns: 50px auto;
    background-color: #9DE1FE;
    align-items: center;
    padding: .5rem;
}

.room-sidebar-get-notified-alert {
    justify-self: center;
}

.room-sidebar-get-notified-msg {
    padding:.5rem;
    justify-self: left;
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: 1fr 1fr;
    gap: .20rem;
    max-width: 442px;
}

.room-sidebar-get-notified-msg1 {
    font-size: 1rem;
    color: #303030F5;
    white-space: nowrap;
}

.room-sidebar-get-notified-msg2 {
    font-size: .87rem;
    display: grid;
    grid-template-columns: auto 20px;
    gap: .25rem;
    white-space: nowrap;
}

.room-sidebar-get-notified-arrow {
    align-self: end;
}

.room-sidebar-get-notified-msg2 a {
    text-decoration: none;
    color: #303030D9;
}

.room-sidebar-get-notified-msg2 a:hover {
    text-decoration: underline;
}

/* room side bar search or new chat */
.room-sidebar-search-new-chat {
    display: grid;
    align-items: center;
    background-color: #f0f0f0ff; 
    width: 100%;
    padding: 0.40rem .62rem ;
}

.room-sidebar-search-new-chat2 {
    display:grid;
    grid-template-columns: 50px auto;
    box-sizing: border-box;  
    outline:none;
    border-radius: 15px; 
    background-color: white;
}

.room-sidebar-search {
    align-self: end;
    justify-self: center;
}

.room-sidebar-new-chat ::placeholder {
    font-size:.90rem;
    color: #a6a6a6;
}

.room-sidebar-new-chat input[type=text] {
    width: 90%;    
    box-sizing: border-box;  
    outline:none;
    border:0;
    padding: 9px 6px;
}
/* room side bar search or new chat */


/* room side bar groups */
.room-sidebar-groups {
    display:grid;
    grid-template-columns: 49px auto 65px;
    grid-template-areas: "g-img g-msg g-time";
    height:73px;
    border-bottom:.75px solid #EEE; 
    padding: .5rem;
    align-items: center;
    cursor: pointer;
}

.room-sidebar-groups-g-img {
    grid-area: g-img;
}

.room-sidebar-groups-g-img img {
    width:50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
}

.room-sidebar-groups-g-msg {
    grid-area: g-msg;
    display:grid;
    padding: .5rem;
}

.room-sidebar-groups-g-msg1 {
    font-size: 1.062rem;
    color: #303030F5;
}

.room-sidebar-groups-g-msg2 {
    font-size: .87rem;
    white-space: nowrap;
    text-overflow: ellipsis; 
    overflow:hidden;
}

.room-sidebar-groups-g-time {
    grid-area: g-time;
    font-size: .70rem;
    color: #a2a2a2;
    align-self: start;
    justify-self: end;
    padding: .5rem;
}
/* room side bar groups */

.room-container__msg { 
    display:grid;
    width: 100%;
    min-height: 99vh;
    height:99vh;
    grid-template-columns: 1fr;
    grid-template-rows: 59px auto 0px 62px; /* dynamically change to toggle giphy search */
    grid-template-areas: "msg-header"
                         "msg-box"
                         "giphy-search"
                         "msg-input";
    overflow: hidden; /* hide unnecessary scroll */
}

.room-container__preview-img {
    display:grid;
    width: 100%;
    height:99vh;
    grid-template-rows: 59px auto;
    grid-template-areas: "msg-header"
                         "preview-msg-box";
}

.preview-img-box {
    grid-area: preview-msg-box;
}

.msg-header {
    grid-area: msg-header;
    background-color: #EDEDED;
    display: grid;
    grid-template-columns: 42px auto 37px 37px;
    grid-template-areas: "h-avatar h-users h-search h-menu" ;
    align-items:center;
    gap: .7rem;
    padding: 0 1rem;
    border-bottom:.5px solid #CCC;
}

.h-avatar {
    grid-area: h-avatar;
}

.h-avatar img {
    width:42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
}

.h-users {
    grid-area: h-users;
    display:grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas: "h-user-group"
                         "h-user-member";
    white-space: nowrap;
}

.h-user-group {
    grid-area: h-user-group;
    font-size: 1rem;
    overflow:hidden; 
    text-overflow: ellipsis;
}

.h-user-member {
    grid-area: h-user-member;
    font-size: .812rem;
    color: #606060ff;
    overflow:hidden; 
    text-overflow: ellipsis;
}

.h-search {
    grid-area: h-search;
}

svg {
    fill: #919191ff;
    cursor: pointer;
}


.h-menu {
    grid-area: h-menu;
}

.msg-box {
    grid-area: msg-box;
    padding-left:4rem;
    padding-right:4rem;
}

.giphy-search-show {
    grid-template-rows: 59px auto 300px 62px;
}

.giphy-search {
    grid-area: giphy-search;
    display: grid;
    grid-template-rows: 62px auto;
    grid-template-columns: 1fr;
    grid-template-areas: "ginput"
                         "gresults";
    padding: 1rem;
}

.giphy-search__input input[type=text] {
    display: grid;
    grid-area: ginput;
    width: 100%;
    background-color: #e7e5e5;
    padding: 10px 12px;
    box-sizing: border-box;  
    outline:none;
    border-radius: 4px;
    border:0;
    font-size: .93rem;
}

.giphy-search__results {
    display: grid;
    grid-area: gresults;
    overflow-y: auto;
    overflow-x: hidden;
    gap: .5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-height: 350px;
}

.msg-box--background {
    background: #efe7dd url("https://cloud.githubusercontent.com/assets/398893/15136779/4e765036-1639-11e6-9201-67e728e86f39.jpg") repeat;
    overflow-y: scroll;
}

.preview-img {
    display: grid;
    padding:0;
    grid-template-rows: 49px 1fr 40px 1px 100px;
    gap: 1rem;
}

.preview-img__header {
    background-color: #E6E6E6;
    display: grid;
    grid-template-columns: 42px auto;
    align-items: center;
    align-content: center;
    padding-top: 1.9rem;
    padding-bottom: 1.9rem;
    padding-left: 1rem;
}

.preview-img__header__close {
    display: grid; /* need this to remove svg padding bottom */
}


.preview-img__snipped-big {
    width: 100%;
    height: 100%;
    padding: 1rem;
    display: grid;
    justify-content: center;
}

.preview-img__snipped-big__border {
    display:grid;
    justify-content: center;
}

.preview-img__snipped-big__border img {
    height:100%;
    object-fit: cover; 
}


.preview-img__caption {
    justify-self: center;
    width: 75%;
    display: grid;
}

.preview-img__caption input[type="text"] {
    width: 100%;
    box-sizing: border-box;  
    outline:none;
    border:0;
    font-size: 1rem;
    border-radius: 15px;
    background-color: #F0F0F0;
    padding: 12px 12px 11px;
}

.preview-img__line {
    border-bottom: 1.5px solid #F0F0F0;
    width: 90%;
    display: grid;
    height: 0;
    justify-self: center;
}


.preview-img__footer {
   /* background-color: #d9d9d9ff; */
    display: grid;
    grid-template-columns: 1fr 54px 54px 1fr;
    grid-template-areas: ". img-small add-file btn-img-send";
    gap: .5rem;
    padding: 1rem;
}

.preview-img__footer__img-small {
    padding:2px;
    grid-area: img-small;
    width: 100%;
    height: 100%;
}

.preview-img__footer__img-small img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.preview-img__footer__addfile {
    border: 1px solid #CCC;
    border-radius: 5px;
    display: grid;
    grid-area: add-file;
    align-items: center;
    justify-items: center;
    gap: .2rem;
}


.preview-img__footer__button {
    justify-self: end;
    grid-area: btn-img-send;
    padding: 0;
    background-color: #09e85eff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
    width: 60px;
    height: 60px;
    display:grid;
    align-items: center;
    justify-items: center;

}

.preview-img__footer__button-arrow {
    display: grid;
}


.msg-input {
    grid-area: msg-input;
    padding: 1rem;
    display: grid;
    grid-template-columns: 40px 40px 40px auto 40px;
    grid-template-areas: "close emoji gif type-a-message mic";
    align-content: center;
    background-color: #f0f0f0ff;
}

.close {
    grid-area: close;
    padding: 0.5rem;
    justify-self: center;
    align-self:center;
}

.emoji {
    grid-area: emoji;
    padding: 0.5rem;
    justify-self: center;
    align-self:center;
}

.gif {
    grid-area: gif;
    padding: 0.5rem;
    justify-self: center;
    align-self:center;
}

.type-a-message {
    grid-area: type-a-message;
    padding: 0.5rem;
}

.mic {
    grid-area: mic;
    padding: 0.5rem;
    justify-self: center;
    align-self:center;
}


.right-msg-container {
    display:grid;
    grid-template-columns: 1fr 8px;
    padding: .3rem;
}

.left-msg-container {
    display:grid;
    grid-template-columns: 8px 1fr;
    padding: .3rem;
}

.s-tail {
    display: grid; /* tail need to be align start */
}

.r-tail {
   /* justify-self:left; */
    display: grid; /* tail need to be align start */
}

.s-message {
    padding: 0.5rem;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 20px;
    grid-template-areas: "s-msg"
                         "s-time";

    justify-self:right;
    background-color: #dcf8c6ff;
    border-radius: 7.5px;
    border-top-right-radius: 0;
    /*box-shadow: 0 1px .5px rgb(31, 30, 30),.13); */
    box-shadow: 0 1px .5px rgba(0,0,0,.2);
}

.r-message {
    padding: 0.5rem;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 20px 1fr;
    grid-template-areas: "r-user"
                         "r-msg"
                         "r-time";

    justify-self:left;
    background-color: white;
    border-radius: 7.5px;
    border-top-left-radius: 0;
    /*box-shadow: 0 1px .5px rgb(31, 30, 30),.13); */
    box-shadow: 0 1px .5px rgba(0,0,0,.2);
}

.s-msg {
    grid-area: s-msg;
    font-size: .90rem;
}

.s-msg img {
    max-width: 330px;
    max-height: 249px;
}

.s-time {
    grid-area: s-time;
    font-size: .70rem;
    justify-self: right;
    color: #a2a2a2;
}

.r-user a {
  text-decoration: none;
  color: #72dbb5ff;
}

.r-user a:hover {
  text-decoration: underline;
  color: #72dbb5ff;
}

.r-user {
    grid-area: r-user;
    font-size: .9rem;
    font-weight: bold;
}

.r-msg {
    grid-area: r-msg;
    font-size: .90rem;
}

.r-msg img {
    max-width: 330px;
    max-height: 249px;
}

.r-time {
    grid-area: r-time;
    font-size: .70rem;
    justify-self: right;
    color: #a2a2a2;
}


.type-a-message input[type="text"] {
    width: 100%;
    padding: 9px 12px 11px;
    box-sizing: border-box;  
    outline:none;
    border-radius: 15px;
    border:0;
    font-size: .93rem;
}

.date_weekday {
    display: grid;
    justify-self: center;
    padding: 5px 12px 6px;
    font-size: 0.78rem;
    background-color: #e1f3faff;
    border-radius: 7.5px;
    width: fit-content;
    box-shadow: 0 1px .5px rgba(0,0,0,.13);
    line-height: 21px;
}
