/* ====================================== CHAT LIST STYLES ====================================== */
.chats-list-header {
    justify-content: space-between;
    padding-bottom: 3px;
}

.chats-list {
    flex: 1;
    overflow-y: auto;
    min-width: 300px;
}

.chat-item:hover {
    cursor: pointer;
    overflow: hidden;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 100%;
}

.chat-name {
    display: inline-flex;
    justify-content: center;
    flex-direction: column;
    padding-left: 5px;
    overflow: hidden;
}

/* ====================================== MESSAGES BLOCK STYLES ====================================== */
.messages-block-all {
    flex: 3;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.messages-block {
    flex: 3;
    display: flex;
    flex-direction: column;
    overflow-wrap: anywhere;
    justify-content: end;
    overflow-y: auto;
}

.messages-block-list {
    display: flex;
    flex-direction: column-reverse;
    overflow-y: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ====================================== MESSAGES STYLES ====================================== */
.message-item {
    padding-top: 3px;
    padding-bottom: 3px;
}

.message-user-banner {
    width: fit-content;
    align-items: center;
    height: 20px;
    display: inline-flex;
    border-radius: 10px 5px 5px 10px;
    position: relative;
    top: 4px;
}

.message-user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 100%;
    vertical-align: text-bottom;
}

.message-user-name {
    vertical-align: text-bottom;
    padding-right: 3px;
    padding-left: 3px;
    padding-bottom: 3px;
    cursor: default;
}

.message-text {
    white-space: pre-line;
}

/* ====================================== LISTS OF USERS STYLES ====================================== */
.user-list {
    max-height: 400px;
    overflow-y: auto;
}

.user-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2px;
    padding-bottom: 2px;
}

.user-list-img {
    border-radius: 100%;
    width: 30px;
    height: 30px;
}

.user-list-block {
    display: flex;
}

.user-list-checkboxes {
    padding-left: 0;
}

/* ====================================== AVATAR PREVIEW ====================================== */
.avatar-preview-container:hover .avatar-preview-overlay {
    opacity: 1;
}

.delete-avatar-button:hover i {
    color: red;
}

.avatar-preview-container:hover img {
    cursor: pointer;
    filter: blur(2px);
}

.avatar-preview-overlay {
    position: absolute;
    opacity: 0;
    left: 22px;
    width: 60px;
    height: 60px;
    bottom: -28px;
}

/* ====================================== ALL NAV BARS STYLES ====================================== */
.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    min-height: 40px;
    max-height: 40px;
    padding-left: 5px;
    padding-top: 0;
    padding-bottom: 0;
    padding-right: 5px;
}

.nav-button img {
    flex-shrink: 0;
    width: 35px;
    height: 35px;
}

.nav-button img:only-child {
    margin-right: 0;
}

.nav-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    min-width: 50px;
}

.nav-img {
    border-radius: 100%;
    width: 35px;
    height: 35px;
}

.maintext {
    line-height: 21px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    text-align: left;
}

.subtext {
    color: #666;
    font-size: small;
    line-height: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    text-align: left;
}

.chat-header-text {
    display: flex;
    flex-direction: column;
    padding-right: 10px;
    padding-left: 5px;
    align-items: flex-start;
    min-width: 0;
    overflow: hidden;
    flex: 1;
}

/* ====================================== TOP NAV BAR  ====================================== */

.top-nav-bar {
    max-height: 56px;
    min-height: 56px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 0;
    padding-top: 0;
    flex-wrap: nowrap;
}

/* ====================================== DESKTOP NAV BAR ====================================== */

.desktop-nav-bar {
    max-height: 56px;
    min-height: 56px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 0;
    padding-top: 0;
    flex-wrap: nowrap;
    max-width: 100%;
    justify-content: center;
    border-radius: 0 0 10px 10px;
}

/* ====================================== INPUT NAVBAR ====================================== */

.input-nav-bar {
    max-height: 300px;
    min-height: 56px;
    flex-wrap: nowrap;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

#send_message_alert {
    width: 100%;
    margin-bottom: 8px;
    margin-top: 0 !important;
}

#message_field {
    flex: 1;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
    padding: 8px 12px;
    width: 100%;
}

.message-input {
    padding: 3px 10px 0 10px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}

.message-input textarea {
    flex: 1;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
    padding: 8px 12px;
}

.message-input button {
    flex-shrink: 0;
    padding: 8px 12px;
    min-width: 48px;
    height: auto;
    align-self: stretch;
}

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

#send_icon {
    transition: transform 0.25s ease-in-out;
}

.icon-animation {
    animation: iconMove 0.25s ease-in-out;
}

@keyframes iconMove {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
        opacity: 0;
    }
    51% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ====================================== GENERAL ====================================== */

html,
body {
    margin: 0;
    height: 100%;
    padding: 0;
}

.container {
    display: flex;
    max-width: 100vw;
    max-height: calc(100%-56px);
    min-height: calc(100%-56px);
    overflow: hidden;
    padding: 0;
}

.super-container {
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.pseudo-chats {
    height: 10000px;
}

ul {
    list-style-type: none;
}

.modal_dialog {
    border-radius: 15px;
    border: 1px;
}

.pointer {
    cursor: pointer;
}

.font-icon {
    color: #666;
}

.connection-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: red;
    color: white;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: larger;
}

.btn-outline-success:hover .font-icon,
.btn-outline-primary:hover .font-icon,
.btn-outline-danger:hover .font-icon,
.btn-outline-warning:hover .font-icon,
.btn-outline-info:hover .font-icon,
.btn-outline-dark:hover .font-icon,
.btn-outline-secondary:hover .font-icon,
.btn-outline-light:hover .font-icon {
    color: white !important;
}

@media (hover: none) {
    button.btn:hover,
    button.btn:first-child:hover,
    input[type='button'].btn:hover,
    input[type='submit'].btn:hover,
    :not(.btn-check) + button.btn:hover {
        color: var(--bs-btn-color) !important;
        background-color: var(--bs-btn-bg) !important;
        border-color: var(--bs-btn-border-color) !important;
    }
}


.fa-spinner {
  animation: spin 2s infinite linear;
}


@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}