templates/components/messenger/messenger_styles.html.twig line 1

Open in your IDE?
  1. {% set options = {
  2. }|merge(options|default({})) %}
  3. <style>
  4.     :root {
  5.         /* =========================
  6.            TELEGRAM COLOR SYSTEM
  7.            ========================= */
  8.         --tg-bg: #e7ebf0;
  9.         --tg-surface: #ffffff;
  10.         --tg-incoming: #ffffff;
  11.         --tg-outgoing: #d9fdd3;
  12.         --tg-primary: #3390ec;
  13.         --tg-online: #31d158;
  14.         --tg-text: #0f172a;
  15.         --tg-muted: #6b7280;
  16.         --tg-border: #e6e6e6;
  17.         --tg-shadow: 0 0.0625rem 0.125rem rgba(0,0,0,0.06);
  18.     }
  19.     /* =========================
  20.        GLOBAL
  21.        ========================= */
  22.     :root {
  23.         --vh: 100dvh;
  24.     }
  25.     html, body {
  26.         height: var(--vh);
  27.         font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  28.         color: var(--tg-text);
  29.         overflow: hidden !important;
  30.         font-size: 1rem;
  31.         @media (max-width: 769px) {
  32.             font-size: 18px;
  33.         }
  34.     }
  35.     /* =========================
  36.        LAYOUT
  37.        ========================= */
  38.     .layout {
  39.         height: 100%;
  40.         display: flex;
  41.         flex-direction: column;
  42.         background: var(--tg-bg);
  43.         max-width: 62.5rem;
  44.         border-left: 0.0625rem solid var(--tg-border);
  45.         border-right: 0.0625rem solid var(--tg-border);
  46.     }
  47.     .layout-container {
  48.         width: 100%;
  49.         height: 100%;
  50.         display: flex;
  51.         justify-content: center;
  52.         align-items: center;
  53.     }
  54.     .screens-container {
  55.         flex: 1;
  56.         display: flex;
  57.         flex-direction: column;
  58.         min-height: 0;
  59.     }
  60.     .screens {
  61.         flex: 1;
  62.         overflow: hidden;
  63.         background: var(--tg-bg);
  64.     }
  65.     /* =========================
  66.        TOPBAR
  67.        ========================= */
  68.     .topbar {
  69.         background: var(--tg-surface);
  70.         border-bottom: 0.0625rem solid var(--tg-border);
  71.         box-shadow: var(--tg-shadow);
  72.         z-index: 10;
  73.     }
  74.     /* avatar */
  75.     .topbar .rounded-circle {
  76.         box-shadow: var(--tg-shadow);
  77.     }
  78.     /* online */
  79.     .text-success {
  80.         color: var(--tg-online) !important;
  81.     }
  82.     /* =========================
  83.        CHAT AREA
  84.        ========================= */
  85.     .chat {
  86.         height: 100%;
  87.         display: flex;
  88.         flex-direction: column;
  89.         position: relative;
  90.     }
  91.     .chat-scroll-down {
  92.         position: absolute;
  93.         bottom: 1rem;
  94.         right: 1rem;
  95.         width: 2.5rem;
  96.         height: 2.5rem;
  97.         border-radius: 50%;
  98.         background: var(--tg-surface);
  99.         border: 0.0625rem solid var(--tg-border);
  100.         box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.12);
  101.         color: var(--tg-muted);
  102.         display: flex;
  103.         align-items: center;
  104.         justify-content: center;
  105.         cursor: pointer;
  106.         z-index: 10;
  107.         transition: opacity .2s;
  108.     }
  109.     .chat-bodies {
  110.         flex: 1;
  111.         overflow: hidden;
  112.         display: flex;
  113.         flex-direction: column;
  114.     }
  115.     .chat-body {
  116.         flex: 1;
  117.         overflow-y: auto;
  118.         padding: 0.75rem 0.625rem;
  119.         background: radial-gradient(rgba(0,0,0,0.02) 0.0625rem, transparent 0.0625rem);
  120.         background-size: 1.125rem 1.125rem;
  121.     }
  122.     /* message rows */
  123.     .message {
  124.         display: flex;
  125.         margin-bottom: 0.5rem;
  126.     }
  127.     .message-in { justify-content: flex-start; }
  128.     .message-out { justify-content: flex-end; }
  129.     /* =========================
  130.        BUBBLES (REAL TELEGRAM COLORS)
  131.        ========================= */
  132.     .bubble {
  133.         max-width: 78%;
  134.         padding: 0.5625rem 0.75rem 0.4375rem 0.75rem;
  135.         border-radius: 1rem;
  136.         font-size: 0.906rem;
  137.         line-height: 1.35;
  138.         word-break: break-word;
  139.         box-shadow: var(--tg-shadow);
  140.     }
  141.     /* incoming */
  142.     .message-in .bubble {
  143.         background: var(--tg-incoming);
  144.         color: var(--tg-text);
  145.         border-top-left-radius: 0.375rem;
  146.         border-top-right-radius: 1rem;
  147.         border-bottom-right-radius: 1rem;
  148.         border-bottom-left-radius: 1rem;
  149.         border: 0.0625rem solid rgba(0,0,0,0.04);
  150.     }
  151.     /* outgoing */
  152.     .message-out .bubble {
  153.         background: var(--tg-outgoing);
  154.         color: var(--tg-text);
  155.         border-top-right-radius: 0.375rem;
  156.         border-top-left-radius: 1rem;
  157.         border-bottom-right-radius: 1rem;
  158.         border-bottom-left-radius: 1rem;
  159.         border: 0.0625rem solid rgba(0,0,0,0.03);
  160.     }
  161.     /* timestamp */
  162.     .time {
  163.         font-size: 0.625rem;
  164.         color: var(--tg-muted);
  165.         text-align: right;
  166.         margin-top: 0.25rem;
  167.     }
  168.     /* date label */
  169.     .chat-group { position: relative; }
  170.     /* unread divider - hidden */
  171.     .chat-unread-divider { display: none; }
  172.     /* unread badge on scroll button */
  173.     .chat-unread-badge {
  174.         position: absolute;
  175.         top: -0.5rem;
  176.         left: 50%;
  177.         transform: translateX(-50%);
  178.         background: var(--tg-primary);
  179.         color: #fff;
  180.         font-size: 0.6875rem;
  181.         font-weight: 600;
  182.         min-width: 1.25rem;
  183.         height: 1.25rem;
  184.         border-radius: 62.5rem;
  185.         display: flex;
  186.         align-items: center;
  187.         justify-content: center;
  188.         padding: 0 0.25rem;
  189.         white-space: nowrap;
  190.         pointer-events: none;
  191.     }
  192.     .chat-date-label {
  193.         display: flex;
  194.         justify-content: center;
  195.         margin: 0.75rem 0 0.5rem;
  196.         position: sticky;
  197.         top: 0;
  198.         z-index: 1;
  199.     }
  200.     .chat-date-label span {
  201.         background: rgb(255,255,255);
  202.         color: var(--tg-muted);
  203.         font-size: 0.8125rem;
  204.         padding: 0.1875rem 0.625rem;
  205.         border-radius: 3.125rem;
  206.     }
  207.     /* =========================
  208.        MESSAGE INPUT
  209.        ========================= */
  210.     .message-input-container {
  211.         background: var(--tg-surface);
  212.         border-top: 0.0625rem solid var(--tg-border);
  213.         padding: 0.5rem 0.625rem;
  214.         display: flex;
  215.         align-items: center;
  216.         gap: 0.5rem;
  217.     }
  218.     .message-input-container input {
  219.         border: 0.0625rem solid var(--tg-border);
  220.         border-radius: 62.5rem;
  221.         padding: 0.625rem 0.875rem;
  222.         font-size: 0.875rem;
  223.         box-shadow: none;
  224.     }
  225.     .message-input-container input:focus {
  226.         border-color: var(--tg-primary);
  227.         outline: none;
  228.     }
  229.     .message-input-container .btn {
  230.         width: 2.625rem;
  231.         height: 2.625rem;
  232.         border-radius: 50%;
  233.         display: flex;
  234.         align-items: center;
  235.         justify-content: center;
  236.     }
  237.     /* =========================
  238.        BOTTOM NAVBAR
  239.        ========================= */
  240.     .navbar {
  241.         background: var(--tg-surface);
  242.         border-top: 0.0625rem solid var(--tg-border);
  243.         height: 4.375rem;
  244.         padding: 0;
  245.     }
  246.     .navbar a {
  247.         flex: 1;
  248.         text-align: center;
  249.         text-decoration: none;
  250.         color: var(--tg-muted);
  251.         font-size: 0.8125rem;
  252.     }
  253.     .navbar a i {
  254.         display: block;
  255.         font-size: 1.5rem;
  256.         margin-bottom: 0.1875rem;
  257.     }
  258.     .navbar a.active { color: var(--tg-primary); }
  259.     .navbar a.active i { color: var(--tg-primary); }
  260.     .topbar .btn-link { color: var(--tg-muted); }
  261.     .topbar .btn-link:hover { color: var(--tg-primary); }
  262.     @media (max-width: 48rem) {
  263.         .bubble { max-width: 85%; font-size: 0.844rem; }
  264.         .message-input-container { padding: 0.375rem 0.5rem; }
  265.         .navbar { height: 4.375rem; }
  266.     }
  267.     .screen { display: none; height: 100%; }
  268.     .screen.active { display: flex; flex-direction: column; }
  269.     .chat-list {
  270.         display: flex;
  271.         flex-direction: column;
  272.         gap: 0.625rem;
  273.         padding: 0.625rem;
  274.     }
  275.     .chat-item {
  276.         display: flex;
  277.         align-items: center;
  278.         gap: 0.625rem;
  279.         padding: 0.625rem;
  280.         background: white;
  281.         border-radius: 0.75rem;
  282.         cursor: pointer;
  283.     }
  284.     .chat-item .avatar {
  285.         width: 2.625rem;
  286.         height: 2.625rem;
  287.         border-radius: 50%;
  288.         background: #3390ec;
  289.         color: white;
  290.         display: flex;
  291.         align-items: center;
  292.         justify-content: center;
  293.     }
  294.     .chat-info .name { font-weight: 600; }
  295.     .chat-info .preview { font-size: 0.75rem; color: #6b7280; }
  296.     .contacts-screen { display:flex; flex-direction:column; height:100%; position:relative; }
  297.     .contacts-header { background:var(--tg-surface); border-bottom:0.0625rem solid var(--tg-border); }
  298.     .contacts-list { flex:1; overflow-y:auto; padding:0.5rem; }
  299.     .contact-item {
  300.         display:flex; align-items:center; gap:0.875rem;
  301.         padding:0.75rem; margin-bottom:0.375rem;
  302.         background:var(--tg-surface); border-radius:1rem;
  303.         color:var(--tg-text); transition:.15s;
  304.     }
  305.     .contact-item:hover { background:#f8fafc; }
  306.     .contact-avatar {
  307.         width:3.25rem; height:3.25rem; border-radius:50%;
  308.         background:var(--tg-primary); color:#fff;
  309.         font-weight:600; font-size:1.125rem;
  310.         display:flex; align-items:center; justify-content:center; flex-shrink:0;
  311.     }
  312.     .contact-content { flex:1; }
  313.     .contact-name { font-weight:600; margin-bottom:0.1875rem; }
  314.     .contact-status { font-size:0.75rem; }
  315.     .contact-status i { font-size:0.4375rem; margin-right:0.25rem; }
  316.     .contact-action { color:var(--tg-muted); }
  317.     .contact-fab {
  318.         position:absolute; right:1.25rem; bottom:1.25rem;
  319.         width:3.625rem; height:3.625rem; border-radius:50%;
  320.         display:flex; align-items:center; justify-content:center;
  321.         font-size:1.25rem; z-index:100;
  322.     }
  323.     .contacts-add-screen { display:flex; flex-direction:column; height:100%; background:var(--tg-bg); }
  324.     .contacts-search-header { padding:0.625rem; background:#fff; border-bottom:0.0625rem solid #e5e7eb; }
  325.     .contacts-search-input { border:none; box-shadow:none !important; }
  326.     .contacts-search-input:focus { box-shadow:none !important; }
  327.     .contacts-search-input {
  328.         box-shadow:none !important;
  329.         &::-webkit-outer-spin-button, &::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
  330.         -moz-appearance:textfield;
  331.     }
  332.     .contacts-search-results {
  333.         flex:1; overflow-y:auto; padding:0.625rem;
  334.         display:flex; flex-direction:column; gap:0.5rem;
  335.     }
  336.     .contact-result-item {
  337.         display:flex; align-items:center; gap:0.75rem;
  338.         padding:0.75rem; border-radius:0.875rem;
  339.         background:#fff; cursor:pointer;
  340.     }
  341.     .contact-result-avatar {
  342.         width:2.75rem; height:2.75rem; border-radius:50%;
  343.         background:#3390ec; color:#fff;
  344.         display:flex; align-items:center; justify-content:center; font-weight:600;
  345.     }
  346.     .contact-result-name { font-weight:600; }
  347.     .contact-result-meta { font-size:0.75rem; color:#6b7280; }
  348.     .user-screen { display:flex; flex-direction:column; height:100%; background:var(--tg-bg); }
  349.     .user-screen-body {
  350.         display:flex; flex-direction:column; align-items:center;
  351.         padding:1.5rem 1.25rem; gap:0.75rem;
  352.         background:var(--tg-surface); border-radius:1rem;
  353.         margin:1rem 0.75rem 0;
  354.     }
  355.     .user-screen-body .contact-avatar { width:5rem; height:5rem; font-size:1.75rem; }
  356.     .user-info { text-align:center; }
  357.     .user-chat-btn { margin-top:0.5rem; border-radius:62.5rem; padding:0.5rem 1.5rem; }
  358.     .user-details { width:100%; }
  359.     .user-detail-row { padding:0.375rem 1rem; text-align:left; }
  360.     .user-detail-label { font-size:0.6875rem; color:var(--tg-muted); margin-top:0.125rem; }
  361.     .profile-screen { display:flex; flex-direction:column; height:100%; background:var(--tg-bg); }
  362.     .profile-body {
  363.         display:flex; flex-direction:column; align-items:center;
  364.         padding:1.5rem 1.25rem; gap:0.75rem;
  365.         background:var(--tg-surface); border-radius:1rem;
  366.         margin:1rem 0.75rem 0;
  367.     }
  368.     .profile-avatar {
  369.         width:5rem; height:5rem; font-size:1.75rem;
  370.         border-radius:50%; background:var(--tg-primary); color:#fff;
  371.         font-weight:600; display:flex; align-items:center; justify-content:center; flex-shrink:0;
  372.     }
  373.     .profile-fields { width:80%; }
  374.     .profile-field { padding:0.375rem 1rem; text-align:left; }
  375.     .profile-field input, .profile-field textarea {
  376.         border:none; background:transparent; box-shadow:none !important;
  377.         padding:0; width:100%; font-size:0.875rem;
  378.         color:var(--tg-text); outline:none; resize:none;
  379.     }
  380.     .profile-field input:focus, .profile-field textarea:focus { outline:none; box-shadow:none !important; }
  381.     .profile-field-label { font-size:0.6875rem; color:var(--tg-muted); margin-top:0.125rem; }
  382.     .profile-logout-btn { margin-top:0.5rem; border-radius:62.5rem; padding:0.5rem 1.5rem; }
  383. </style>