/* Global styles */
@font-face {
    font-family: Vazir;
    src: url('fonts/Vazir-Bold.eot');
    src: url('fonts/Vazir-Bold.eot?#iefix') format('embedded-opentype'),
        url('fonts/Vazir-Bold.woff2') format('woff2'),
        url('fonts/Vazir-Bold.woff') format('woff'),
        url('fonts/Vazir-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: Vazir;
    src: url('fonts/Vazir-Black.eot');
    src: url('fonts/Vazir-Black.eot?#iefix') format('embedded-opentype'),
        url('fonts/Vazir-Black.woff2') format('woff2'),
        url('fonts/Vazir-Black.woff') format('woff'),
        url('fonts/Vazir-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: Vazir;
    src: url('fonts/Vazir-Medium.eot');
    src: url('fonts/Vazir-Medium.eot?#iefix') format('embedded-opentype'),
        url('fonts/Vazir-Medium.woff2') format('woff2'),
        url('fonts/Vazir-Medium.woff') format('woff'),
        url('fonts/Vazir-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: Vazir;
    src: url('fonts/Vazir-Light.eot');
    src: url('fonts/Vazir-Light.eot?#iefix') format('embedded-opentype'),
        url('fonts/Vazir-Light.woff2') format('woff2'),
        url('fonts/Vazir-Light.woff') format('woff'),
        url('fonts/Vazir-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: Vazir;
    src: url('fonts/Vazir-Thin.eot');
    src: url('fonts/Vazir-Thin.eot?#iefix') format('embedded-opentype'),
        url('fonts/Vazir-Thin.woff2') format('woff2'),
        url('fonts/Vazir-Thin.woff') format('woff'),
        url('fonts/Vazir-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    /* font-family: system-ui; */
    font-family: Vazir;
}

body {
    background-color: #FAFAF7;
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior-y: contain;
    /* Prevent vertical overscroll */
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;

    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

body::-webkit-scrollbar {
    display: none;
}


.hideScrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.hideScrollbar::-webkit-scrollbar {
    display: none;
}

header {
    top: 0;
    left: 0;
    width: 100%;
    background-color: #FAFAF7;
    position: fixed;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    justify-content: space-around;
    align-items: center;
    color: #FAFAF7;
}

#main-content {
    background: #FAFAF7;
    position: absolute;
    width: 100vw;
    z-index: -1;
    margin-top: 130px;
    padding-bottom: 60px;
}

/* Customize the installation prompt styles */
.install-prompt {
    z-index: 50;
    position: fixed;
    left: 20px;
    right: 20px;
    top: 40%;
    bottom: 40%;
    flex-direction: column;
    background-color: #2B6DF3;
    color: #ffffff;
    padding: 16px;
    text-align: center;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    box-shadow: 0 2px 3px #00000078;
}

.install-button {
    background-color: #ffffff;
    color: #2B6DF3;
    border: none;
    padding: 8px 26px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 2px 3px #00000078;
}

.install-button:active {
    background-color: #eeeeee;
    box-shadow: 0 1px 2px #00000078;
}




#spinner-overlay {
    pointer-events: none;
    transition: 0.3s;
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background-color: rgba(0, 0, 0, 0);
    z-index: 9998;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2B6DF3;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#chat {
    transition: 0.3s;
    display: flex;
    position: fixed;
    left: 100vw;
    z-index: 10;
}


#main {
    display: flex;
}

/* Chat styles */
#chat-container {
    width: 100vw;
    height: 10vh;
    display: flex;
    top: 0;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 15px;
    overflow: hidden;
}

#main-container {
    width: 100vw;
    height: 10vh;
    display: flex;
    top: 0;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 15px;
    overflow: hidden;
}

#chat-header {
    display: flex;
    position: absolute;
    z-index: 1;
    top: 0;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    width: 100vw;
    background-color: #2B6DF3;
    color: #FAFAF7;
}

#chat-header table {
    color: #FAFAF7;
}

.profile_pic-side {
    display: flex;
    height: 50px;
    width: 50px;
    margin: 10px;
    border: none;
    border-radius: 50%;
    background: url(../images/profile-placeHolder.png);
    background-size: cover;
    color: rgb(0, 0, 0, 0);
    justify-content: center;
    align-items: center;
}

