#rf-chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  height: 56px;
  padding: 0 20px;
  border-radius: 28px;
  background: #1a73e8;
  color: #fff;
  border: none;
  font-size: 16px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  z-index: 9999;
  transition: transform .2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
#rf-chat-toggle:hover { transform: scale(1.05); }
#rf-chat-toggle.rf-hidden { display: none; }
#rf-chat-toggle-icon { font-size: 22px; line-height: 1; }
#rf-chat-toggle-label { line-height: 1; }

#rf-chat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  height: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  display: none;
  flex-direction: column;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  overflow: hidden;
}
#rf-chat-panel.rf-open { display: flex; }

#rf-chat-header {
  background: #1a73e8;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
#rf-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
#rf-chat-minimize,
#rf-chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: .85;
}
#rf-chat-minimize:hover,
#rf-chat-close:hover { opacity: 1; background: rgba(255,255,255,.15); }

#rf-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rf-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 16px;
  line-height: 1.45;
  word-break: break-word;
}
.rf-msg-user {
  align-self: flex-end;
  background: #1a73e8;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.rf-msg-assistant {
  align-self: flex-start;
  background: #f1f3f4;
  color: #202124;
  border-bottom-left-radius: 4px;
}

#rf-chat-input-row {
  display: flex;
  border-top: 1px solid #e0e0e0;
  padding: 8px;
  gap: 6px;
}
#rf-chat-input {
  flex: 1;
  border: 1px solid #dadce0;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
}
#rf-chat-input:focus { border-color: #1a73e8; }
#rf-chat-send {
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
}
#rf-chat-send:disabled { opacity: .5; cursor: default; }

@media (max-width: 400px) {
  #rf-chat-panel { width: calc(100vw - 16px); right: 8px; bottom: 8px; }
  #rf-chat-toggle { right: 16px; bottom: 16px; padding: 0 14px; font-size: 14px; }
  #rf-chat-toggle-label { display: none; }
}
