@font-face {
    font-family: IRANSans;
    src: url(../fonts/IRANSansWebLight.woff);
}

:root {
    --color-primary:#2c8c91;
    --color-primary-light:#43d5dd;
    --color-links:#cc0066;
    --color-modal:rgb(35, 35, 35);
}

body {
    padding: 0;
    margin: 0;
    background-color: rgba(1, 1, 1, 0.9);
    color: white;
    overflow: hidden;
    font-family: IRANSans;
    position: relative;
}

header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-bottom: 1px solid black;
    height: 50px;
    align-items: center;
    padding: 5px;
}

.header-btn {
    background: none;
    border: none;
    color: white;
    box-shadow: none;
    cursor: pointer;
}

.chat-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.chat-list {
    height: 93vh;
    overflow: auto;
}

.empty-chat {
    display: flex;
    justify-content: center;
    padding: 100px;
    color: gray;
    font-size: larger;
}

.chat-item {
    border-bottom: 1px solid gray;
    height: 5%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    cursor: pointer;
}

.chat-item-avatar {
    border-radius: 50%;
    max-width: 45px;
    min-width: 45px;
    min-height: 45px;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-primary);
    overflow: hidden;
}

.chat-item-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: block
}

.chat-item-detail {
    display: flex;
    width: 100%;
    flex-direction: column;
    padding-left: 10px;
}

.chat-item-title {
    font-weight: bold;
    font-size: large;
    display: flex;
    gap: 5px;
    align-items: center;
}

.chat-item-summery {
    font-weight: lighter;
    font-style: italic;
}

.chat-item-notif {
    width: 90px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-direction: column;
}

.chat-item-date {
    font-size: small;
    font-weight: lighter;
}

