/* Modern Chat Enhancements */ :root { --judge-color: #D4AF37; /* Gold */ --advocate-color: #2c3e50; /* Navy */ --woman-color: #ff7eb3; /* Soft Pink */ --minor-color: #4ade80; /* Fresh Green */ --student-color: #3498db; /* Academic Blue */ --primary-purple: #9b87f5; --light-purple: #D6BCFA; --neutral-gray: #8E9196; --light-gray: #C8C8C9; --off-white: #eee; /* Dark Theme (Default) */ --bg-main: #1A1F2C; --sidebar-bg: rgba(0, 0, 0, 0.4); --sidebar-border: rgba(255, 255, 255, 0.05); --text-main: #eee; --text-dim: rgba(255, 255, 255, 0.6); --input-bg: #1A1F2C; --item-bg: rgba(255, 255, 255, 0.02); --footer-bg: #0d0d0d; } body.light { --bg-main: #ffffff; --sidebar-bg: #f8f9fa; --sidebar-border: #e9ecef; --text-main: #1A1F2C; --text-dim: #495057; --input-bg: #ffffff; --item-bg: #ffffff; --footer-bg: #f1f3f5; } body { background-color: var(--bg-main) !important; color: var(--text-main) !important; transition: background-color 0.3s, color 0.3s; } /* Role Specific Body Themes */ body.role-judge { --role-primary: var(--judge-color); } body.role-advocate { --role-primary: var(--advocate-color); } body.role-woman { --role-primary: var(--woman-color); } body.role-minor { --role-primary: var(--minor-color); } body.role-student { --role-primary: var(--student-color); } /* Evidence Box (Citations) */ .evidence-box { margin-top: 1rem; padding: 0.75rem; background: rgba(255, 255, 255, 0.03); border-left: 3px solid var(--role-primary, var(--primary-purple)); border-radius: 4px; font-size: 0.85rem; } .evidence-title { font-weight: 600; color: var(--role-primary, var(--primary-purple)); margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.5rem; } .evidence-item { color: rgba(255, 255, 255, 0.7); margin-bottom: 0.2rem; } /* Loading Animation: Gavel or Pulse */ .typing-indicator { display: none; align-items: center; gap: 10px; padding: 10px 15px; background: rgba(255, 255, 255, 0.05); border-radius: 8px; margin-bottom: 1rem; width: fit-content; } .gavel-icon { width: 20px; height: 20px; animation: hammer 0.8s infinite ease-in-out alternate; } @keyframes hammer { 0% { transform: rotate(0deg); } 100% { transform: rotate(-45deg); } } /* Legal Disclaimer */ .legal-footer { text-align: center; padding: 1rem; font-size: 0.7rem; color: var(--neutral-gray); border-top: 1px solid rgba(255, 255, 255, 0.05); background: var(--bg-dark); } /* Sidebar Layout */ .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border); padding: 2rem 1.5rem; display: flex; flex-direction: column; z-index: 1000; backdrop-filter: blur(15px); } .sidebar-title { font-size: 0.75rem; font-weight: 700; color: var(--neutral-gray); margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.6; } .history-list { flex-grow: 1; overflow-y: auto; margin-bottom: 1rem; padding-right: 0.5rem; } .history-list::-webkit-scrollbar { width: 4px; } .history-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; } .history-item { padding: 0.85rem; border-radius: 8px; background: var(--item-bg); margin-bottom: 0.75rem; font-size: 0.85rem; color: var(--text-dim); cursor: pointer; transition: all 0.2s ease; border: 1px solid var(--sidebar-border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 0.75rem; } .history-item svg { flex-shrink: 0; opacity: 0.5; } .history-item:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--role-primary, var(--primary-purple)); color: white; } .history-item:hover svg { opacity: 1; color: var(--role-primary, var(--primary-purple)); } .sidebar-footer { padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.05); margin-top: auto; } /* Fix for Back to Dashboard */ .sidebar .role-selection-link { position: static !important; display: flex !important; align-items: center; gap: 0.75rem; font-size: 0.9rem; font-weight: 500; color: var(--role-primary, var(--primary-purple)) !important; text-decoration: none; transition: transform 0.2s ease; } .sidebar .role-selection-link:hover { transform: translateX(5px); } /* Adjust main container to give room for sidebar */ .container { margin-left: 260px !important; max-width: calc(100% - 260px) !important; } /* AI Message Styling Enhancements */ .ai-message { border-left: 4px solid var(--role-primary, var(--primary-purple)) !important; } /* --- SIDEBAR ENHANCEMENTS (Functional Only) --- */ .sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } .new-chat-btn { flex-grow: 1; display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem; border: 1px solid var(--sidebar-border); border-radius: 8px; background: transparent; color: var(--text-main); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; } .new-chat-btn:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--role-primary, var(--primary-purple)); } .collapse-toggle { background: transparent; border: none; color: rgba(255, 255, 255, 0.4); cursor: pointer; padding: 6px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; } .collapse-toggle:hover { background: rgba(255, 255, 255, 0.05); color: white; } /* Sidebar Toggle (Floating button when collapsed) */ .sidebar-floating-toggle { position: fixed; left: 15px; top: 15px; z-index: 1100; background: #1e2229; /* Deep dark to match theme */ border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 8px; color: white; cursor: pointer; display: none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); } body.sidebar-collapsed .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; } body.sidebar-collapsed .container { margin-left: 0 !important; max-width: 100% !important; padding-left: 60px; /* Space for the floating toggle */ } body.sidebar-collapsed .sidebar-floating-toggle { display: flex; } .sidebar { transition: transform 0.3s ease; } /* Delete Icon per Chat Item */ .history-item { position: relative; padding-right: 2.5rem; } .delete-chat-item { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: rgba(255, 255, 255, 0.3); padding: 4px; cursor: pointer; opacity: 0; transition: opacity 0.2s, color 0.2s; } .history-item:hover .delete-chat-item { opacity: 1; } .delete-chat-item:hover { color: #ff4757; } /* Answer Perspective Section */ .perspective-container { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.05); } .perspective-option { padding: 0.6rem 0.8rem; border-radius: 6px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 0.6rem; } .perspective-option:hover { background: rgba(255, 255, 255, 0.03); color: white; } .perspective-option.active { background: rgba(255, 255, 255, 0.08); color: var(--role-primary, var(--primary-purple)); font-weight: 600; } /* Fixed/Sticky Footer Fix */ .sidebar-footer { position: sticky; bottom: 0px; background: var(--footer-bg); padding: 1.5rem 0; margin-top: auto; z-index: 10; } /* --- MISSING LAYOUT STYLES --- */ .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; } .chat-container { flex-grow: 1; overflow-y: auto; margin-bottom: 2rem; padding: 1rem; } .input-container { position: fixed; bottom: 0; left: 260px; /* Offset for sidebar */ right: 0; padding: 1rem; background-color: var(--input-bg); border-top: 1px solid var(--sidebar-border); z-index: 900; } body.sidebar-collapsed .input-container { left: 0; } .input-wrapper { max-width: 800px; margin: 0 auto; position: relative; } #messageInput { width: 100%; padding: 1rem; padding-right: 3rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; font-size: 1rem; outline: none; transition: border-color 0.3s; background-color: transparent; color: inherit; } #messageInput:focus { border-color: var(--role-primary, var(--primary-purple)); } #sendButton { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 0.5rem; color: var(--role-primary, var(--primary-purple)); opacity: 0.8; transition: opacity 0.3s; } #sendButton:hover { opacity: 1; } .message { margin-bottom: 1.5rem; padding: 1rem; border-radius: 8px; animation: fadeIn 0.3s ease-in; } .user-message { background-color: rgba(155, 135, 245, 0.1); } .ai-message { background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(200, 200, 201, 0.2); } .message-header { display: flex; align-items: center; margin-bottom: 0.5rem; font-weight: 500; } .user-icon, .ai-icon { width: 24px; height: 24px; border-radius: 50%; margin-right: 0.5rem; display: flex; align-items: center; justify-content: center; font-size: 12px; } .user-icon { background-color: var(--primary-purple); color: white; } .ai-icon { background-color: var(--light-purple); color: var(--dark-purple); } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } /* --- USER PROFILE DROPDOWN --- */ .header-right { display: flex; align-items: center; gap: 1rem; } .user-profile-menu { position: relative; display: flex; align-items: center; cursor: pointer; } .profile-icon-btn { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-purple), var(--light-purple)); display: flex; align-items: center; justify-content: center; color: white; font-size: 1.2rem; border: 2px solid rgba(255, 255, 255, 0.2); transition: all 0.2s; } .profile-icon-btn:hover { transform: scale(1.05); border-color: var(--primary-purple); } .dropdown-menu { position: absolute; top: 120%; right: 0; width: 200px; background: var(--bg-main); border: 1px solid var(--sidebar-border); border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); overflow: hidden; display: none; z-index: 2000; flex-direction: column; } .dropdown-menu.show { display: flex; animation: fadeIn 0.2s ease-out; } .dropdown-item { padding: 0.8rem 1rem; font-size: 0.9rem; color: var(--text-main); text-decoration: none; display: flex; align-items: center; gap: 0.8rem; transition: background 0.2s; border-bottom: 1px solid rgba(255, 255, 255, 0.05); } .dropdown-item:last-child { border-bottom: none; } .dropdown-item:hover { background: rgba(255, 255, 255, 0.05); } .dropdown-item.role-info { font-weight: 600; color: var(--text-dim); background: rgba(0, 0, 0, 0.2); cursor: default; } .logout-action { color: #ff4757; } .logout-action:hover { background: rgba(255, 71, 87, 0.1); }