Files
PrivateChat/client/src/app/chat-page.component.scss

368 lines
6.1 KiB
SCSS
Raw Normal View History

2026-03-09 19:35:08 +01:00
:host {
display: block;
min-height: 100dvh;
color: var(--page-text);
}
.chat-shell {
min-height: 100dvh;
}
.panel {
border: 1px solid var(--surface-border);
border-radius: 1.75rem;
background: var(--panel-background);
backdrop-filter: blur(18px);
box-shadow: 0 20px 60px var(--shadow-color);
}
.back-link {
color: var(--link-color);
text-decoration: none;
}
.status-indicators {
display: flex;
flex-wrap: wrap;
gap: 0.9rem;
}
.status-indicator {
display: inline-flex;
align-items: center;
gap: 0.45rem;
font-size: 0.9rem;
color: var(--page-text-soft);
}
2026-03-09 20:09:46 +01:00
.status-indicator-action {
padding: 0;
border: 0;
background: transparent;
}
.status-indicator-action:not(:disabled) {
color: var(--page-text);
cursor: pointer;
}
.status-indicator-action:not(:disabled):hover,
.status-indicator-action:not(:disabled):focus-visible {
color: var(--accent-color);
}
.status-indicator-action:disabled {
cursor: default;
opacity: 1;
}
2026-03-09 19:35:08 +01:00
.status-led {
width: 0.8rem;
height: 0.8rem;
border-radius: 999px;
box-shadow: 0 0 0 1px var(--input-border);
}
.status-led-ok {
background: #59d66f;
}
.status-led-connecting {
background: #f3ad3d;
}
.status-led-offline {
background: #eb5d64;
}
.chat-layout {
display: grid;
grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr);
gap: 1.25rem;
}
.peer-sidebar {
padding: 1rem;
border-radius: 1.3rem;
border: 1px solid var(--surface-border-soft);
background: var(--panel-soft-background);
}
.peer-count {
display: inline-flex;
min-width: 2rem;
justify-content: center;
padding: 0.35rem 0.65rem;
border-radius: 999px;
font-size: 0.85rem;
background: var(--badge-background);
}
.peer-list {
display: grid;
gap: 0.75rem;
max-height: calc(100dvh - 17rem);
overflow: auto;
}
.peer-tile {
2026-03-09 20:40:21 +01:00
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 0.75rem;
align-items: center;
2026-03-09 19:35:08 +01:00
width: 100%;
2026-03-09 20:40:21 +01:00
padding: 0.8rem 0.85rem 0.8rem 1rem;
2026-03-09 19:35:08 +01:00
border: 1px solid var(--surface-border);
border-radius: 1rem;
color: inherit;
background: var(--surface-background);
transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
2026-03-09 20:40:21 +01:00
.peer-tile-main {
min-width: 0;
padding: 0;
border: 0;
color: inherit;
background: transparent;
}
.peer-tile-delete {
width: 2.2rem;
height: 2.2rem;
padding: 0;
border: 0;
border-radius: 999px;
background: transparent;
font-size: 1rem;
line-height: 1;
}
.peer-tile-delete:hover,
.peer-tile-delete:focus-visible {
background: var(--badge-background);
}
2026-03-09 19:35:08 +01:00
.peer-tile:hover,
.peer-tile:focus-visible,
.peer-tile-active {
transform: translateY(-1px);
border-color: color-mix(in srgb, var(--accent-color) 35%, transparent);
background: var(--surface-hover-background);
}
.peer-tile-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
}
.peer-tile-title {
display: inline-flex;
align-items: center;
gap: 0.45rem;
min-width: 0;
}
.peer-typing-dots {
display: inline-flex;
align-items: center;
gap: 0.2rem;
min-height: 0.9rem;
}
.peer-typing-dots span {
width: 0.38rem;
height: 0.38rem;
border-radius: 999px;
background: var(--page-text);
opacity: 0.28;
animation: peer-typing-pulse 900ms infinite ease-in-out;
}
.peer-typing-dots span:nth-child(2) {
animation-delay: 120ms;
}
.peer-typing-dots span:nth-child(3) {
animation-delay: 240ms;
}
.peer-tile-status {
flex: 0 0 auto;
}
.chat-main {
min-width: 0;
}
.conversation {
display: grid;
gap: 0.85rem;
2026-03-09 20:09:46 +01:00
align-content: start;
2026-03-09 19:35:08 +01:00
min-height: 24rem;
max-height: calc(100dvh - 20rem);
overflow: auto;
padding: 0.5rem 0;
}
.bubble {
position: relative;
2026-03-09 20:09:46 +01:00
align-self: start;
2026-03-09 19:35:08 +01:00
max-width: min(75%, 34rem);
padding: 0.9rem 1rem;
border-radius: 1.2rem;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}
.bubble-delete {
position: absolute;
top: 0.45rem;
right: 0.55rem;
width: 1.5rem;
height: 1.5rem;
border: 0;
border-radius: 999px;
color: #fff;
background: var(--danger-background);
line-height: 1;
font-size: 1rem;
}
.bubble-incoming {
justify-self: start;
color: var(--incoming-bubble-text);
background: var(--incoming-bubble-background);
}
.bubble-outgoing {
justify-self: end;
color: var(--outgoing-bubble-text);
background: var(--outgoing-bubble-background);
}
.bubble-system {
justify-self: center;
max-width: 90%;
color: var(--page-text-soft);
background: var(--badge-background);
}
.bubble-meta {
display: flex;
justify-content: space-between;
gap: 1rem;
margin-bottom: 0.35rem;
font-size: 0.78rem;
opacity: 0.7;
}
.composer {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
gap: 0.9rem;
align-items: end;
padding-top: 1rem;
margin-top: 1rem;
border-top: 1px solid var(--surface-border-soft);
}
.composer-file-input {
display: none;
}
.composer-plus,
.send-emoji {
width: 3.25rem;
height: 3.25rem;
border: 0;
border-radius: 999px;
font-size: 1.35rem;
}
.composer-textarea,
.composer-textarea:focus {
color: var(--page-text);
background-color: var(--input-background);
border-color: var(--input-border);
box-shadow: none;
}
.composer-textarea::placeholder {
color: var(--placeholder-color);
}
.composer-plus {
color: var(--page-text);
background: var(--badge-background);
}
.send-emoji {
background: linear-gradient(135deg, #def7dd, #9bd5ff);
}
.bubble-image {
width: 200px;
max-width: 100%;
height: auto;
border-radius: 1rem;
display: block;
}
.bubble-download {
color: inherit;
font-weight: 600;
}
.bubble-json {
white-space: pre-wrap;
word-break: break-word;
margin: 0;
}
.empty-chat {
padding: 1.25rem;
border: 1px dashed var(--input-border);
border-radius: 1rem;
color: var(--page-text-muted);
text-align: center;
}
.empty-peers {
min-height: 10rem;
}
.h3,
.small {
color: var(--page-text);
}
@keyframes peer-typing-pulse {
0%,
80%,
100% {
opacity: 0.28;
transform: translateY(0);
}
40% {
opacity: 1;
transform: translateY(-1px);
}
}
@media (max-width: 767.98px) {
.chat-layout {
grid-template-columns: 1fr;
}
.peer-list {
max-height: 16rem;
}
.bubble {
max-width: 88%;
}
}