#assistant-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1050;
  font-family: inherit;
}

#assistant-toggle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: #2ecc71;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease;
}

#assistant-toggle:hover {
  transform: scale(1.06);
}

#assistant-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 460px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#assistant-header {
  background: #1f2d3a;
  color: #fff;
  padding: 14px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#assistant-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

#assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f5f7fa;
}

.assistant-msg {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: .9rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.assistant-msg-cliente {
  align-self: flex-end;
  background: #2ecc71;
  color: #fff;
  border-bottom-right-radius: 2px;
}

.assistant-msg-assistente,
.assistant-msg-agente {
  align-self: flex-start;
  background: #fff;
  color: #333;
  border: 1px solid #e2e6ea;
  border-bottom-left-radius: 2px;
}

.assistant-msg-agente::before {
  content: "Equipa Printel";
  display: block;
  font-size: .7rem;
  font-weight: 600;
  color: #2ecc71;
  margin-bottom: 2px;
}

#assistant-form {
  display: flex;
  border-top: 1px solid #e2e6ea;
  padding: 8px;
  gap: 8px;
}

#assistant-input {
  flex: 1;
  border: 1px solid #e2e6ea;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: .9rem;
  outline: none;
}

#assistant-input:focus {
  border-color: #2ecc71;
}

#assistant-form button[type="submit"] {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #2ecc71;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

#assistant-form button[type="submit"]:disabled {
  opacity: .6;
  cursor: default;
}