.chat-item-badge {
    font-size: smaller;
    border-radius: 50%;
    background-color: red;
    color: white;
    width: 23px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.side-menu {
    height: 95vh;
    width: 70%;
    position: fixed;
    top: 60px;
    background-color: rgb(15, 15, 15);
    display: none;
}

.side-menu-header {
    height: 120px;
    border-bottom: 5px solid gray;
}

.menu-header-detail {
    max-height: 100px;
    height: 100%;
    width: 50%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;


}

.menu-header-avatar {
    border-radius: 50%;
    max-width: 50px;
    width: 100%;
    height: 50px;
}

.menu-header-name {
    font-weight: bold;
}

.menu-header-username {
    font-weight: 100;
    font-size: small;
}

.side-menu-main {
    height: 100%;
}

.menu-main-detail ul {
    padding-inline-start: 0;
    list-style: none;
}

.menu-main-detail ul li {
    border-bottom: 1px solid gray;
}

.menu-main-detail ul li a {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.app-version {
    font-size: smaller;
    color: gray;
    padding: 10px;
    text-align: center;
    margin-top: 30%;
}

.logout {
    color: red !important;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
    padding: 10px;
}

.login-form {
    background-color: var(--color-primary);
    border-radius: 15px;
    padding: 15px;
    width: 80%;
}

.alert ul{
    list-style: none;
    background-color: rgb(248, 189, 189);
    padding-inline-start: 0;
    padding: 5px;
    border: none;
    border-radius: 10px;
}

.alert ul li {
    color: red;
    margin-left: 5px;
}

.success ul{
    list-style: none;
    background-color: rgb(190, 255, 190);
    padding-inline-start: 0;
    padding: 5px;
    border: none;
    border-radius: 10px;
}

.success ul li {
    color: green;
    margin-left: 5px;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.input-group label {
    /*color: black;*/
    font-size: large;
}

.input-group label span {
    color: red;
}

.input-group label small {
    color: var(--color-primary-light);
    opacity: 0.;
}

.input-group input{
    padding: 10px;
    border-radius: 10px;
    border: none;
    box-shadow: inset -1px -1px 1px ;
    height: 35px;
}

.checker {
    flex-direction: row;
    justify-content: space-between;
    margin-top: 15px;
    align-items: center;
}

.form-btn {
    background-color: var(--color-links);
    color: white;
    box-shadow: none;
    cursor: pointer;
}

.login-form .links {
    display: flex;
    flex-direction: column;
    font-size: smaller;
    gap: 10px;
    margin-top: 10px;
}

.login-form .links a {
    text-decoration: none;
    color:var(--color-links);
    font-weight: bold;
}


/* Chats */

.chat-main {
    overflow: hidden;
    height: 95%;
    background-image: url(../images/bg/chat-bg.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column-reverse;
}

.reply-preview {
    width: 100%;
    padding: 0 10px;
    display: none;
    gap: 5px;
    flex-direction: row;
}

.reply-section {
    background-color: rgba(110, 110, 110, 0.7);
    width: 97%;
    border-radius: 15px 15px 0 0;
    padding: 5px 0 5px 40px;
    position: relative;
}

.cancel-reply {
    position: absolute;
    left: 10px;
    top: 5px;
    border: none;
    background: none;
    box-shadow: none;
    border-radius: 50%;
    /*width: 20px;*/
    padding: 5px 8px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
}

.reply-space {
    width: 83px;
}

.message-group {
    display: flex;
    flex-direction: row;
    gap: 5px;
    padding: 10px;
    padding-top: 0;
}

.message-input {
    width: 100%;
    border-radius: 10px;
    border: none;
    box-shadow: inset -1px -1px 1px ;
    height: 50px;
    padding: 10px;
    font-family: IRANSans;
    resize: none;
}

.message-input1 {
    width: 100%;
    border-radius: 10px;
    border: none;
    box-shadow: inset -1px -1px 1px ;
    height: 50px !important;
    padding: 10px;
    font-family: IRANSans;
    resize: none;
}

.send-btn {
    border-radius: 50%;
    width: 55px;
    border: none;
    box-shadow: inset -1px -1px 1px ;
}

.chat-messages {
    height: 90%;
    max-height: 90%;
    overflow: auto;
    display: flex;
    flex-direction: column-reverse;
    margin-bottom: 10px;
}

.message-box {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
}

.message-sender {
    margin: 0 15px;
    text-shadow: black -1px -1px 1px;
}

.message-text {
    background-color: aliceblue;
    color: black;
    margin: 0 10px;
    padding: 5px 10px 25px 5px;
    border-radius: 15px;
    font-size: 11pt;
    max-width: 70%;
    min-width: 130px;
    width: fit-content;
    position: relative;
}

.message-reply-section {
    background-color: rgba(110, 110, 110, 0.7);
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    border-radius: 15px 15px 0 0;
}

.message-reply-text {
    margin: 5px 5px 0 5px;
    color: white;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
}

.chat-item-preview {
    font-size: small;
}


.message-text .text {
    margin: 0;
}

.reply-btn {
    position: absolute;
    bottom: 0;
    right: -40;
    border: none;
    background: none;
    box-shadow: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    height: 35px;
    cursor: pointer;
}

.message-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    position: absolute;
    bottom: 5px;
    right: 10px;
}

.message-datetime {
    font-size: smaller;
    color: #5e5e5e;
}

.message-read-status svg{
    width: 20px;
    height: 20px;
}

.profile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
    padding: 10px;
}

.profile-form {
    background-color: var(--color-primary);
    border-radius: 15px;
    padding: 15px;
    width: 80%;
    color: white;
}

.new-chat-modal {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgba(1, 1, 1, 0.8);
}

.new-chat-modal-content {
    width: 70%;
    border-radius: 15px;
    position: relative;
}

.new-chat-form {
    background-color: var(--color-primary);
    border-radius: 15px;
    padding: 15px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: brown;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: none;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 25px;
    height: 25px;
    cursor: pointer;
}

.new-group-modal {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgba(1, 1, 1, 0.8);
}

.new-group-modal-content {
    width: 70%;
    border-radius: 15px;
    position: relative;
}

.new-group-form {
    background-color: var(--color-primary);
    border-radius: 15px;
    padding: 15px;
}

.chat-detail-modal {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: none;
    justify-content: center;
    align-items: flex-start;
    background-color: rgba(1, 1, 1, 0.8);
}

.chat-detail-content {
    width: 70%;
    border-radius: 15px;
    position: relative;
    margin-top: 70px;
    background-color: var(--color-primary);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    max-height: 70%;
}

.chat-detail-head {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
}

.chat-detail-head-title {
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-detail-head-details {
    font-size: smaller;
    display: flex;
    align-items: center;
    flex-direction: column;
}



.close-detail {
    padding: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
    height: 40px;
}

.close-detail-btn {
    border: none;
    border-radius: 15px;
    color: white;
    background-color: brown;
    width: 80%;
    cursor: pointer;
}

.chat-detail-body {
    border-top: 1px solid var(--color-primary-light);
    border-bottom: 1px solid var(--color-primary-light);
    width: 100%;
    overflow: auto;
}

.chat-detail-body-title {
    margin-left: 10px;
    font-size: large;
    margin-top: 5px;
}

.chat-detail-body-details {
    padding: 15px;
    overflow: auto;
}

.chat-detail-add-user {
    width: 100%;
    display: flex;
    justify-content: center;
}

.chat-detail-add-user form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    gap: 10px;
    margin: 0;
    width: 80%;
}

.chat-detail-add-user form input {
    border: none;
    border-radius: 15px;
    padding: 10px;
    font-size: large;
    width: 99%;
}

.chat-detail-add-user form button {
    border: none;
    border-radius: 15px;
    color: white;
    background-color: green;
    padding: 10px;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.delete-group {
    width: 100%;
    display: flex;
    justify-content: center;
}

.delete-group-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    gap: 10px;
    margin: 0;
    width: 80%;
}

.delete-group-btn {
    border: none;
    border-radius: 15px;
    color: white;
    background-color: red;
    padding: 10px;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.member {
    border-bottom: 1px solid var(--color-primary-light);
    margin-bottom: 5px;
    padding: 5px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.member .member-info {
    margin: 0;
}

.member-btn {
    border: none;
    background: none;
    box-shadow: none;
    color: white;
    font-family: IRANSans;
    cursor: pointer;
}

.member .member-info .member-username {
    font-size: smaller;
}

.member .details .owner-tag {
    font-size: smaller;
    font-weight: lighter;
}

.member .details .remove-user form {
    margin: 0;
}

.member .details .remove-user form .remove-btn {
    background: none;
    background-color: red;
    color: white;
    border-radius: 50px;
    border:  none;
    box-shadow: none;
    cursor: pointer;
    padding: 5px 5px;
}

.install-btn {
    position: absolute;
    bottom: 20%;
    width: 100%;
    display: none;
    justify-content: center;
}

.install-btn button {
    border: none;
    background: none;
    box-shadow: none;
    background-color: #37b694;
    color: white;
    padding: 15px;
    border-radius: 15px;
    width: 50%;
    cursor: pointer;
    font-size: large;
}

.toggler {
    margin-right: 10px;
}

.toggler input {
    display: none;
}

.toggler label {
    display: block;
    position: relative;
    width: 72px;
    height: 36px;
    border: 1px solid #d6d6d6;
    border-radius: 36px;
    background: #e4e8e8;
    cursor: pointer;
}

.toggler label::after {
    display: block;
    border-radius: 100%;
    background-color: #d7062a;
    content: '';
    animation-name: toggler-size;
    animation-duration: 0.15s;
    animation-timing-function: ease-out;
    animation-direction: forwards;
    animation-iteration-count: 1;
    animation-play-state: running;
}

.toggler label::after, .toggler label .toggler-on, .toggler label .toggler-off {
    position: absolute;
    top: 50%;
    left: 25%;
    width: 26px;
    height: 26px;
    transform: translateY(-50%) translateX(-50%);
    transition: left 0.15s ease-in-out, background-color 0.2s ease-out, width 0.15s ease-in-out, height 0.15s ease-in-out, opacity 0.15s ease-in-out;
}

.toggler input:checked + label::after, .toggler input:checked + label .toggler-on, .toggler input:checked + label .toggler-off {
    left: 75%;
}

.toggler input:checked + label::after {
    background-color: #50ac5d;
    animation-name: toggler-size2;
}

.toggler .toggler-on, .toggler .toggler-off {
    opacity: 1;
    z-index: 2;
}

.toggler input:checked + label .toggler-off, .toggler input:not(:checked) + label .toggler-on {
    width: 0;
    height: 0;
    opacity: 0;
}

.toggler .path {
    fill: none;
    stroke: #fefefe;
    stroke-width: 7px;
    stroke-linecap: round;
    stroke-miterlimit: 10;
}

.auto-refresh {
    display: flex;
    align-items: center;
}

.auto-refresh label {
    width: 36;
    height: 18;
}

.auto-refresh label::after, .auto-refresh label .toggler-on, .auto-refresh label .toggler-off {
    width: 18px;
    height: 18px;
}




/* Media Query */
@media (max-width: 480px)  {
    .chat-list {
        height: 93vh;
        overflow: auto;
    }

    .chat-item {
        padding: 15px 5px;
    }

    .chat-item-notif {
        width: 100px;
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        flex-direction: column;
    }

    .reply-section {
        width: 86%;
    }
}

/*@media (max-width: 768px) {*/
/*    .reply-section {*/
/*        width: 95%;*/
/*    }*/
/*}*/


@media (min-width: 1080px) {
    .reply-section {
        width: 104%;
    }
}


