File size: 9,390 Bytes
6cd1906
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
/* =====================================================================
   LINE-inspired Chat UI for Streamlit
   Loaded by core/ui.py and injected via st.markdown(unsafe_allow_html=True)
   ===================================================================== */

/* ---------- Streamlit chrome cleanup ---------- */
#MainMenu, header[data-testid="stHeader"], footer { visibility: hidden; }
[data-testid="stToolbar"] { display: none !important; }
[data-testid="stDecoration"] { display: none !important; }

/* ---------- Wallpaper (LINE default-ish blue) ---------- */
.stApp {
    background:
        radial-gradient(circle at 20% 10%, rgba(255,255,255,0.08), transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(255,255,255,0.06), transparent 45%),
        linear-gradient(180deg, #88a9c9 0%, #7799bb 100%);
    background-attachment: fixed;
    font-family: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
                 "Yu Gothic", Meiryo, "Helvetica Neue", Arial, sans-serif;
}

/* Centered phone-like column */
.block-container {
    padding-top: 0.5rem;
    padding-bottom: 6.5rem;
    max-width: 720px;
}

/* ---------- Top header (sticky, LINE-style white bar) ---------- */
.line-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
    color: #1c1c1e;
    padding: 12px 18px;
    border-radius: 14px;
    margin: 4px 0 14px 0;
    font-weight: 700;
    text-align: center;
    font-size: 16px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04) inset;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.line-header::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #06c755;          /* LINE green status dot */
    box-shadow: 0 0 0 3px rgba(6,199,85,0.18);
    flex-shrink: 0;
}

/* ---------- Conversation rows ---------- */
.chat-row {
    display: flex;
    margin: 6px 0;
    align-items: flex-end;
    gap: 6px;
    animation: bubble-in 0.18s ease-out;
}
.chat-row.user      { justify-content: flex-end; }
.chat-row.assistant { justify-content: flex-start; }

@keyframes bubble-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Bubbles ---------- */
.bubble {
    position: relative;
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.55;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    box-shadow: 0 1px 1.5px rgba(0,0,0,0.08);
}

/* USER (right, LINE green) */
.bubble.user {
    background: #8de055;
    color: #102a06;
    border-bottom-right-radius: 4px;
}
.bubble.user::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: 0;
    width: 12px;
    height: 14px;
    background: #8de055;
    clip-path: polygon(0 0, 100% 100%, 0 100%);
    border-bottom-left-radius: 2px;
}

/* ASSISTANT (left, white) */
.bubble.assistant {
    background: #ffffff;
    color: #1c1c1e;
    border-bottom-left-radius: 4px;
}
.bubble.assistant::after {
    content: "";
    position: absolute;
    left: -6px;
    bottom: 0;
    width: 12px;
    height: 14px;
    background: #ffffff;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    border-bottom-right-radius: 2px;
}

.bubble a { color: #1769aa; text-decoration: underline; }

/* ---------- Avatar ---------- */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd1dc 0%, #ffb6c1 50%, #ff8fa3 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.18);
    text-transform: uppercase;
    user-select: none;
}
.avatar-spacer { width: 40px; flex-shrink: 0; }

.assistant-block {
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 52px);
}
.partner-name {
    font-size: 11.5px;
    color: #ffffff;
    margin: 2px 0 4px 6px;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}

/* ---------- System notice pill ---------- */
.system-note {
    text-align: center;
    color: #ffffff;
    font-size: 12px;
    margin: 14px auto;
    background: rgba(0,0,0,0.22);
    padding: 5px 14px;
    border-radius: 14px;
    width: fit-content;
    backdrop-filter: blur(2px);
}

