Spaces:
Sleeping
Sleeping
| /* ========================== | |
| IFHE Assistant UI Styling | |
| ========================== */ | |
| /* --- Google Fonts --- */ | |
| @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&family=Poppins:wght@400;500;600&display=swap'); | |
| /* --- Global Variables --- */ | |
| :root { | |
| --primary: #1b3a7a; | |
| --accent: #274b9f; | |
| --highlight: #ffcc00; | |
| --card-bg: #ffffff; | |
| --light-bg: #f4f8fc; | |
| --text-dark: #0c1c3a; | |
| --radius: 12px; | |
| --shadow: 0 4px 14px rgba(0, 0, 0, 0.1); | |
| } | |
| /* --- Global Reset --- */ | |
| * { | |
| box-sizing: border-box; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| html, body { | |
| height: 100%; | |
| width: 100%; | |
| font-family: "Poppins", "Segoe UI", Arial, sans-serif; | |
| background: var(--light-bg); | |
| color: var(--text-dark); | |
| line-height: 1.6; | |
| overflow: hidden; | |
| } | |
| /* ========================== | |
| HEADER - HIDDEN | |
| ========================== */ | |
| header, .site-header, #header { | |
| display: none ; | |
| } | |
| /* ========================== | |
| MAIN LAYOUT | |
| ========================== */ | |
| main.content { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100vh; | |
| width: 100%; | |
| max-width: 900px; | |
| margin: 0 auto; | |
| padding: 10px; | |
| } | |
| /* ========================== | |
| CHAT SECTION - FULL HEIGHT | |
| ========================== */ | |
| .chat-section { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| background: #ffffff; | |
| border-radius: 0; | |
| box-shadow: none; | |
| padding: 0; | |
| overflow: hidden; | |
| } | |
| /* ========================== | |
| CHAT CONTAINER - PROPER FLEX | |
| ========================== */ | |
| .chat-container { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100%; | |
| background: #f9fbff; | |
| border-radius: 0; | |
| box-shadow: none; | |
| padding: 20px; | |
| gap: 15px; | |
| } | |
| /* ========================== | |
| CHAT BOX - SCROLLABLE AREA | |
| ========================== */ | |
| .chat-box { | |
| flex: 1; | |
| overflow-y: auto; | |
| overflow-x: hidden; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 12px; | |
| padding: 15px; | |
| scroll-behavior: smooth; | |
| min-height: 0; | |
| } | |
| /* Welcome message styling */ | |
| .chat-box:empty::before { | |
| content: "👋 Welcome! How can I help you?"; | |
| display: block; | |
| padding: 15px 20px; | |
| background: linear-gradient(135deg, #eaf0ff, #f8faff); | |
| color: #1b3a7a; | |
| border-radius: 12px; | |
| font-size: 15px; | |
| text-align: center; | |
| align-self: flex-start; | |
| max-width: 80%; | |
| } | |
| /* Custom scrollbar */ | |
| .chat-box::-webkit-scrollbar { | |
| width: 8px; | |
| } | |
| .chat-box::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| .chat-box::-webkit-scrollbar-thumb { | |
| background: rgba(27, 58, 122, 0.2); | |
| border-radius: 4px; | |
| } | |
| .chat-box::-webkit-scrollbar-thumb:hover { | |
| background: rgba(27, 58, 122, 0.3); | |
| } | |
| /* ========================== | |
| CHAT MESSAGES | |
| ========================== */ | |
| .chat-message { | |
| animation: fadeIn 0.3s ease-in-out; | |
| max-width: 75%; | |
| padding: 10px 14px; | |
| border-radius: 12px; | |
| line-height: 1.5; | |
| font-size: 14px; | |
| word-wrap: break-word; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(5px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .user-message { | |
| align-self: flex-end; | |
| background: linear-gradient(135deg, #1b3a7a, #274b9f); | |
| color: #fff; | |
| border-radius: 16px 16px 0 16px; | |
| box-shadow: 0 2px 8px rgba(27, 58, 122, 0.25); | |
| } | |
| .bot-message { | |
| align-self: flex-start; | |
| background: linear-gradient(135deg, #eaf0ff, #f8faff); | |
| color: #1b3a7a; | |
| border-radius: 16px 16px 16px 0; | |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); | |
| } | |
| .typing::after { | |
| content: " "; | |
| display: inline-block; | |
| width: 0.7em; | |
| animation: dots 1s steps(3, end) infinite; | |
| } | |
| @keyframes dots { | |
| 0%, 20% { content: ""; } | |
| 40% { content: "."; } | |
| 60% { content: ".."; } | |
| 80%, 100% { content: "..."; } | |
| } | |
| /* ========================== | |
| CHAT FORM - WRAPPER WITH BUTTON INSIDE | |
| ========================== */ | |
| #chat-form, | |
| form#chat-form, | |
| .chat-form { | |
| position: relative ; | |
| display: block ; | |
| width: 100% ; | |
| padding: 0 ; | |
| margin: 0 ; | |
| flex-shrink: 0 ; | |
| } | |
| /* ========================== | |
| TEXTAREA STYLING - WITH PADDING FOR BUTTON | |
| ========================== */ | |
| #chat-input, | |
| textarea#chat-input, | |
| .chat-form textarea { | |
| width: 100% ; | |
| min-height: 50px ; | |
| max-height: 120px ; | |
| padding: 12px 60px 12px 15px ; /* Extra padding on right for button */ | |
| font-size: 14px ; | |
| line-height: 1.5 ; | |
| border-radius: 25px ; /* Rounded pill shape */ | |
| border: 1px solid #d0d7de ; | |
| background: #fff ; | |
| font-family: inherit ; | |
| resize: none ; | |
| overflow-y: auto ; | |
| transition: border-color 0.2s ease, box-shadow 0.2s ease ; | |
| box-sizing: border-box ; | |
| } | |
| .chat-form textarea::placeholder { | |
| color: rgba(12, 28, 58, 0.45); | |
| } | |
| .chat-form textarea:focus { | |
| border-color: var(--accent); | |
| box-shadow: 0 0 8px rgba(39, 75, 159, 0.2); | |
| outline: none; | |
| } | |
| .chat-form textarea::-webkit-scrollbar { | |
| width: 6px; | |
| } | |
| .chat-form textarea::-webkit-scrollbar-thumb { | |
| background: rgba(0, 0, 0, 0.2); | |
| border-radius: 3px; | |
| } | |
| /* ========================== | |
| BUTTON STYLING - POSITIONED INSIDE TEXTAREA | |
| ========================== */ | |
| #chat-form button, | |
| form#chat-form button, | |
| .chat-form button { | |
| position: absolute ; | |
| right: 8px ; | |
| bottom: 8px ; | |
| height: 36px ; | |
| width: 36px ; | |
| min-width: 36px ; | |
| max-width: 36px ; | |
| padding: 0 ; | |
| margin: 0 ; | |
| background: var(--primary) ; | |
| color: white ; | |
| border: none ; | |
| border-radius: 50% ; /* Circular button */ | |
| cursor: pointer ; | |
| font-weight: 600 ; | |
| font-size: 16px ; | |
| display: flex ; | |
| align-items: center ; | |
| justify-content: center ; | |
| transition: all 0.25s ease ; | |
| box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) ; | |
| z-index: 10 ; | |
| } | |
| .chat-form button:hover { | |
| background: var(--accent) ; | |
| transform: scale(1.1); | |
| box-shadow: 0 3px 10px rgba(27, 58, 122, 0.3) ; | |
| } | |
| .chat-form button:active { | |
| transform: scale(0.95); | |
| } | |
| /* ========================== | |
| RESPONSIVE | |
| ========================== */ | |
| @media (max-width: 768px) { | |
| main.content { | |
| padding: 5px; | |
| } | |
| .chat-section { | |
| padding: 10px; | |
| } | |
| .chat-container { | |
| padding: 10px; | |
| } | |
| .chat-message { | |
| font-size: 13px; | |
| max-width: 85%; | |
| } | |
| .chat-form { | |
| padding: 0; | |
| } | |
| .chat-form textarea { | |
| font-size: 14px; | |
| } | |
| .chat-form button { | |
| padding: 0; | |
| font-size: 14px; | |
| } | |
| } | |
| @media (max-width: 480px) { | |
| main.content { | |
| max-width: 100%; | |
| padding: 3px; | |
| } | |
| .chat-section { | |
| border-radius: 0; | |
| } | |
| } | |
| /* ========================== | |
| FOOTER | |
| ========================== */ | |
| footer { | |
| display: none; | |
| } | |
| /* ========================== | |
| FORM SECTIONS (if used elsewhere) | |
| ========================== */ | |
| .form-section { | |
| background: var(--card-bg); | |
| border-radius: var(--radius); | |
| box-shadow: var(--shadow); | |
| padding: 2rem; | |
| max-width: 850px; | |
| margin: 0 auto; | |
| max-height: calc(100vh - 180px); | |
| overflow-y: auto; | |
| } | |
| .results { | |
| margin-top: 1.5rem; | |
| background: #f1f5ff; | |
| border-radius: var(--radius); | |
| padding: 1rem; | |
| box-shadow: var(--shadow); | |
| max-height: calc(100vh - 180px); | |
| overflow-y: auto; | |
| } |