.profile_pic-top {
    display: flex;
    height: 40px;
    width: 40px;
    margin: 10px;
    border: none;
    border-radius: 50%;
    background: url(../images/profile-placeHolder.png);
    background-size: cover;
    color: rgb(0, 0, 0, 0);
    justify-content: center;
    align-items: center;
}

#back_button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 3px;
}

#back_button i {
    color: #FAFAF7;
    font-size: 24px;
}

#delete_button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 3px;
    display: none;
}

#delete_button i {
    color: #FAFAF7;
    font-size: 24px;
}

#edit_button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 3px;
    display: none;
}

#edit_button i {
    color: #FAFAF7;
    font-size: 24px;
}

#settings_button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 3px;
}

#settings_button i {
    color: #FAFAF7;
    font-size: 24px;
}

#search_button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 3px;
}

#search_button i {
    color: #FAFAF7;
    font-size: 24px;
}

#chat-header h1 {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    padding: 3px;
}

#chat-box {
    display: flex;
    position: absolute;
    width: 100vw;
    height: calc(100vh - 120px);
    top: 60px;
    left: 0;
}

#chat-messages {
    padding: 10px 25px 10px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    background: url("../images/chat-back-ltm.png");
    background-size: cover;
}

#chat-messages a {
    color: #40caf7;
}


#chatlist-box {
    display: flex;
    position: absolute;
    width: 100vw;
    height: calc(100vh - 60px);
    top: 60px;
}

#chats-list {
    width: 100%;
    padding: 10px 5px 10px 5px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    background-color: #FAFAF7;
}

.img {
    transition: 0.3s;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 10px;
}

.img.max {
    transition: 0.3s;
    background-size: contain;
    position: fixed;
    left: 0;
    right: auto;
    top: 0;
    width: 100vw;
    height: 100vh;
    color: #FAFAF7;
    background-color: black;
    z-index: 2;
}

.sent .img.max {
    left: auto;
    right: 0;
}

#gif-anim {
    max-width: 200px;
    max-height: 200px;
    background-color: rgba(0, 0, 0, 0.0);
}

#attach-menu {
    overflow: hidden;
    transition: .4s;
    position: absolute;
    display: flex;
    width: 55px;
    height: 0;
    bottom: 0;
    right: 65px;
    z-index: 3;
    background: #aacef278;
    border-radius: 15px;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
}

#attach-button {
    display: block;
    z-index: 1;
    height: 50px;
    width: 50px;
    position: fixed;
    bottom: 5px;
    right: 60px;
    align-items: center;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 24px;
    color: gray;
}

#circle-button {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: #2B6DF3;
    background: #FAFAF7;
    box-shadow: 0 2px 4px rgb(0 0 0 / 50%);
    transition: 0.3s;
}

#circle-button:disabled {
    cursor: auto;
    color: gray;
    width: 45px;
    height: 45px;
}


#uploading-page {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.message {
    max-width: 80%;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    border-radius: 0px 5px 5px 5px;
    background-color: #FAFAF7;
    color: #000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 5px;
    overflow-wrap: anywhere;
}

.message:before {
    content: "";
    position: relative;
    top: -5px;
    margin-left: -14px;
    display: block;
    margin-right: auto;
    border-width: 0px 10px 10px 0px;
    border-style: solid;
    border-color: transparent #FAFAF7 transparent transparent;
    /* Change #dcf8c6 to the desired color */
}

.message.sent {
    border-radius: 5px 0px 5px 5px;
    align-self: flex-end;
    background-color: #bee8fb;
}

.message.select {
    border-radius: 5px 0px 5px 5px;
    align-self: flex-end;
    background-color: red;
}

.message.sent:after {
    position: relative;
    top: 0px;
    content: '\f00c';
    font-family: FontAwesome;
    font-size: 12px;
    /* adjust size as needed */
    margin-right: 0px;
    margin-left: auto;
    /* adjust position as needed */
}

