Spaces:
Running
Running
| body { | |
| font-family: Arial, sans-serif; | |
| margin: 0; | |
| padding: 0; | |
| background-color: #f0f0f0; | |
| } | |
| /* Chat Icon Styles */ | |
| #chat-icon { | |
| width: 60px; | |
| height: 60px; | |
| background-color: #e84533; | |
| color: #fff; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| border-radius: 50%; | |
| position: fixed; | |
| bottom: 20px; | |
| right: 20px; | |
| cursor: pointer; | |
| box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); | |
| z-index: 999; | |
| transition: background-color 0.3s; | |
| } | |
| #chat-icon:hover { | |
| background-color: #e84533; | |
| } | |
| #chat-icon img { | |
| width: 30px; | |
| height: 30px; | |
| } | |
| /* Form Container Styles */ | |
| #form-container { | |
| display: none; | |
| width: 350px; | |
| height: 500px; | |
| border: 1px solid #ddd; | |
| border-radius: 10px; | |
| box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); | |
| background-color: #ffd1d1; | |
| position: fixed; | |
| bottom: 90px; /* Above the chat icon */ | |
| right: 20px; | |
| z-index: 1000; | |
| text-align: center; | |
| padding: 30px 20px; | |
| box-sizing: border-box; | |
| } | |
| #form-container h2 { | |
| margin-bottom: 15px; | |
| font-size: 24px; | |
| color: #010a08; | |
| } | |
| #form-container p { | |
| margin-bottom: 25px; | |
| color: #555; | |
| font-size: 16px; | |
| } | |
| #form-container input { | |
| width: 100%; | |
| padding: 12px 10px; | |
| margin-bottom: 20px; | |
| border-radius: 5px; | |
| border: 1px solid #ccc; | |
| font-size: 16px; | |
| box-sizing: border-box; | |
| } | |
| #form-container select { | |
| width: 100%; | |
| padding: 12px 10px; | |
| margin-bottom: 20px; | |
| border-radius: 5px; | |
| border: 1px solid #ccc; | |
| font-size: 16px; | |
| box-sizing: border-box; | |
| } | |
| #form-container button { | |
| width: 100%; | |
| padding: 12px; | |
| background-color: #007bff; | |
| color: #dd6e3e; | |
| border: none; | |
| border-radius: 5px; | |
| font-size: 16px; | |
| cursor: pointer; | |
| transition: background-color 0.3s; | |
| } | |
| #form-container button:hover { | |
| background-color: #0056b3; | |
| } | |
| /* Chatbox Styles */ | |
| #chat-box { | |
| display: none; | |
| width: 350px; | |
| height: 450px; | |
| border: 1px solid #ddd; | |
| border-radius: 10px; | |
| box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); | |
| position: fixed; | |
| bottom: 90px; /* Above the chat icon */ | |
| right: 20px; | |
| background-color: #fff; | |
| z-index: 1000; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| #chat-header { | |
| background-color: #df3923; | |
| color: #fff; | |
| padding: 15px; | |
| border-radius: 10px 10px 0 0; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| font-size: 18px; | |
| } | |
| #chat-header #close-chat { | |
| cursor: pointer; | |
| font-weight: bold; | |
| font-size: 20px; | |
| } | |
| #chat-body { | |
| padding: 15px; | |
| flex: 1; | |
| overflow-y: auto; | |
| background-color: #f9f9f9; | |
| } | |
| .message { | |
| margin: 10px 0; | |
| padding: 10px 15px; | |
| border-radius: 20px; | |
| max-width: 80%; | |
| font-size: 14px; | |
| line-height: 1.4; | |
| word-wrap: break-word; | |
| } | |
| .user-message { | |
| background-color: #ffd1d1; | |
| color: #0e0101; | |
| margin-left: auto; | |
| text-align: right; | |
| border-bottom-right-radius: 0; | |
| } | |
| .bot-message { | |
| background-color: #e5e5e5; | |
| color: #000; | |
| margin-right: auto; | |
| text-align: left; | |
| border-bottom-left-radius: 0; | |
| } | |
| .bot-message button { | |
| display: block; | |
| width: 100%; | |
| padding: 10px; | |
| margin-top: 10px; | |
| background-color: #fff; | |
| border: 1px solid #007bff; | |
| border-radius: 5px; | |
| color: #007bff; | |
| cursor: pointer; | |
| font-size: 14px; | |
| text-align: left; | |
| transition: background-color 0.3s, color 0.3s; | |
| } | |
| .bot-message button:hover { | |
| background-color: #007bff; | |
| color: #fff; | |
| } | |
| /* Gradio Iframe Styles */ | |
| #gradio-iframe { | |
| display: none; | |
| width: 350px; | |
| height: 450px; | |
| border: 1px solid #ddd; | |
| border-radius: 10px; | |
| box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); | |
| position: fixed; | |
| bottom: 90px; /* Above the chat icon */ | |
| right: 20px; | |
| background-color: #fff; | |
| z-index: 1000; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| #gradio-header { | |
| background-color: #de1d1df0; | |
| color: #fff; | |
| padding: 15px; | |
| border-radius: 10px 10px 0 0; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| font-size: 18px; | |
| } | |
| #gradio-header #back-button { | |
| cursor: pointer; | |
| font-weight: bold; | |
| font-size: 20px; | |
| } | |
| #form-container { | |
| display: none; /* Hide the form initially */ | |
| /* Other existing styles */ | |
| } | |
| #chat-box { | |
| display: none; /* Hide the chatbox initially */ | |
| /* Other existing styles */ | |
| } | |
| #chat-icon { | |
| display: flex; /* Show the chat icon initially */ | |
| /* Other existing styles */ | |
| } | |
| #gradio-iframe { | |
| display: none; /* Hide Gradio iframe initially */ | |
| /* Other existing styles */ | |
| } | |
| /* Responsive Adjustments */ | |
| @media (max-width: 400px) { | |
| #form-container, #chat-box, #gradio-iframe { | |
| width: 90%; | |
| right: 5%; | |
| } | |
| #chat-icon { | |
| right: 5%; | |
| } | |
| } | |