@font-face {
	font-family: 'Persian';
	font-style: normal;
	font-weight: normal;
	src: url('persian-font.woff2') format('woff2');
}

body {
    --fontname: 'Persian';
    font-family: var(--fontname);
    background: #f0f0f0;
}

button, input, textarea {
    font-family: var(--fontname);
    border-radius: 10px;
}

button {
    color: rgb(0 0 0 / 70%);
    background: aliceblue;
    cursor: pointer;
}

.error {
    color: red;
    text-align: center;
}

.twin-forms {
    text-align: center;
}

.twin-forms * {
    margin-bottom: 10px;
    padding: 0.8rem;
    font-size: 1.4rem;
    text-align: center;
}

.chat-container {
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    max-width: 100%;
    max-height: 90%;
    margin: auto;
}

.chat-back-button {
    font-size: 1rem;
    font-weight: bold;
    text-decoration-line: none;
    padding: 6px;
    color: rgb(0 0 0 / 70%);
    background: aliceblue;
    border-radius: 5px;
}

.chat-header {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
}


.chat-menu {
    display: inline-block;
    position: relative;
    margin-left: 10px;
}
.chat-menu button {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    vertical-align: top;
    cursor: pointer;
}
.menu-options {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    width: max-content;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    z-index: 10;
}
.menu-options a, .menu-options button {
    display: block;
    padding: 8px 12px;
    font-size: 1rem;
    text-decoration: none;
    color: #333;
}
.menu-options a:hover {
    background: #f0f0f0;
}



#load-more {
    margin-top: 10px;
}
#load-more button {
    font-size: 1rem;
    border: none;
}

#messages {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
    background: #f7f7f7;
    margin: 2px -10px;
}

.message {
    margin-bottom: 0.3rem;
    overflow-wrap: break-word;
    background: white;
    border-radius: 10px;
    padding: 5px;
}
.message-header {
    display: flow-root;
}
.message-menu {
    float: left;
    top: -2vh;
}
.message .username {
    font-weight: bold;
    float: right;
}
.message-content {
    white-space: pre-wrap;
}
.message .msg-time {
    opacity: 50%;
    text-align: left;
}


.message-input {
    display: flex;
    column-gap: 1em;
    text-align: center;
    margin-top: 1rem;
    
}
.message-input textarea {
    width: 80%;
    padding: 10px;
    margin: 2px 2px 0 0;
    font-size: 1.1rem;
}
.message-input button {
    font-size: 1.2rem;
    padding: 1% 2%;
}


/* Minimal styles for the chat list items, assuming .chat-container is styled */
.chat-list-header {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 1rem 0 0.5rem 0;
    text-align: center;
}

.chat-list {
    display: flex;
    flex-flow: column;
    padding: 0;
    margin: auto;
    list-style: none;
    text-align: center;
}

.chat-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.chat-item:last-child {
    border-bottom: none;
}

/* Optional: Add hover effect */
.chat-link {
    text-decoration-line: none;
}
.chat-item:hover {
    background-color: #f9f9f9;
    cursor: pointer;
}

.chat-info {
    flex-grow: 1;
    margin-right: 10px;
}

.chat-username {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: black;
}

.last-message-preview {
    font-size: 0.9rem;
    color: #555;
    display: block;
}

.sender-username {
    font-weight: bold;
}

.summarized-message {
    white-space: normal;
    overflow-wrap: break-word;
}