@use "common/colors" as *; @use "common/material" as *; #chat-interface { .header { display: flex; background-color: $color-dark-surface-container; color: white; padding: 16px 16px; justify-content: end; width: fit-content; z-index: 1000; position: absolute; top: 0; right: 0; .header-content { display: flex; justify-content: space-between; align-items: center; .logo { font-size: 1.8rem; font-weight: 700; display: flex; align-items: center; } #logouts { display: none; list-style: none; gap: 10px; li { a { color: white; text-decoration: none; font-weight: 500; transition: all 0.3s ease; padding: 10px; border-radius: 10px; display: flex; flex-direction: row; align-items: center; gap: 10px; &:hover { background-color: rgba(255, 255, 255, 0.2); } } } } } } .chat-container { display: flex; width: 100%; flex-direction: column; .chat-main { flex-grow: 1; display: flex; flex-direction: column; height: 100%; .chat-header { padding: 16px; background: $color-dark-surface-container; display: flex; align-items: center; box-shadow: black 0 0 20px; .chat-header-avatar { width: 45px; height: 45px; border-radius: 20%; object-fit: cover; margin-right: 1rem; } .chat-header-info { display: flex; .info-chat { display: flex; flex-direction: column; h4 { font-size: 1.1rem; margin: 0 0 0.2rem; } p { margin: 0; font-size: 0.8rem; color: #718096; } } .online-status { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background-color: $success; margin-right: 5px; } a { display: flex; flex-direction: row; text-decoration: none; color: white; justify-content: end; padding: 0; margin: 0; position: absolute; right: 2%; top: 2%; &:hover { border: none; } } } } .chat-messages { flex: 1; padding: 1rem; overflow-y: auto; &::-webkit-scrollbar { width: 7px; } &::-webkit-scrollbar-track { background: transparent; } &::-webkit-scrollbar-thumb { background-color: $color-dark-surface-container-high; border-radius: 20px; } .message { margin-bottom: 1rem; max-width: 70%; position: relative; width: max-content; display: flex; align-items: flex-end; gap: 8px; .message-profile-pic { width: 32px; height: 32px; flex-shrink: 0; margin-bottom: 4px; img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; transition: transform 0.2s ease, box-shadow 0.2s ease; &:hover { transform: scale(1.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); } } } .message-inner { padding: 0.8rem 1rem; border-radius: 12px; position: relative; word-wrap: break-word; .message-content { word-wrap: break-word; margin-bottom: 0.3rem; } .message-reply { background-color: rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 0.5rem; margin-bottom: 0.5rem; border-left: 3px solid $color-dark-primary; .reply-content { display: flex; flex-direction: column; gap: 0.2rem; .reply-username { font-weight: 600; font-size: 0.8rem; color: $color-dark-primary; } .reply-text { font-size: 0.85rem; color: $color-dark-on-surface-variant; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; } } } .message-time { font-size: 0.7rem; color: $color-dark-on-surface-variant; margin-top: 0.3rem; text-align: right; } } &.received .message-inner { background-color: $color-dark-surface-container; border-top-left-radius: 5px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } &.sent { margin-left: auto; flex-direction: row-reverse; .message-inner { background-color: $color-dark-primary-container; color: $color-dark-on-primary-container; border-top-right-radius: 5px; } .message-time { color: $color-dark-on-primary-container; } } } .message-username { font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9rem; transition: color 0.2s ease; &:hover { color: $color-dark-primary; text-decoration: underline; } } } .chat-input-wrapper { position: relative; &::before { $height: 20px; content: ''; position: absolute; top: -$height; left: 0; right: 0; width: 100%; height: $height; background: linear-gradient( 0deg, $color-dark-surface, rgba(255, 255, 255, 0), ); } .chat-input { margin: 0 20px 20px 20px; background-color: $color-dark-surface-container; border-radius: 40px; .input-group { display: flex; .message-input { flex: 1; padding: 10px 20px; border: none; border-radius: 25px; font-size: 1rem; outline: none; background-color: inherit; caret-color: $color-dark-primary; color: $color-dark-on-surface; } .send-btn { margin: 10px; width: 50px; height: 50px; border-radius: 50%; background-color: $color-dark-primary; color: $color-dark-on-primary; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background-color 0.25s ease; @include hoverStateLayer($background: $color-dark-primary); } } } } } } } // Message Context Menu #message-context-menu { position: fixed; background-color: $color-dark-surface-container; border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); padding: 0.5rem 0; z-index: 1000; display: none; min-width: 150px; max-width: 200px; white-space: nowrap; .context-menu-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; cursor: pointer; color: $color-dark-on-surface; transition: background-color 0.2s ease; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; &:hover { background-color: rgba(255, 255, 255, 0.1); } .material-symbols { font-size: 1.1rem; flex-shrink: 0; } } } // Dialog content styles .dialog-content { padding: 1.5rem; h3 { margin: 0 0 1rem 0; color: $color-dark-on-surface; font-size: 1.2rem; } .dialog-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; } } // Reply preview styles .reply-preview { background-color: $color-dark-surface; border-radius: 8px; padding: 0.75rem; margin-bottom: 1rem; border-left: 3px solid $color-dark-primary; .reply-preview-content { color: $color-dark-on-surface-variant; font-size: 0.9rem; line-height: 1.4; strong { color: $color-dark-primary; } } }