{% set options = {
}|merge(options|default({})) %}
<style>
:root {
/* =========================
TELEGRAM COLOR SYSTEM
========================= */
--tg-bg: #e7ebf0;
--tg-surface: #ffffff;
--tg-incoming: #ffffff;
--tg-outgoing: #d9fdd3;
--tg-primary: #3390ec;
--tg-online: #31d158;
--tg-text: #0f172a;
--tg-muted: #6b7280;
--tg-border: #e6e6e6;
--tg-shadow: 0 0.0625rem 0.125rem rgba(0,0,0,0.06);
}
/* =========================
GLOBAL
========================= */
:root {
--vh: 100dvh;
}
html, body {
height: var(--vh);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
color: var(--tg-text);
overflow: hidden !important;
font-size: 1rem;
@media (max-width: 769px) {
font-size: 18px;
}
}
/* =========================
LAYOUT
========================= */
.layout {
height: 100%;
display: flex;
flex-direction: column;
background: var(--tg-bg);
max-width: 62.5rem;
border-left: 0.0625rem solid var(--tg-border);
border-right: 0.0625rem solid var(--tg-border);
}
.layout-container {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.screens-container {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.screens {
flex: 1;
overflow: hidden;
background: var(--tg-bg);
}
/* =========================
TOPBAR
========================= */
.topbar {
background: var(--tg-surface);
border-bottom: 0.0625rem solid var(--tg-border);
box-shadow: var(--tg-shadow);
z-index: 10;
}
/* avatar */
.topbar .rounded-circle {
box-shadow: var(--tg-shadow);
}
/* online */
.text-success {
color: var(--tg-online) !important;
}
/* =========================
CHAT AREA
========================= */
.chat {
height: 100%;
display: flex;
flex-direction: column;
position: relative;
}
.chat-scroll-down {
position: absolute;
bottom: 1rem;
right: 1rem;
width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
background: var(--tg-surface);
border: 0.0625rem solid var(--tg-border);
box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.12);
color: var(--tg-muted);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 10;
transition: opacity .2s;
}
.chat-bodies {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
}
.chat-body {
flex: 1;
overflow-y: auto;
padding: 0.75rem 0.625rem;
background: radial-gradient(rgba(0,0,0,0.02) 0.0625rem, transparent 0.0625rem);
background-size: 1.125rem 1.125rem;
}
/* message rows */
.message {
display: flex;
margin-bottom: 0.5rem;
}
.message-in { justify-content: flex-start; }
.message-out { justify-content: flex-end; }
/* =========================
BUBBLES (REAL TELEGRAM COLORS)
========================= */
.bubble {
max-width: 78%;
padding: 0.5625rem 0.75rem 0.4375rem 0.75rem;
border-radius: 1rem;
font-size: 0.906rem;
line-height: 1.35;
word-break: break-word;
box-shadow: var(--tg-shadow);
}
/* incoming */
.message-in .bubble {
background: var(--tg-incoming);
color: var(--tg-text);
border-top-left-radius: 0.375rem;
border-top-right-radius: 1rem;
border-bottom-right-radius: 1rem;
border-bottom-left-radius: 1rem;
border: 0.0625rem solid rgba(0,0,0,0.04);
}
/* outgoing */
.message-out .bubble {
background: var(--tg-outgoing);
color: var(--tg-text);
border-top-right-radius: 0.375rem;
border-top-left-radius: 1rem;
border-bottom-right-radius: 1rem;
border-bottom-left-radius: 1rem;
border: 0.0625rem solid rgba(0,0,0,0.03);
}
/* timestamp */
.time {
font-size: 0.625rem;
color: var(--tg-muted);
text-align: right;
margin-top: 0.25rem;
}
/* date label */
.chat-group { position: relative; }
/* unread divider - hidden */
.chat-unread-divider { display: none; }
/* unread badge on scroll button */
.chat-unread-badge {
position: absolute;
top: -0.5rem;
left: 50%;
transform: translateX(-50%);
background: var(--tg-primary);
color: #fff;
font-size: 0.6875rem;
font-weight: 600;
min-width: 1.25rem;
height: 1.25rem;
border-radius: 62.5rem;
display: flex;
align-items: center;
justify-content: center;
padding: 0 0.25rem;
white-space: nowrap;
pointer-events: none;
}
.chat-date-label {
display: flex;
justify-content: center;
margin: 0.75rem 0 0.5rem;
position: sticky;
top: 0;
z-index: 1;
}
.chat-date-label span {
background: rgb(255,255,255);
color: var(--tg-muted);
font-size: 0.8125rem;
padding: 0.1875rem 0.625rem;
border-radius: 3.125rem;
}
/* =========================
MESSAGE INPUT
========================= */
.message-input-container {
background: var(--tg-surface);
border-top: 0.0625rem solid var(--tg-border);
padding: 0.5rem 0.625rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.message-input-container input {
border: 0.0625rem solid var(--tg-border);
border-radius: 62.5rem;
padding: 0.625rem 0.875rem;
font-size: 0.875rem;
box-shadow: none;
}
.message-input-container input:focus {
border-color: var(--tg-primary);
outline: none;
}
.message-input-container .btn {
width: 2.625rem;
height: 2.625rem;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
/* =========================
BOTTOM NAVBAR
========================= */
.navbar {
background: var(--tg-surface);
border-top: 0.0625rem solid var(--tg-border);
height: 4.375rem;
padding: 0;
}
.navbar a {
flex: 1;
text-align: center;
text-decoration: none;
color: var(--tg-muted);
font-size: 0.8125rem;
}
.navbar a i {
display: block;
font-size: 1.5rem;
margin-bottom: 0.1875rem;
}
.navbar a.active { color: var(--tg-primary); }
.navbar a.active i { color: var(--tg-primary); }
.topbar .btn-link { color: var(--tg-muted); }
.topbar .btn-link:hover { color: var(--tg-primary); }
@media (max-width: 48rem) {
.bubble { max-width: 85%; font-size: 0.844rem; }
.message-input-container { padding: 0.375rem 0.5rem; }
.navbar { height: 4.375rem; }
}
.screen { display: none; height: 100%; }
.screen.active { display: flex; flex-direction: column; }
.chat-list {
display: flex;
flex-direction: column;
gap: 0.625rem;
padding: 0.625rem;
}
.chat-item {
display: flex;
align-items: center;
gap: 0.625rem;
padding: 0.625rem;
background: white;
border-radius: 0.75rem;
cursor: pointer;
}
.chat-item .avatar {
width: 2.625rem;
height: 2.625rem;
border-radius: 50%;
background: #3390ec;
color: white;
display: flex;
align-items: center;
justify-content: center;
}
.chat-info .name { font-weight: 600; }
.chat-info .preview { font-size: 0.75rem; color: #6b7280; }
.contacts-screen { display:flex; flex-direction:column; height:100%; position:relative; }
.contacts-header { background:var(--tg-surface); border-bottom:0.0625rem solid var(--tg-border); }
.contacts-list { flex:1; overflow-y:auto; padding:0.5rem; }
.contact-item {
display:flex; align-items:center; gap:0.875rem;
padding:0.75rem; margin-bottom:0.375rem;
background:var(--tg-surface); border-radius:1rem;
color:var(--tg-text); transition:.15s;
}
.contact-item:hover { background:#f8fafc; }
.contact-avatar {
width:3.25rem; height:3.25rem; border-radius:50%;
background:var(--tg-primary); color:#fff;
font-weight:600; font-size:1.125rem;
display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.contact-content { flex:1; }
.contact-name { font-weight:600; margin-bottom:0.1875rem; }
.contact-status { font-size:0.75rem; }
.contact-status i { font-size:0.4375rem; margin-right:0.25rem; }
.contact-action { color:var(--tg-muted); }
.contact-fab {
position:absolute; right:1.25rem; bottom:1.25rem;
width:3.625rem; height:3.625rem; border-radius:50%;
display:flex; align-items:center; justify-content:center;
font-size:1.25rem; z-index:100;
}
.contacts-add-screen { display:flex; flex-direction:column; height:100%; background:var(--tg-bg); }
.contacts-search-header { padding:0.625rem; background:#fff; border-bottom:0.0625rem solid #e5e7eb; }
.contacts-search-input { border:none; box-shadow:none !important; }
.contacts-search-input:focus { box-shadow:none !important; }
.contacts-search-input {
box-shadow:none !important;
&::-webkit-outer-spin-button, &::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
-moz-appearance:textfield;
}
.contacts-search-results {
flex:1; overflow-y:auto; padding:0.625rem;
display:flex; flex-direction:column; gap:0.5rem;
}
.contact-result-item {
display:flex; align-items:center; gap:0.75rem;
padding:0.75rem; border-radius:0.875rem;
background:#fff; cursor:pointer;
}
.contact-result-avatar {
width:2.75rem; height:2.75rem; border-radius:50%;
background:#3390ec; color:#fff;
display:flex; align-items:center; justify-content:center; font-weight:600;
}
.contact-result-name { font-weight:600; }
.contact-result-meta { font-size:0.75rem; color:#6b7280; }
.user-screen { display:flex; flex-direction:column; height:100%; background:var(--tg-bg); }
.user-screen-body {
display:flex; flex-direction:column; align-items:center;
padding:1.5rem 1.25rem; gap:0.75rem;
background:var(--tg-surface); border-radius:1rem;
margin:1rem 0.75rem 0;
}
.user-screen-body .contact-avatar { width:5rem; height:5rem; font-size:1.75rem; }
.user-info { text-align:center; }
.user-chat-btn { margin-top:0.5rem; border-radius:62.5rem; padding:0.5rem 1.5rem; }
.user-details { width:100%; }
.user-detail-row { padding:0.375rem 1rem; text-align:left; }
.user-detail-label { font-size:0.6875rem; color:var(--tg-muted); margin-top:0.125rem; }
.profile-screen { display:flex; flex-direction:column; height:100%; background:var(--tg-bg); }
.profile-body {
display:flex; flex-direction:column; align-items:center;
padding:1.5rem 1.25rem; gap:0.75rem;
background:var(--tg-surface); border-radius:1rem;
margin:1rem 0.75rem 0;
}
.profile-avatar {
width:5rem; height:5rem; font-size:1.75rem;
border-radius:50%; background:var(--tg-primary); color:#fff;
font-weight:600; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.profile-fields { width:80%; }
.profile-field { padding:0.375rem 1rem; text-align:left; }
.profile-field input, .profile-field textarea {
border:none; background:transparent; box-shadow:none !important;
padding:0; width:100%; font-size:0.875rem;
color:var(--tg-text); outline:none; resize:none;
}
.profile-field input:focus, .profile-field textarea:focus { outline:none; box-shadow:none !important; }
.profile-field-label { font-size:0.6875rem; color:var(--tg-muted); margin-top:0.125rem; }
.profile-logout-btn { margin-top:0.5rem; border-radius:62.5rem; padding:0.5rem 1.5rem; }
</style>