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

684 lines
12 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);
}
2026-03-10 03:27:11 +01:00
.chat-page {
2026-03-11 16:22:17 +01:00
display: flex;
flex-direction: column;
2026-03-10 22:36:21 +01:00
width: min(100%, 800px);
2026-03-11 16:22:17 +01:00
height: min(calc(100dvh - 2rem), 1024px);
max-height: 1024px;
2026-03-10 03:27:11 +01:00
margin-inline: auto;
2026-03-10 22:36:21 +01:00
overflow-x: hidden;
}
2026-03-11 16:22:17 +01:00
.chat-header {
flex: 0 0 auto;
}
.chat-header-main {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.85rem;
}
.chat-header-title {
margin: 0;
font-size: clamp(1.35rem, 2vw, 1.75rem);
line-height: 1.1;
}
2026-03-10 22:36:21 +01:00
.call-modal-backdrop {
position: fixed;
inset: 0;
z-index: 1250;
display: grid;
place-items: center;
padding: 1.5rem;
background: rgba(3, 8, 14, 0.52);
backdrop-filter: blur(8px);
2026-03-10 03:27:11 +01:00
}
2026-03-11 08:05:54 +01:00
.call-choice-backdrop {
position: fixed;
inset: 0;
z-index: 1240;
display: grid;
place-items: center;
padding: 1rem;
background: rgba(3, 8, 14, 0.46);
backdrop-filter: blur(6px);
}
.call-choice-card {
width: min(100%, 25rem);
}
.call-choice-eyebrow {
margin-bottom: 0.45rem;
font-size: 0.78rem;
letter-spacing: 0.16em;
text-transform: uppercase;
color: var(--page-text-soft);
}
.call-choice-actions {
display: grid;
gap: 0.85rem;
}
.call-choice-button {
display: flex;
align-items: center;
gap: 0.85rem;
width: 100%;
padding: 1rem 1.1rem;
border: 1px solid var(--surface-border);
border-radius: 1rem;
color: var(--page-text);
background: var(--surface-background);
text-align: left;
}
.call-choice-button:hover,
.call-choice-button:focus-visible {
border-color: color-mix(in srgb, var(--accent-color) 35%, transparent);
background: var(--surface-hover-background);
}
.call-choice-icon {
display: inline-grid;
place-items: center;
width: 2.5rem;
height: 2.5rem;
border-radius: 999px;
background: var(--badge-background);
font-size: 1.2rem;
}
2026-03-09 19:35:08 +01:00
.back-link {
2026-03-11 16:22:17 +01:00
display: inline-flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
2026-03-09 19:35:08 +01:00
color: var(--link-color);
text-decoration: none;
2026-03-11 16:22:17 +01:00
font-size: 1.4rem;
line-height: 1;
2026-03-09 19:35:08 +01:00
}
.status-indicators {
display: flex;
flex-wrap: wrap;
gap: 0.9rem;
2026-03-11 16:22:17 +01:00
margin-left: auto;
2026-03-09 19:35:08 +01:00
}
.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;
2026-03-11 16:22:17 +01:00
flex: 1 1 auto;
2026-03-10 22:36:21 +01:00
grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr);
gap:1.25rem;
2026-03-11 16:22:17 +01:00
min-height: 0;
2026-03-09 19:35:08 +01:00
}
.peer-sidebar {
2026-03-11 16:22:17 +01:00
display: flex;
flex-direction: column;
min-height: 0;
2026-03-10 22:36:21 +01:00
padding:1rem;
2026-03-09 19:35:08 +01:00
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;
2026-03-11 16:22:17 +01:00
align-content: start;
flex: 1 1 auto;
2026-03-09 19:35:08 +01:00
gap: 0.75rem;
2026-03-11 16:22:17 +01:00
min-height: 0;
2026-03-09 19:35:08 +01:00
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);
}
2026-03-10 22:36:21 +01:00
.peer-tile-unread {
2026-03-11 00:44:36 +01:00
border-color: #c62828;
box-shadow: inset 0 0 0 2px #c62828;
2026-03-10 22:36:21 +01:00
}
2026-03-09 19:35:08 +01:00
.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 {
2026-03-11 16:22:17 +01:00
display: grid;
grid-template-rows: minmax(0, 1fr) auto;
2026-03-09 19:35:08 +01:00
min-width: 0;
2026-03-11 16:22:17 +01:00
min-height: 0;
2026-03-09 19:35:08 +01:00
}
.conversation {
display: grid;
gap: 0.85rem;
2026-03-09 20:09:46 +01:00
align-content: start;
2026-03-11 16:22:17 +01:00
min-height: 0;
2026-03-09 19:35:08 +01:00
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);
2026-03-10 02:49:27 +01:00
padding: 0.9rem 3.4rem 0.9rem 1rem;
2026-03-09 19:35:08 +01:00
border-radius: 1.2rem;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}
2026-03-10 02:49:27 +01:00
.bubble-actions {
2026-03-09 19:35:08 +01:00
position: absolute;
top: 0.45rem;
right: 0.55rem;
2026-03-10 02:49:27 +01:00
display: flex;
align-items: flex-start;
gap: 0.35rem;
}
.bubble-action {
2026-03-09 19:35:08 +01:00
width: 1.5rem;
height: 1.5rem;
2026-03-10 02:49:27 +01:00
padding: 0;
2026-03-09 19:35:08 +01:00
border: 0;
border-radius: 999px;
color: #fff;
2026-03-10 02:49:27 +01:00
background: var(--badge-background);
2026-03-09 19:35:08 +01:00
line-height: 1;
2026-03-10 02:49:27 +01:00
font-size: 0.9rem;
}
.bubble-delete {
background: var(--danger-background);
}
.bubble-forward-menu {
position: absolute;
top: 1.9rem;
right: 0;
z-index: 2;
min-width: 12rem;
padding: 0.45rem;
border: 1px solid var(--surface-border);
border-radius: 0.85rem;
background: var(--surface-background);
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}
.bubble-forward-select {
width: 100%;
border: 1px solid var(--input-border);
border-radius: 0.65rem;
color: var(--page-text);
background: var(--input-background);
2026-03-09 19:35:08 +01:00
}
.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 {
2026-03-10 02:49:27 +01:00
display: grid;
gap: 0.12rem;
2026-03-09 19:35:08 +01:00
margin-bottom: 0.35rem;
font-size: 0.78rem;
opacity: 0.7;
}
2026-03-10 02:49:27 +01:00
.bubble-time {
display: block;
}
2026-03-10 03:27:11 +01:00
.bubble-system-status {
display: inline-flex;
align-items: center;
gap: 0.7rem;
}
.bubble-spinner {
width: 1rem;
height: 1rem;
flex: 0 0 auto;
border: 0.15rem solid currentColor;
border-right-color: transparent;
border-radius: 999px;
opacity: 0.8;
animation: bubble-spin 700ms linear infinite;
}
2026-03-09 19:35:08 +01:00
.composer {
display: grid;
2026-03-10 22:36:21 +01:00
gap: 0.85rem;
2026-03-11 16:22:17 +01:00
flex: 0 0 auto;
2026-03-09 19:35:08 +01:00
padding-top: 1rem;
margin-top: 1rem;
border-top: 1px solid var(--surface-border-soft);
}
2026-03-10 22:36:21 +01:00
.composer-toolbar {
display: flex;
flex-wrap: wrap;
2026-03-10 02:49:27 +01:00
gap: 0.6rem;
2026-03-10 22:36:21 +01:00
align-items: center;
2026-03-10 02:49:27 +01:00
}
.composer-emoji-picker-shell {
position: relative;
}
2026-03-09 19:35:08 +01:00
.composer-file-input {
display: none;
}
2026-03-10 02:49:27 +01:00
.composer-camera,
2026-03-10 22:36:21 +01:00
.composer-call,
2026-03-11 00:26:49 +01:00
.composer-dictation,
2026-03-10 22:36:21 +01:00
.composer-hangup,
.composer-voice,
2026-03-10 02:49:27 +01:00
.composer-image-generate,
.composer-emoji-trigger,
2026-03-09 19:35:08 +01:00
.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);
}
2026-03-10 22:36:21 +01:00
.composer-textarea {
2026-03-11 16:22:17 +01:00
min-height: calc(2 * 1.5rem + 1.25rem);
max-height: calc(6 * 1.5rem + 1.25rem);
overflow-y: auto;
resize: none;
2026-03-10 22:36:21 +01:00
}
.composer-call {
color: var(--page-text);
background: linear-gradient(135deg, #bfe9ff, #96c3ff);
}
.composer-camera,
.composer-emoji-trigger,
.composer-plus {
2026-03-10 02:49:27 +01:00
color: var(--page-text);
background: var(--badge-background);
}
2026-03-11 00:26:49 +01:00
.composer-dictation {
color: var(--page-text);
background: linear-gradient(135deg, #f6d8ff, #ffcadb);
}
.composer-dictation-active,
2026-03-10 22:36:21 +01:00
.composer-hangup,
.composer-voice-recording {
color: #fff;
background: linear-gradient(135deg, #ff7d63, #dc3e5d);
}
.composer-voice {
color: var(--page-text);
background: linear-gradient(135deg, #ffd8bf, #ff9b8a);
}
.composer-voice-recording {
box-shadow: 0 0 0 0.2rem rgba(220, 62, 93, 0.18);
}
2026-03-10 02:49:27 +01:00
.composer-image-generate {
color: var(--page-text);
background: linear-gradient(135deg, #ffe6b0, #ffc8a8);
}
2026-03-09 19:35:08 +01:00
.send-emoji {
background: linear-gradient(135deg, #def7dd, #9bd5ff);
}
2026-03-10 02:49:27 +01:00
.composer-emoji-picker {
position: absolute;
right: 0;
bottom: calc(100% + 0.65rem);
z-index: 3;
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 0.35rem;
width: min(14rem, 70vw);
max-height: 10.35rem;
overflow-y: auto;
overflow-x: hidden;
padding: 0.65rem;
border: 1px solid var(--surface-border);
border-radius: 1rem;
background: var(--panel-background);
box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}
.composer-emoji-option {
width: 2.1rem;
height: 2.1rem;
padding: 0;
border: 0;
border-radius: 0.75rem;
background: var(--surface-background);
font-size: 1.2rem;
line-height: 1;
}
.composer-emoji-option:hover,
.composer-emoji-option:focus-visible {
background: var(--surface-hover-background);
}
2026-03-10 22:36:21 +01:00
.bubble-author,
.bubble-download,
.voice-bubble-label {
font-weight: 600;
2026-03-09 19:35:08 +01:00
}
2026-03-11 09:09:15 +01:00
.bubble-preview {
display: grid;
gap: 0.45rem;
}
.bubble-preview-label {
font-size: 0.82rem;
font-weight: 600;
opacity: 0.78;
}
2026-03-11 09:40:03 +01:00
.bubble-preview-image {
display: block;
2026-03-11 09:09:15 +01:00
width: min(240px, 100%);
2026-03-11 09:40:03 +01:00
max-width: 100%;
height: auto;
border: 1px solid var(--surface-border);
2026-03-11 09:09:15 +01:00
border-radius: 1rem;
2026-03-11 09:40:03 +01:00
background: #fff;
2026-03-11 09:09:15 +01:00
}
2026-03-10 22:36:21 +01:00
.bubble-image,
2026-03-10 02:49:27 +01:00
.bubble-video {
width: 200px;
max-width: 100%;
height: auto;
display: block;
border-radius: 1rem;
}
2026-03-10 22:36:21 +01:00
.bubble-video {
background: #000;
}
.bubble-download { color: inherit; }
.voice-bubble {
display: grid;
gap: 0.65rem;
}
.voice-bubble-label { font-size: 0.88rem; }
.voice-player {
display: block;
width: min(100%, 18rem);
2026-03-09 19:35:08 +01:00
}
.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);
}
}
2026-03-10 03:27:11 +01:00
@keyframes bubble-spin {
to {
transform: rotate(360deg);
}
}
2026-03-09 19:35:08 +01:00
@media (max-width: 767.98px) {
.chat-layout {
grid-template-columns: 1fr;
}
.peer-list {
max-height: 16rem;
}
2026-03-11 16:22:17 +01:00
.status-indicators {
width: 100%;
margin-left: 0;
}
2026-03-09 19:35:08 +01:00
.bubble {
max-width: 88%;
}
2026-03-10 22:36:21 +01:00
.composer-toolbar {
justify-content: flex-start;
}
2026-03-09 19:35:08 +01:00
}