|
| 1 | +/* css chat variables */ |
| 2 | +:root { |
| 3 | + --chat-base-z-index: calc(var(--mylife-base-z-index) + 10); |
| 4 | +} |
1 | 5 | /* MyLife chat container */
|
2 | 6 | .agent-bubble {
|
3 | 7 | background-color: rgba(0, 86, 179, .85); /* A darker shade of blue for the agent */
|
|
25 | 29 | margin-right: 0.5em;
|
26 | 30 | }
|
27 | 31 | .chat-bubble {
|
28 |
| - border-radius: 18px; /* Rounded corners for a modern look */ |
29 |
| - box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Subtle shadow for depth */ |
| 32 | + background-color: #3427ec; /* Assuming a dark bubble color */ |
| 33 | + border-radius: 0.8rem; |
| 34 | + box-shadow: 0.2rem 0.2rem 0.4rem rgba(0, 0, 0, 0.3); |
| 35 | + display: flex; |
| 36 | + flex-direction: column; |
| 37 | + font-size: 0.9em; |
30 | 38 | margin-bottom: 0.5rem;
|
31 | 39 | max-width: 90%;
|
32 | 40 | min-width: 30%;
|
33 |
| - padding: 10px 15px; /* Padding for content inside bubble */ |
34 |
| - font-size: .9em; |
35 |
| - width: fit-content; /* Fit the content's width */ |
36 |
| - word-wrap: break-word; /* Ensure long words don't overflow */ |
| 41 | + padding: 0.5rem 0.8rem; |
| 42 | + width: fit-content; |
| 43 | + word-wrap: break-word; |
| 44 | + z-index: calc(var(--chat-base-z-index) + 1); |
37 | 45 | }
|
38 | 46 | .chat-container {
|
39 | 47 | align-items: flex-start;
|
40 | 48 | background-image:
|
41 |
| - linear-gradient( |
42 |
| - to bottom, |
43 |
| - rgba(255, 255, 255, 0.85) 0%, |
| 49 | + linear-gradient( |
| 50 | + to bottom, |
| 51 | + rgba(255, 255, 255, 0.85) 0%, |
44 | 52 | rgba(255, 255, 255, 0.85) 50%,
|
45 | 53 | rgba(66, 66, 66, 0.85) 100%
|
46 |
| - ), /* White overlay with 50% opacity */ |
47 |
| - url('../jpg/cosmos.jpg'); /* Your original background image */ |
| 54 | + ), /* White overlay with 50% opacity */ |
| 55 | + url('../jpg/cosmos.jpg'); /* Your original background image */ |
48 | 56 | background-size: cover; /* Ensures the image covers the whole area */
|
49 | 57 | background-position: center; /* Centers the image */
|
50 | 58 | border-radius: 22px;
|
|
59 | 67 | position: relative;
|
60 | 68 | width: 100%;
|
61 | 69 | }
|
62 |
| -.chat-member, |
63 |
| -.chat-user { |
64 |
| - align-items: center; |
65 |
| - display: flex; |
66 |
| - flex: 1 1 auto; |
67 |
| - flex-direction: row; |
68 |
| - flex-wrap: wrap; |
69 |
| - margin: 0.5em 0; |
70 |
| - max-height: 60%; |
71 |
| - width: 100%; |
| 70 | +.chat-copy, |
| 71 | +.chat-feedback { |
| 72 | + cursor: pointer; |
| 73 | + font-size: 0.8rem; |
| 74 | + margin: 0.2rem; |
| 75 | + position: absolute; |
| 76 | + top: 0.2rem; |
| 77 | +} |
| 78 | +.chat-feedback { |
| 79 | + right: 0.6rem; |
72 | 80 | }
|
73 | 81 | .chat-input {
|
74 | 82 | background-color: #ffffff; /* White background color */
|
|
87 | 95 | padding: 0.3em; /* Padding for space inside the container */
|
88 | 96 | resize: none; /* Allows vertical resizing, none to disable */
|
89 | 97 | }
|
| 98 | +.chat-member, |
| 99 | +.chat-user { |
| 100 | + align-items: center; |
| 101 | + display: flex; |
| 102 | + flex: 1 1 auto; |
| 103 | + flex-direction: row; |
| 104 | + flex-wrap: wrap; |
| 105 | + margin: 0.5em 0; |
| 106 | + max-height: 60%; |
| 107 | + width: 100%; |
| 108 | +} |
| 109 | +.chat-message-container { |
| 110 | + display: flex; |
| 111 | + position: relative; |
| 112 | +} |
| 113 | +.chat-message-container-agent { |
| 114 | + flex-direction: row; |
| 115 | +} |
| 116 | +.chat-message-container-member, |
| 117 | +.chat-message-container-user { |
| 118 | + flex-direction: row-reverse; |
| 119 | +} |
| 120 | +.chat-message-tab { |
| 121 | + border-bottom-right-radius: 0.2rem; |
| 122 | + border-bottom-left-radius: 0.2rem; |
| 123 | + display: flex; |
| 124 | + flex-direction: column; |
| 125 | + height: 100%; |
| 126 | + justify-content: flex-end; |
| 127 | + opacity: 0; |
| 128 | + padding: 0.2rem; |
| 129 | + pointer-events: none; |
| 130 | + transition: transform 0.5s, opacity 0.5s; |
| 131 | + width: 2.5rem; |
| 132 | + z-index: var(--chat-base-z-index); |
| 133 | +} |
| 134 | +.chat-message-tab-agent { |
| 135 | + align-items: flex-end; |
| 136 | + background-color: #9f9dff; /* Lighter shade of the bubble color */ |
| 137 | + border: thin solid #3427ec; |
| 138 | + border-top-left-radius: 0; |
| 139 | + border-top-right-radius: 0.2rem; |
| 140 | + transform: translateX(-100%); |
| 141 | +} |
| 142 | +.chat-message-tab-hover { |
| 143 | + opacity: 1; |
| 144 | + pointer-events: all; |
| 145 | +} |
| 146 | +.chat-message-tab-hover-agent, |
| 147 | +.chat-message-tab-agent:hover { |
| 148 | + transform: translateX(-33%); /* accommodate for 2.5rem */ |
| 149 | +} |
| 150 | +.chat-message-tab-member { |
| 151 | + align-items: flex-start; |
| 152 | + background-color: #d6ffd9; /* Lighter shade of the bubble color */ |
| 153 | + border: thin solid #27bbec; |
| 154 | + border-top-left-radius: 0.2rem; |
| 155 | + border-top-right-radius: 0; |
| 156 | + transform: translateX(100%); |
| 157 | +} |
| 158 | +.chat-message-tab-hover-member, /* **note**: must come after tab-member */ |
| 159 | +.chat-message-tab-member:hover { |
| 160 | + transform: translateX(33%); /* accommodate for 2.5rem */ |
| 161 | +} |
90 | 162 | .chat-refresh {
|
91 | 163 | position: absolute; /* Position relative to parent */
|
92 | 164 | top: 0; /* Adjust as needed */
|
|
96 | 168 | color: #888; /* Icon color, change as needed */
|
97 | 169 | font-size: 24px; /* Icon size, adjust as needed */
|
98 | 170 | cursor: pointer; /* Pointer cursor on hover */
|
99 |
| - z-index: 2; /* Ensure it's above other content */ |
| 171 | + z-index: calc(var(--chat-base-z-index) + 5); |
100 | 172 | }
|
101 | 173 | /* chat-submit button; requires special treament to overwrite button class for now */
|
102 | 174 | button.chat-submit { /* need specificity to overwrite button class */
|
@@ -175,14 +247,14 @@ button.chat-submit:disabled {
|
175 | 247 | margin: 0 0.5em;
|
176 | 248 | justify-content: flex-start;
|
177 | 249 | }
|
178 |
| -.member-bubble, .user-bubble { |
| 250 | +.member-bubble, |
| 251 | +.user-bubble { |
179 | 252 | background-color: rgba(225, 245, 254, 1); /* A light shade of blue for the user */
|
180 | 253 | color: #333333; /* Dark grey for contrast and easy reading */
|
181 | 254 | font-size: .75em;
|
182 |
| - margin-left: auto; |
183 |
| - margin-right: 12px; |
184 | 255 | }
|
185 |
| -.member-bubble a, .user-bubble a { |
| 256 | +.member-bubble a, |
| 257 | +.user-bubble a { |
186 | 258 | color: #333333; /* Dark grey for contrast and easy reading */
|
187 | 259 | }
|
188 | 260 | .spinner-green-glow {
|
|
0 commit comments