:root {
 --accent: #FF6500;
 --primary: #1E3E62;
 --navy: #0B192C;
 --black: #000000;
 --bg: #ffffff;
 --card: #f2f2f2;
 --text: #000000;
}

body.dark {
 --bg: #0B192C;
 --card: #1E3E62;
 --text: #ffffff;
}

body {
 margin: 0;
 font-family: 'Inter', sans-serif;
 background: var(--bg);
 color: var(--text);
 transition: background 0.3s ease, color 0.3s ease;
}

/* Floating Button */
#chat-toggle {
 position: fixed;
 bottom: 20px;
 right: 20px;
 width: 60px;
 height: 60px;
 border-radius: 50%;
 border: none;
 background: var(--accent);
 color: #fff;
 font-size: 24px;
 cursor: pointer;
 box-shadow: 0 8px 20px rgba(0,0,0,0.3);
 transition: transform 0.3s ease;
 z-index: 999;
}
#chat-toggle:hover {
 transform: scale(1.1);
}

/* Chat Dialog */
#chat-dialog {
 position: fixed;
 bottom: 20px;
 right: 20px;
 width: 35vw;
 height: 80vh;
 background: var(--bg);
 border-radius: 20px;
 box-shadow: 0 20px 40px rgba(0,0,0,0.3);
 display: flex;
 flex-direction: column;
 overflow: hidden;
 transform: translateY(30px);
 opacity: 0;
 visibility: hidden;
 transition: all 0.3s ease;
 z-index: 1000;
}

.chat-visible {
 opacity: 1 !important;
 visibility: visible !important;
 transform: translateY(0) !important;
}

/* Mobile */
@media(max-width:768px){
 #chat-dialog{
  width:100vw;
  height:100vh;
  bottom:0;
  right:0;
  border-radius:0;
 }
}

/* Header */
.chat-header {
 background: var(--primary);
 color: #fff;
 padding: 12px 16px;
 display:flex;
 justify-content:space-between;
 align-items:center;
}

.branding{
 display:flex;
 align-items:center;
 gap:10px;
 font-weight:600;
}

.logo-circle{
 width:30px;
 height:30px;
 border-radius:50%;
 background:var(--accent);
}

.header-actions{
 display:flex;
 align-items:center;
 gap:10px;
}

#close-chat{
 background:none;
 border:none;
 color:#fff;
 font-size:18px;
 cursor:pointer;
}

/* Tag Bar */
.tag-bar{
 padding:10px;
 background:var(--card);
}

.tag-bar select{
 width:100%;
 padding:8px;
 border-radius:8px;
 border:1px solid #ccc;
}

/* Chat Body */
.chat-body{
 flex:1;
 padding:16px;
 overflow-y:auto;
 display:flex;
 flex-direction:column;
 gap:12px;
}

/* Messages */
.message{
 max-width:75%;
 padding:12px 14px;
 border-radius:16px;
 font-size:14px;
 position:relative;
 word-wrap: break-word;
}

.user{
 align-self:flex-end;
 background:var(--accent);
 color:#fff;
 border-bottom-right-radius:4px;
}

.bot{
 align-self:flex-start;
 background:var(--card);
 border-bottom-left-radius:4px;
}

.message-actions{
 margin-top:4px;
 font-size:12px;
 opacity:0.6;
 display:flex;
 gap:8px;
}

/* Input Area */
.chat-input-area{
 padding:12px;
 border-top:1px solid #ddd;
 display:flex;
 gap:8px;
 align-items:center;
 position:relative;
}

.chat-input-area input{
 flex:1;
 padding:10px;
 border-radius:20px;
 border:1px solid #ccc;
}

.chat-input-area button{
 background:var(--accent);
 border:none;
 color:#fff;
 padding:8px 14px;
 border-radius:50%;
 cursor:pointer;
}

/* Suggestions */
.suggestions{
 position:absolute;
 bottom:55px;
 left:12px;
 right:12px;
 background:#fff;
 border-radius:8px;
 box-shadow:0 5px 15px rgba(0,0,0,0.2);
 display:none;
 flex-direction:column;
}
.suggestions div{
 padding:8px;
 cursor:pointer;
}
.suggestions div:hover{
 background:#f0f0f0;
}

/* Theme Toggle */
.theme-switch {
 position: relative;
 display: inline-block;
 width: 40px;
 height: 20px;
}
.theme-switch input { display:none; }

.slider {
 position: absolute;
 cursor: pointer;
 top: 0; left: 0; right: 0; bottom: 0;
 background-color: #ccc;
 border-radius: 20px;
 transition: .4s;
}
.slider:before {
 position: absolute;
 content: "";
 height: 14px;
 width: 14px;
 left: 3px;
 bottom: 3px;
 background-color: white;
 border-radius: 50%;
 transition: .4s;
}
input:checked + .slider {
 background-color: var(--accent);
}
input:checked + .slider:before {
 transform: translateX(20px);
}