.message.sent:before {
    content: "";
    position: relative;
    top: -5px;
    margin-left: auto;
    margin-right: -14px;
    border-width: 0px 0px 10px 10px;
    border-style: solid;
    border-color: transparent transparent transparent #bee8fb;
    /* Change #dcf8c6 to the desired color */
}

.message .meta {
    display: flex;
    margin-right: auto;
    margin-left: 0px;
    font-size: 8px;
    color: gray;
}

.message .meta .name {
    font-weight: bold;
    color: #007AFF;
}

.message .meta .time {
    font-size: 22px;
    color: #999;
}

.message .content {
    padding: 5px 10px;
    color: #333;
}

.message.sent .meta .time {
    text-align: right;
}

.message.sent.read {
    font-weight: normal;
}

.message.sent.read:after {
    color: #00cfff;
    text-shadow: -4px 0px gray;
}

.date-separator {
    font-size: 14px;
    color: #999;
    display: flex;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    margin-bottom: 10px;
    background: #f7f7f7;
    border-radius: 5px;
    padding: 3px;
}


.chat {
    transition: 0.5s;
    width: 100%;
    margin-bottom: 15px;
    display: block;
    flex-direction: column;
    align-self: flex-start;
    border-radius: 0px 5px 5px 5px;
    background-color: #FAFAF7;
    color: #000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);

}

.chat.span {
    padding-left: 10px;
    color: black;
    margin-right: 0;
    margin-left: auto;

}

.chat table {
    width: 100%;
    font-size: 18px;
}

.metadata-lastupdate {
    text-align: right;
    font-size: 10px;
    color: gray;
}

#gif {
    display: none;
}

#search-input {
    width: 200px;
}

#search-button {
    margin-left: 10px;
}

#gif-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: flex-end;
}

#gif-container img {
    width: 150px;
    height: 150px;
    margin: 5px;
    cursor: pointer;
}

#emoji {
    display: block;
    width: calc(100vw - 50px);
    height: 150px;
}

.emoji-button {
    display: block;
    z-index: 1;
    height: 50px;
    width: 50px;
    position: fixed;
    bottom: 5px;
    left: 0;
    align-items: center;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 24px;
    color: gray;
}

.emoji-list {
    position: fixed;
    z-index: 1;
    display: none;
    background-color: #FAFAF7;
    overflow-y: scroll;
    padding: 3px;
    border-radius: 5px;
    bottom: 60px;
    left: 5px;
}

.emoji-list span {
    font-size: 24px;
    cursor: pointer;
}

.emoji-list.show {
    display: block;
}


.lazy {
    opacity: 0;
    transition: opacity 0.3s;
    width: 300px;
    height: 200px;
}

.lazy.loaded {
    opacity: 1;
}


#chat-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    width: 100vw;
    background: url("../images/chat-back-ltm.png");
    background-size: cover;
    position: fixed;
    bottom: 0;
    left: 0;
}

#message-input {
    line-height: 27px;
    width: calc(100% - 85px);
    height: 40px;
    resize: none;
    font-size: 14px;
    overflow: hidden;
    overflow-y: scroll;
    border-style: solid;
    border: none;
    border-radius: 25px;
    background-color: #FFF;
    padding-left: 50px;
    padding-right: 30px;
    padding-top: 10px;
    left: 5px;
    right: 5px;
    position: relative;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
}


#chat-form button[type=submit] {
    height: 50px;
    width: 50px;
    position: relative;
    border: none;
    border-radius: 50%;
    background-color: #2B6DF3;
    color: #FFF;
    cursor: pointer;
    font-size: 18px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
}

.new-messages {
    font-family: sans-serif;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #02db72;
    border-radius: 50%;
    color: #FAFAF7;
    text-align: center;
    height: 20px;
    width: 20px;
}

#notification {
    display: none;
    position: fixed;
    z-index: 10;
    top: 0;
    background-color: pink;
    padding: 10px;
    color: #FAFAF7;
}

#landscape-overlay {
    display: none;
    width: 100vw;
    height: 100vh;
    background-color: gray;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
}

@media (orientation: landscape) {
    #landscape-overlay {
        display: flex;
    }
}