body { font-family: 'Inter', sans-serif; } .chatbot-toggler-wrapper { position: fixed; bottom: 30px; right: 35px; z-index: 999; display: flex; align-items: center; transition: transform 0.3s ease, opacity 0.3s ease; } body.show-chatbot .chatbot-toggler-wrapper { transform: scale(0); opacity: 0; pointer-events: none; } .toggler-tooltip { position: absolute; right: 100%; padding: 8px 16px; margin-right: 15px; background: linear-gradient(135deg, #0ea5e9, #1d4ed8); color: #fff; border-radius: 8px; font-size: 0.9rem; font-weight: 500; white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); opacity: 1; transform: scale(1); transform-origin: right; transition: all 0.2s ease; } .chatbot-toggler-wrapper:hover .toggler-tooltip { opacity: 0; transform: scale(0); } .chatbot-toggler { height: 60px; width: 60px; display: flex; align-items: center; justify-content: center; border: none; outline: none; cursor: pointer; background: linear-gradient(135deg, #0ea5e9, #1d4ed8); border-radius: 50%; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* Softer Shadow */ transition: all 0.3s ease; } .chatbot-toggler:hover { transform: scale(1.1); box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* Enhanced Hover Shadow */ } .chatbot-toggler span { position: absolute; color: white; transition: transform 0.3s ease, opacity 0.3s ease; } .chatbot-toggler span .material-symbols-rounded { font-size: 2.2rem; } body.show-chatbot .chatbot-toggler span.chat-icon { opacity: 0; transform: rotate(-90deg); } body.show-chatbot .chatbot-toggler span.close-icon { opacity: 1; transform: rotate(0deg); } .chatbot-toggler span.close-icon { opacity: 0; transform: rotate(90deg); } .chatbot-container { position: fixed; bottom: 100px; right: 35px; width: 420px; background: #fff; border-radius: 16px; box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); /* Softer, larger shadow */ transform: scale(0.5); opacity: 0; pointer-events: none; overflow: hidden; transform-origin: bottom right; transition: all 0.2s ease-in-out; z-index: 998; } body.show-chatbot .chatbot-container { transform: scale(1); opacity: 1; pointer-events: auto; } .chatbot-header { background: linear-gradient(135deg, #0ea5e9, #1d4ed8); padding: 16px 20px; text-align: center; color: #fff; position: relative; border-bottom: 1px solid transparent; } .chatbot-header h2 { font-size: 1.4rem; font-weight: 600; } .chatbot-header .close-btn { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); cursor: pointer; opacity: 0.8; transition: opacity 0.2s ease; } .chatbot-header .close-btn:hover { opacity: 1; } .chatbox { height: 510px; overflow-y: auto; padding: 30px 20px 100px; display: flex; flex-direction: column; gap: 12px; background-color: #f8fafc; scrollbar-width: thin; scrollbar-color: #38bdf8 #e0f2fe; } .chatbox .chat { display: flex; max-width: 85%; } .chatbox .incoming span { height: 32px; width: 32px; color: #fff; background: #0ea5e9; text-align: center; line-height: 32px; border-radius: 6px; margin-right: 10px; align-self: flex-end; font-size: 1.4rem; } .chatbox .chat p { padding: 12px 16px; border-radius: 12px; font-size: 0.95rem; color: #1e293b; background: #e0f2fe; border-top-left-radius: 0; } .chatbox .outgoing { justify-content: flex-end; } .chatbox .outgoing p { background: #0ea5e9; color: #fff; border-top-left-radius: 12px; border-top-right-radius: 0; } .chatbox .chat p.typing-indicator { background: #e0f2fe; } .chatbox .chat p.typing-indicator span { height: 7px; width: 7px; display: inline-block; background-color: #64748b; border-radius: 50%; margin: 0 2px; animation: bounce 1s infinite; } .chatbox .chat p.typing-indicator span:nth-child(2) { animation-delay: 0.2s; } .chatbox .chat p.typing-indicator span:nth-child(3) { animation-delay: 0.4s; } @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } } .chat-input { position: absolute; bottom: 0; width: 100%; display: flex; gap: 10px; background: #fff; padding: 10px 20px; border-top: 1px solid #e2e8f0 } .chat-input textarea { flex-grow: 1; min-height: 55px; max-height: 180px; border: 1px solid #e2e8f0; outline: none; resize: none; padding: 16px 15px; font-size: 0.95rem; border-radius: 8px; background-color: #f8fafc; transition: border-color 0.2s; } .chat-input textarea:focus { border-color: #0ea5e9; } .chat-input span { align-self: flex-end; height: 55px; width: 55px; background: #0ea5e9; color: #fff; font-size: 1.7rem; display: grid; place-items: center; cursor: pointer; border-radius: 8px; transition: background-color 0.2s; } .chat-input span:hover { background: #0284c7; } @media (max-width: 490px) { .chatbot-container { right: 0; bottom: 0; width: 100%; height: 100%; border-radius: 0; } .chatbot-toggler-wrapper { right: 20px; bottom: 20px; } .toggler-tooltip { display: none; } .chatbox { height: 90%; } } .chatbox .chat p ul, .chatbox .chat p ol { margin-left: 20px; margin-top: 5px; margin-bottom: 5px; list-style-type: disc; } .chatbox .chat p ol { list-style-type: decimal; } .chatbox .chat p strong { font-weight: 700; } .chatbox .chat p { white-space: pre-line; } .chatbox .chat p + p { margin-top: 10px; } .chatbox .chat p, .chatbox .chat .message-content { padding: 12px 16px; border-radius: 12px; font-size: 0.95rem; color: #1e293b; background: #e0f2fe; border-top-left-radius: 0; line-height: 1.5; } .chatbox .chat .message-content ul, .chatbox .chat .message-content ol { margin-left: 20px; margin-top: 8px; margin-bottom: 8px; padding-left: 10px; } .chatbox .chat .message-content ul { list-style-type: disc; } .chatbox .chat .message-content ol { list-style-type: decimal; } .chatbox .chat .message-content strong { font-weight: 700; color: #000; } .chatbox .chat .message-content p { background: transparent; padding: 0; margin-bottom: 8px; color: inherit; } .chatbox .chat .message-content p:last-child { margin-bottom: 0; } .chatbox .outgoing p { background: #0ea5e9; color: #fff; border-top-left-radius: 12px; border-top-right-radius: 0; } /* Styling untuk Container Rekomendasi Pertanyaan */ .suggestions-container { display: flex; flex-direction: column; /* Ubah ini agar tombol tersusun ke bawah */ align-items: flex-start; /* Tombol rata kiri */ gap: 8px; margin-top: -5px; /* Tarik sedikit ke atas agar dekat dengan balon bot */ margin-bottom: 15px; margin-left: 42px; /* Sejajar dengan teks bot */ max-width: 85%; /* Batasi lebar maksimalnya */ } /* Styling untuk Tombol Rekomendasi (Pills) */ .suggestion-btn { background-color: #f8fafc; /* Warna background lebih lembut */ color: #0ea5e9; border: 1px solid #0ea5e9; padding: 10px 16px; border-radius: 12px; /* Ujung tombol tidak terlalu bulat (lebih modern) */ font-size: 0.85rem; text-align: left; /* Teks panjang akan rata kiri */ line-height: 1.4; /* Jarak antar baris teks jika panjang */ cursor: pointer; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.05); } .suggestion-btn:hover { background-color: #0ea5e9; color: #fff; transform: translateY(-2px); }