/* ---------- Typing indicator ---------- */
.bubble.typing {
    display: flex;
    gap: 5px;
    padding: 14px 18px;
    align-items: center;
}
.bubble.typing span {
    width: 7px;
    height: 7px;
    background: #b3b3b3;
    border-radius: 50%;
    display: inline-block;
    animation: typing-bounce 1.3s infinite ease-in-out;
}
.bubble.typing span:nth-child(2) { animation-delay: 0.18s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0);    opacity: 0.4; }
    30%           { transform: translateY(-5px); opacity: 1;   }
}

/* =====================================================================
   Streamlit widget restyling — make it FEEL like LINE
   ===================================================================== */

/* Sidebar look (used on setup screen) */
[data-testid="stSidebar"] {
    background: #ffffff;
    border-right: 1px solid rgba(0,0,0,0.06);
}

/* Headings */
.stApp h1, .stApp h2, .stApp h3, .stApp h4 {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}

/* Setup-screen subheaders should still pop on the blue bg */
.stApp .stSubheader, .stApp [data-testid="stMarkdownContainer"] h3 {
    color: #ffffff;
}

/* Caption text */
.stApp [data-testid="stCaptionContainer"],
.stApp .stCaption {
    color: rgba(255,255,255,0.85);
}

/* Text inputs / textareas — white pill cards */
.stTextInput > div > div > input,
.stTextArea textarea {
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-size: 15px !important;
    color: #1c1c1e !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.stTextInput > div > div > input:focus,
.stTextArea textarea:focus {
    border-color: #06c755 !important;
    box-shadow: 0 0 0 3px rgba(6,199,85,0.18) !important;
    outline: none !important;
}

/* Input labels */
.stTextInput label, .stTextArea label, .stFileUploader label {
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* File uploader card */
[data-testid="stFileUploader"] section {
    background: rgba(255,255,255,0.95) !important;
    border: 1.5px dashed rgba(6,199,85,0.5) !important;
    border-radius: 12px !important;
}

/* Buttons — LINE green primary */
.stButton > button {
    background: #ffffff;
    color: #1c1c1e;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    font-weight: 600;
    font-size: 14.5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    transition: transform 0.05s, box-shadow 0.15s, background 0.15s;
}
.stButton > button:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}
.stButton > button:active { transform: translateY(1px); }

.stButton > button[kind="primary"],
.stButton > button[data-testid="baseButton-primary"] {
    background: #06c755 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(6,199,85,0.35) !important;
}
.stButton > button[kind="primary"]:hover {
    background: #05b34c !important;
}

/* Divider */
hr, [data-testid="stDivider"] {
    border-color: rgba(255,255,255,0.25) !important;
    opacity: 0.6;
}

/* Alerts */
.stAlert {
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08) !important;
}

/* ---------- Chat input at the bottom — make it a white LINE bar ---------- */
[data-testid="stChatInput"] {
    background: rgba(247, 247, 247, 0.96) !important;
    border-top: 1px solid rgba(0,0,0,0.08) !important;
    backdrop-filter: blur(8px);
    padding: 8px 12px !important;
}
[data-testid="stChatInput"] textarea {
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 22px !important;
    padding: 10px 16px !important;
    font-size: 15px !important;
    color: #1c1c1e !important;
}
[data-testid="stChatInput"] textarea:focus {
    border-color: #06c755 !important;
    box-shadow: 0 0 0 2px rgba(6,199,85,0.2) !important;
    outline: none !important;
}
[data-testid="stChatInput"] button {
    background: #06c755 !important;
    border-radius: 50% !important;
    color: #ffffff !important;
}
[data-testid="stChatInput"] button:hover { background: #05b34c !important; }
[data-testid="stChatInput"] button svg { fill: #ffffff !important; }

/* Spinner color tweak */
.stSpinner > div { border-top-color: #06c755 !important; }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 480px) {
    .block-container { padding-left: 0.6rem; padding-right: 0.6rem; }
    .bubble { max-width: 78%; font-size: 14.5px; }
    .avatar, .avatar-spacer { width: 36px; height: 36px; }
    .assistant-block { max-width: calc(100% - 46px); }
}