/* LearnixNavbar.css - Clean, Creative, Responsive Design */ /* Reset and Base */ * { box-sizing: border-box; } body { padding-top: 70px; margin: 0; } /* Main Navbar Container */ .learnix-navbar-container { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.5rem; background-color: #ffffff; border-bottom: 2px solid #e5f3ff; height: 70px; transition: all 0.3s ease; } .learnix-navbar-container:hover { box-shadow: 0 2px 12px rgba(59, 130, 246, 0.08); } /* Logo Brand Section */ .learnix-navbar-brand { display: flex; align-items: center; flex-shrink: 0; } .learnix-logo-link { display: block; transition: transform 0.2s ease; } .learnix-logo-link:hover { transform: scale(1.02); } .learnix-logo-image { height: auto; max-height: 42px; width: auto; max-width: 160px; object-fit: contain; transition: opacity 0.2s ease; } .learnix-logo-image:hover { opacity: 0.9; } /* Menu Toggle Button */ .learnix-menu-toggle-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background-color: #ffffff; border: 1px solid #e5f3ff; border-radius: 8px; color: #1f2937; cursor: pointer; transition: all 0.25s ease; } .learnix-menu-toggle-btn:hover { background-color: #f0f9ff; border-color: #3b82f6; color: #3b82f6; transform: translateY(-1px); } .learnix-menu-toggle-btn:active { transform: translateY(0); } .learnix-menu-icon { display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease; } .learnix-menu-toggle-btn:hover .learnix-menu-icon { transform: rotate(90deg); } /* Navbar Right Section */ .learnix-navbar-right { display: flex; align-items: center; gap: 12px; } /* Notification Bell */ .learnix-notification-wrapper { position: relative; } .learnix-notification-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background-color: #ffffff; border: 1px solid #e5f3ff; border-radius: 8px; color: #1f2937; cursor: pointer; transition: all 0.25s ease; position: relative; } .learnix-notification-btn:hover { background-color: #f0f9ff; border-color: #3b82f6; color: #3b82f6; transform: translateY(-1px); } .learnix-notification-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; background-color: #ef4444; color: #ffffff; font-size: 0.7rem; font-weight: 600; border-radius: 10px; display: flex; align-items: center; justify-content: center; animation: learnix-badge-pulse 2s infinite; } @keyframes learnix-badge-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } } /* Notification Popup */ .learnix-notification-popup { position: absolute; top: 54px; right: 0; width: 360px; max-height: 480px; background-color: #ffffff; border: 1px solid #e5f3ff; border-radius: 12px; box-shadow: 0 8px 32px rgba(14, 165, 233, 0.15); z-index: 1100; animation: learnix-popup-slide 0.2s ease-out; overflow: hidden; } @keyframes learnix-popup-slide { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .learnix-notif-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background-color: #f0f9ff; border-bottom: 1px solid #e5f3ff; } .learnix-notif-header h4 { margin: 0; font-size: 1rem; font-weight: 600; color: #1f2937; } .learnix-notif-count { font-size: 0.8rem; color: #0ea5e9; font-weight: 500; background-color: #dbeafe; padding: 3px 10px; border-radius: 12px; } .learnix-notif-list { max-height: 400px; overflow-y: auto; scrollbar-width: none; /* Firefox */ -ms-overflow-style: none; /* IE and Edge */ } .learnix-notif-list::-webkit-scrollbar { display: none; /* Chrome, Safari, Opera */ } .learnix-notif-loading, .learnix-notif-empty { padding: 32px 16px; text-align: center; color: #94a3b8; } .learnix-notif-empty svg { margin-bottom: 8px; color: #cbd5e1; } .learnix-notif-empty p { margin: 0; font-size: 0.9rem; } .learnix-notif-item { display: flex; align-items: stretch; padding: 0; border-bottom: 1px solid #f1f5f9; text-decoration: none; transition: background-color 0.2s ease; overflow: hidden; } .learnix-notif-item:hover { background-color: #f8fafc; } .learnix-notif-unread { background-color: #fffbeb; border-left: 3px solid #f59e0b; } .learnix-notif-unread:hover { background-color: #fef3c7; } .learnix-notif-link-area { flex: 1; display: block; padding: 14px 16px; text-decoration: none; min-width: 0; } .learnix-mark-read-btn { display: flex; align-items: center; justify-content: center; width: 40px; background-color: transparent; border: none; border-left: 1px solid #f1f5f9; color: #94a3b8; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0; } .learnix-mark-read-btn:hover { background-color: #dcfce7; color: #22c55e; } .learnix-notif-content { margin-bottom: 6px; overflow: hidden; } .learnix-notif-text { margin: 0 0 4px 0; font-size: 0.85rem; color: #374151; line-height: 1.4; word-wrap: break-word; overflow-wrap: break-word; } .learnix-notif-text strong { color: #0ea5e9; word-break: break-word; } .learnix-notif-time { font-size: 0.75rem; color: #94a3b8; } .learnix-notif-link { font-size: 0.8rem; color: #3b82f6; font-weight: 500; } /* Load More Button */ .learnix-notif-load-more { padding: 12px 16px; text-align: center; border-top: 1px solid #e5f3ff; } .learnix-load-more-btn { width: 100%; padding: 10px 16px; background-color: #f0f9ff; border: 1px solid #0ea5e9; border-radius: 8px; color: #0ea5e9; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; } .learnix-load-more-btn:hover:not(:disabled) { background-color: #0ea5e9; color: #ffffff; } .learnix-load-more-btn:disabled { opacity: 0.7; cursor: not-allowed; } .learnix-notif-all-loaded { padding: 12px 16px; text-align: center; font-size: 0.8rem; color: #94a3b8; background-color: #f8fafc; border-top: 1px solid #e5f3ff; } /* Responsive adjustments for notification popup */ @media (max-width: 768px) { .learnix-notification-popup { position: fixed; top: 70px; left: 16px; right: 16px; width: auto; max-height: calc(100vh - 100px); } .learnix-notif-list { max-height: calc(100vh - 200px); } .learnix-notif-text { font-size: 0.8rem; } .learnix-notif-item { padding: 12px 14px; } } @media (max-width: 480px) { .learnix-notification-popup { left: 8px; right: 8px; top: 70px; max-height: calc(100vh - 90px); border-radius: 10px; } .learnix-notif-header { padding: 12px 14px; } .learnix-notif-header h4 { font-size: 0.95rem; } .learnix-notif-count { font-size: 0.75rem; padding: 2px 8px; } .learnix-notif-item { padding: 10px 12px; } .learnix-notif-text { font-size: 0.78rem; line-height: 1.35; } .learnix-notif-text strong { word-break: break-word; } .learnix-notif-time { font-size: 0.7rem; } .learnix-notif-link { font-size: 0.75rem; } .learnix-load-more-btn { padding: 8px 14px; font-size: 0.8rem; } .learnix-notif-all-loaded { padding: 10px 14px; font-size: 0.75rem; } .learnix-notification-btn { width: 40px; height: 40px; } .learnix-notification-badge { min-width: 16px; height: 16px; font-size: 0.65rem; top: -3px; right: -3px; } } @media (max-width: 360px) { .learnix-notification-popup { left: 4px; right: 4px; } .learnix-notif-text { font-size: 0.75rem; } .learnix-navbar-right { gap: 8px; } .learnix-notification-btn, .learnix-menu-toggle-btn { width: 38px; height: 38px; } } /* Sidebar Backdrop */ .learnix-sidebar-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.4); z-index: 1001; animation: learnix-fade-in 0.25s ease; } @keyframes learnix-fade-in { from { opacity: 0; } to { opacity: 1; } } /* Navigation Sidebar */ .learnix-navigation-sidebar { position: fixed; top: 0; right: -350px; height: 100vh; width: 320px; background-color: #ffffff; box-shadow: -3px 0 15px rgba(0, 0, 0, 0.1); z-index: 1002; transition: right 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); overflow-y: auto; border-left: 1px solid #e5f3ff; } .learnix-sidebar-active { right: 0; } /* Sidebar Header */ .learnix-sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; background-color: #fbbf24; border-bottom: 1px solid #f59e0b; } .learnix-sidebar-logo { flex-shrink: 0; } .learnix-sidebar-logo-img { height: auto; max-height: 32px; width: auto; max-width: 120px; object-fit: contain; } /* Sidebar Close Button */ .learnix-sidebar-close-button { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; background-color: rgba(255, 255, 255, 0.2); border: none; border-radius: 6px; color: #1f2937; cursor: pointer; transition: all 0.2s ease; } .learnix-sidebar-close-button:hover { background-color: rgba(255, 255, 255, 0.3); transform: rotate(90deg); } /* Sidebar Menu */ .learnix-sidebar-menu { padding: 1.5rem 1rem; } .learnix-nav-item { display: flex; align-items: center; gap: 0.875rem; padding: 0.875rem 1rem; color: #4b5563; text-decoration: none; border-radius: 8px; transition: all 0.2s ease; margin-bottom: 0.375rem; font-weight: 500; font-size: 0.95rem; position: relative; background-color: transparent; border: none; width: 100%; cursor: pointer; } .learnix-nav-item:hover { background-color: #3b82f6; color: #ffffff; transform: translateX(4px); } .learnix-nav-item:active { transform: translateX(2px); } .learnix-nav-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.2s ease; } .learnix-nav-item:hover .learnix-nav-icon { transform: scale(1.1); } .learnix-nav-text { flex: 1; text-align: left; } .learnix-signout-btn { margin-top: 1rem; border-top: 1px solid #e5f3ff; padding-top: 1.25rem; } .learnix-signout-btn:hover { background-color: #ef4444; } /* Admin Dashboard sidebar link */ .learnix-nav-admin { color: #7c3aed !important; font-weight: 600; background-color: #f5f3ff; } .learnix-nav-admin:hover { background-color: #ede9fe !important; color: #5b21b6 !important; } .learnix-nav-admin .learnix-nav-icon { color: #7c3aed; } /* Responsive Design */ /* Large Tablets and Small Desktops */ @media (max-width: 1024px) { .learnix-navbar-container { padding: 0.75rem 1.25rem; } .learnix-logo-image { max-width: 140px; max-height: 38px; } } /* Tablets */ @media (max-width: 768px) { body { padding-top: 65px; } .learnix-navbar-container { padding: 0.625rem 1rem; height: 65px; } .learnix-logo-image { max-width: 120px; max-height: 35px; } .learnix-menu-toggle-btn { width: 42px; height: 42px; } .learnix-navigation-sidebar { width: 300px; max-width: 85vw; } .learnix-sidebar-top { padding: 1rem 1.25rem; } .learnix-sidebar-menu { padding: 1.25rem 0.875rem; } .learnix-nav-item { padding: 0.75rem 0.875rem; font-size: 0.9rem; } } /* Mobile Devices */ @media (max-width: 480px) { body { padding-top: 60px; } .learnix-navbar-container { padding: 0.5rem 0.875rem; height: 60px; } .learnix-logo-image { max-width: 100px; max-height: 30px; } .learnix-menu-toggle-btn { width: 40px; height: 40px; } .learnix-navigation-sidebar { width: 280px; max-width: 80vw; } .learnix-sidebar-top { padding: 0.875rem 1rem; } .learnix-sidebar-logo-img { max-height: 28px; max-width: 100px; } .learnix-sidebar-close-button { width: 32px; height: 32px; } .learnix-sidebar-menu { padding: 1rem 0.75rem; } .learnix-nav-item { padding: 0.625rem 0.75rem; font-size: 0.875rem; gap: 0.75rem; } } /* Small Mobile Devices */ @media (max-width: 360px) { .learnix-navbar-container { padding: 0.5rem 0.75rem; } .learnix-logo-image { max-width: 85px; max-height: 26px; } .learnix-navigation-sidebar { width: 260px; max-width: 75vw; } .learnix-sidebar-top { padding: 0.75rem 0.875rem; } .learnix-sidebar-menu { padding: 0.875rem 0.625rem; } .learnix-nav-item { padding: 0.5rem 0.625rem; font-size: 0.8rem; } } /* Accessibility & Performance */ /* Reduced Motion */ @media (prefers-reduced-motion: reduce) { .learnix-navbar-container, .learnix-navigation-sidebar, .learnix-menu-toggle-btn, .learnix-nav-item, .learnix-sidebar-close-button, .learnix-logo-link, .learnix-menu-icon, .learnix-nav-icon { transition: none; animation: none; } } /* High Contrast Support */ @media (prefers-contrast: high) { .learnix-navbar-container { border-bottom-width: 3px; } .learnix-nav-item { border: 1px solid transparent; } .learnix-nav-item:hover { border-color: #ffffff; } } /* Focus Management */ .learnix-menu-toggle-btn:focus, .learnix-nav-item:focus, .learnix-sidebar-close-button:focus, .learnix-logo-link:focus { outline: 2px solid #3b82f6; outline-offset: 2px; } /* Print Styles */ @media print { .learnix-navbar-container, .learnix-navigation-sidebar, .learnix-sidebar-backdrop { display: none; } body { padding-top: 0; } } /* Loading State */ .learnix-logo-image[data-loading="true"] { opacity: 0.5; } /* Error State */ .learnix-logo-image[data-error="true"] { display: none; } .learnix-logo-image[data-error="true"]::after { content: "Learnix"; display: block; font-size: 1.5rem; font-weight: 700; color: #3b82f6; } /* ── Support Chat (sidebar bottom) ────────────────────────────── */ .learnix-support-chat { border-top: 1px solid #e5f3ff; margin-top: auto; position: sticky; bottom: 0; background: #fff; z-index: 10; } /* Toggle header button */ .learnix-support-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0.875rem 1.25rem; background: #f0f9ff; border: none; cursor: pointer; font-size: 0.9rem; font-weight: 600; color: #1e40af; transition: background 0.2s ease; gap: 0.5rem; } .learnix-support-toggle:hover { background: #dbeafe; } .learnix-support-toggle--open { background: #3b82f6; color: #fff; } .learnix-support-toggle--open:hover { background: #2563eb; } .learnix-support-toggle-left { display: flex; align-items: center; gap: 0.5rem; } .learnix-support-badge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #fbbf24; color: #1f2937; font-size: 0.65rem; font-weight: 700; } /* Expandable body */ .learnix-support-body { display: flex; flex-direction: column; border-top: 1px solid #e5f3ff; background: #fff; animation: learnix-support-expand 0.22s ease both; } @keyframes learnix-support-expand { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } /* Message list */ .learnix-support-messages { max-height: 240px; overflow-y: auto; padding: 0.875rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; scroll-behavior: smooth; } .learnix-support-messages::-webkit-scrollbar { width: 4px; } .learnix-support-messages::-webkit-scrollbar-track { background: transparent; } .learnix-support-messages::-webkit-scrollbar-thumb { background: #bfdbfe; border-radius: 4px; } .learnix-support-empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: #93c5fd; font-size: 0.82rem; padding: 1.25rem 0; text-align: center; } /* Individual message bubbles */ .learnix-support-msg { max-width: 88%; padding: 0.55rem 0.8rem; border-radius: 12px; font-size: 0.82rem; line-height: 1.5; word-break: break-word; } .learnix-support-msg--user { background: #3b82f6; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; } .learnix-support-msg--bot { background: #f1f5f9; color: #1f2937; align-self: flex-start; border-bottom-left-radius: 4px; } /* Typing indicator */ .learnix-support-typing { display: flex; align-items: center; gap: 4px; padding: 0.6rem 0.9rem; } .learnix-support-typing span { width: 7px; height: 7px; border-radius: 50%; background: #93c5fd; animation: learnix-support-dot 1.2s infinite; display: inline-block; } .learnix-support-typing span:nth-child(2) { animation-delay: 0.2s; } .learnix-support-typing span:nth-child(3) { animation-delay: 0.4s; } @keyframes learnix-support-dot { 0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; } 40% { transform: scale(1.2); opacity: 1; } } /* Input row */ .learnix-support-input-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 0.875rem 0.875rem; border-top: 1px solid #e5f3ff; } .learnix-support-input { flex: 1; padding: 0.5rem 0.75rem; border: 1.5px solid #bfdbfe; border-radius: 8px; font-size: 0.82rem; color: #1f2937; outline: none; transition: border-color 0.18s ease; background: #f8fafc; } .learnix-support-input:focus { border-color: #3b82f6; background: #fff; } .learnix-support-input:disabled { opacity: 0.6; } .learnix-support-send { flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px; border: none; background: #3b82f6; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.18s ease, transform 0.1s ease; } .learnix-support-send:hover:not(:disabled) { background: #2563eb; transform: scale(1.06); } .learnix-support-send:disabled { background: #bfdbfe; cursor: not-allowed; }