File size: 5,779 Bytes
0bb4279
 
96ae1f0
ddea7be
96ae1f0
 
ddea7be
 
96ae1f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ddea7be
96ae1f0
 
 
 
ddea7be
 
 
 
 
 
 
 
 
96ae1f0
 
 
6a356af
96ae1f0
 
0bb4279
 
ddea7be
 
 
 
0bb4279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6a356af
d055fb3
 
 
 
 
 
 
 
0bb4279
 
 
 
 
 
 
6a356af
 
0bb4279
 
 
 
f6b99ca
 
 
 
6a356af
 
f6b99ca
 
 
 
 
0bb4279
473246e
96ae1f0
7f81229
faae316
 
96ae1f0
 
 
 
faae316
473246e
96ae1f0
faae316
 
 
 
0bb4279
 
 
 
 
 
 
 
 
 
 
 
 
 
473246e
96ae1f0
0bb4279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473246e
faae316
f6b99ca
 
 
 
7f81229
 
 
 
 
 
473246e
7f81229
f6b99ca
 
6a356af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
06def69
 
 
 
 
6a356af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
:root {
    --color-grey-50: #f9fafb;
    --banner-background: var(--secondary-400);
    --banner-text-color: var(--primary-200);
    --banner-background-dark: var(--secondary-800);
    --banner-text-color-dark: var(--primary-100);
    --banner-text-a-color: var(--primary-100);
    --banner-text-a-color-dark: var(--secondary-100);
    --banner-chrome-height: calc(16px + 43px);

    /* Chrome height with no banner */
    --chat-chrome-height-wide-no-banner: 320px;
    --chat-chrome-height-narrow-no-banner: 450px;

    /* Use these when we are not using a banner */
    /*--chat-chrome-height-wide: var(--chat-chrome-height-wide-no-banner);*/
    /*--chat-chrome-height-narrow: var(--chat-chrome-height-narrow-no-banner);*/

    /* When we are using a banner, add the banner height to the chat chrome height */
    --chat-chrome-height-wide: calc(var(--chat-chrome-height-wide-no-banner) + var(--banner-chrome-height));
    --chat-chrome-height-narrow: calc(var(--chat-chrome-height-narrow-no-banner) + var(--banner-chrome-height));
}

.banner-message {
    background-color: var(--banner-background);
    padding: 5px;
    margin: 0;
    border-radius: 5px;
    border: none;
}

.banner-message-text {
    font-size: 14px;
    font-weight: bolder;
    color: var(--banner-text-color) !important;
}

.banner-message-emoji {
    margin-right: 3px;
    font-size: 16px;
}

.banner-message-text a {
    color: var(--banner-text-a-color) !important;
}

body.dark .banner-message {
    background-color: var(--banner-background-dark) !important;
}

body.dark .gradio-container .contain .banner-message .banner-message-text {
    color: var(--banner-text-color-dark) !important;
}

body.dark .gradio-container .contain .banner-message .banner-message-text a {
    color: var(--banner-text-a-color-dark) !important;
}

.toast-body {
    background-color: var(--color-grey-50);
}

.html-container:has(.css-styles) {
    padding: 0;
    margin: 0;
}

.css-styles {
    height: 0;
}

.model-message {
    text-align: end;
}

.model-dropdown-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
}

.user-input-container .multimodal-textbox {
    border: none !important;
}

/* Match the height of the modified multimodal input box on the same row */
.control-button {
    height: 51px;
}

button.cancel {
    border: var(--button-border-width) solid var(--button-cancel-border-color);
    background: var(--button-cancel-background-fill);
    color: var(--button-cancel-text-color);
    box-shadow: var(--button-cancel-shadow);
}

button.cancel:hover,
.cancel[disabled] {
    background: var(--button-cancel-background-fill-hover);
    color: var(--button-cancel-text-color-hover);
}

.opt-out-message {
    top: 8px;
}

.opt-out-message .html-container,
.opt-out-checkbox label {
    font-size: 14px !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--neutral-400) !important;
}

div.block.chatbot {
    height: calc(100svh - var(--chat-chrome-height-wide)) !important;
    max-height: 900px !important;
}

div.no-padding {
    padding: 0 !important;
}

@media (max-width: 1280px) {
    div.block.chatbot {
        height: calc(100svh - var(--chat-chrome-height-wide)) !important;
    }
}

@media (max-width: 1024px) {
    .responsive-row {
        flex-direction: column;
    }

    .model-message {
        text-align: start;
        font-size: 10px !important;
    }

    .model-dropdown-container {
        flex-direction: column;
        align-items: flex-start;
    }

    div.block.chatbot {
        height: calc(100svh - var(--chat-chrome-height-narrow)) !important;
    }
}

@media (max-width: 400px) {
    .responsive-row {
        flex-direction: column;
    }

    .model-message {
        text-align: start;
        font-size: 10px !important;
    }

    .model-dropdown-container {
        flex-direction: column;
        align-items: flex-start;
    }

    div.block.chatbot {
        max-height: 360px !important;
    }
}

@media (max-height: 932px) {
    .chatbot {
        max-height: 500px !important;
    }
}

@media (max-height: 1280px) {
    div.block.chatbot {
        max-height: 800px !important;
    }
}

/* Terms of Service Overlay */
.agreement-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65);
    /* Semi-transparent black background */
    backdrop-filter: blur(5px);
    /* Bloom/blur effect on the underlying content */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* Ensure it sits on top of everything */
}

/* Hide the overlay when dismissed */
.agreement-overlay.hidden {
    display: none !important;
}

/* Container for text/button within the overlay */
.agreement-overlay>.form {
    background-color: #333333;
    color: white !important;
    /* Force black text on white background to prevent invisible text issues */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    /* Increased width for better readability of long text */
    width: 95%;
    /* Responsive width */
    max-height: 60vh;
    /* Prevent overflowing viewport height */
    overflow-y: auto;
    /* Scroll if content is too tall */
    text-align: left;
    /* Left align text for better readability */
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Center the header */
.agreement-overlay>.form h2 {
    text-align: center;
    margin-top: 0;
}

/* Use dark mode styling if needed */
body.dark .agreement-overlay>.form {
    background-color: var(--secondary-800);
    border-color: var(--border-color-primary);
    color: var(--body-text-color);
}